<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/GlobalISel/Legalizer.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[LLVM][CodeGen] Add convenience accessors for MachineFunctionProperties (#140002)</title>
<updated>2025-05-22T15:07:52+00:00</updated>
<author>
<name>Rahul Joshi</name>
<email>rjoshi@nvidia.com</email>
</author>
<published>2025-05-22T15:07:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1fdf02ad5a4ca155017eea22688365a20aab077c'/>
<id>1fdf02ad5a4ca155017eea22688365a20aab077c</id>
<content type='text'>
Add per-property has&lt;Prop&gt;/set&lt;Prop&gt;/reset&lt;Prop&gt; functions to
MachineFunctionProperties.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add per-property has&lt;Prop&gt;/set&lt;Prop&gt;/reset&lt;Prop&gt; functions to
MachineFunctionProperties.</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalISel] Add a GISelValueTracker printing pass (#139687)</title>
<updated>2025-05-14T10:05:04+00:00</updated>
<author>
<name>David Green</name>
<email>david.green@arm.com</email>
</author>
<published>2025-05-14T10:05:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ec406e86745af0a306870d3e4ce56325584f9b1e'/>
<id>ec406e86745af0a306870d3e4ce56325584f9b1e</id>
<content type='text'>
This adds a GISelValueTrackingPrinterPass that can print the known bits
and sign bit of each def in a function. It is built on the new pass
manager and so adds a NPM GISelValueTrackingAnalysis, renaming the older
class to GISelValueTrackingAnalysisLegacy.

The first 2 functions from the AArch64GISelMITest are ported over to an
mir test to show it working. It also runs successfully on all files in
llvm/test/CodeGen/AArch64/GlobalISel/*.mir that are not invalid. It can
hopefully be used to test GlobalISel known bits analysis more directly
in common cases, without jumping through the hoops that the C++ tests
requires.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a GISelValueTrackingPrinterPass that can print the known bits
and sign bit of each def in a function. It is built on the new pass
manager and so adds a NPM GISelValueTrackingAnalysis, renaming the older
class to GISelValueTrackingAnalysisLegacy.

The first 2 functions from the AArch64GISelMITest are ported over to an
mir test to show it working. It also runs successfully on all files in
llvm/test/CodeGen/AArch64/GlobalISel/*.mir that are not invalid. It can
hopefully be used to test GlobalISel known bits analysis more directly
in common cases, without jumping through the hoops that the C++ tests
requires.</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalISel][NFC] Rename GISelKnownBits to GISelValueTracking (#133466)</title>
<updated>2025-03-29T10:51:29+00:00</updated>
<author>
<name>Tim Gymnich</name>
<email>tim@gymni.ch</email>
</author>
<published>2025-03-29T10:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1d0005a69ac812ea0ff069052daf4c2ea0242a48'/>
<id>1d0005a69ac812ea0ff069052daf4c2ea0242a48</id>
<content type='text'>
- rename `GISelKnownBits` to `GISelValueTracking` to analyze more than
just `KnownBits` in the future</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- rename `GISelKnownBits` to `GISelValueTracking` to analyze more than
just `KnownBits` in the future</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalISel] Remove unused includes (NFC) (#115429)</title>
<updated>2024-11-09T06:28:47+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-09T06:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b83399eab603320d3c2998450f4ada83e7fe746c'/>
<id>b83399eab603320d3c2998450f4ada83e7fe746c</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>Reland: [GlobalISel] LegalizationArtifactCombiner: Elide redundant G_AND</title>
<updated>2023-11-01T23:18:19+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2023-09-29T00:11:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=373c343a77a7afaa07179db1754a52b620dfaf2e'/>
<id>373c343a77a7afaa07179db1754a52b620dfaf2e</id>
<content type='text'>
Reland 3686a0b after fixing an exposed miscompile in #68840

Differential Revision: https://reviews.llvm.org/D159140
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reland 3686a0b after fixing an exposed miscompile in #68840

Differential Revision: https://reviews.llvm.org/D159140
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[GlobalISel] LegalizationArtifactCombiner: Elide redundant G_AND"</title>
<updated>2023-09-29T01:35:40+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2023-09-29T01:35:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=305fbc1b320364a4e70cea2d9987de2b0b14dcc5'/>
<id>305fbc1b320364a4e70cea2d9987de2b0b14dcc5</id>
<content type='text'>
This reverts commit 3686a0b611c65f0d7190345b8e3e73cdca9fa657.
This seems to have broken some sanitizer tests:
https://lab.llvm.org/buildbot/#/builders/184/builds/7721
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3686a0b611c65f0d7190345b8e3e73cdca9fa657.
This seems to have broken some sanitizer tests:
https://lab.llvm.org/buildbot/#/builders/184/builds/7721
</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalISel] LegalizationArtifactCombiner: Elide redundant G_AND</title>
<updated>2023-09-29T00:11:57+00:00</updated>
<author>
<name>Tobias Stadler</name>
<email>mail@stadler-tobias.de</email>
</author>
<published>2023-09-29T00:11:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3686a0b611c65f0d7190345b8e3e73cdca9fa657'/>
<id>3686a0b611c65f0d7190345b8e3e73cdca9fa657</id>
<content type='text'>
The legalizer currently generates lots of G_AND artifacts.
For example between boolean uses and defs there is always a G_AND with a mask of 1, but when the target uses ZeroOrOneBooleanContents, this is unnecessary.
Currently these artifacts have to be removed using post-legalize combines.
Omitting these artifacts at their source in the artifact combiner has a few advantages:
- We know that the emitted G_AND is very likely to be useless, so our KnownBits call is likely worth it.
- The G_AND and G_CONSTANT can interrupt e.g. G_UADDE/... sequences generated during legalization of wide adds which makes it harder to detect these sequences in the instruction selector (e.g. useful to prevent unnecessary reloading of AArch64 NZCV register).
- This cleans up a lot of legalizer output and even improves compilation-times.
AArch64 CTMark geomean: `O0` -5.6% size..text; `O0` and `O3` ~-0.9% compilation-time (instruction count).

Since this introduces KnownBits into code-paths used by `O0`, I reduced the default recursion depth.
This doesn't seem to make a difference in CTMark, but should prevent excessive recursive calls in the worst case.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D159140
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The legalizer currently generates lots of G_AND artifacts.
For example between boolean uses and defs there is always a G_AND with a mask of 1, but when the target uses ZeroOrOneBooleanContents, this is unnecessary.
Currently these artifacts have to be removed using post-legalize combines.
Omitting these artifacts at their source in the artifact combiner has a few advantages:
- We know that the emitted G_AND is very likely to be useless, so our KnownBits call is likely worth it.
- The G_AND and G_CONSTANT can interrupt e.g. G_UADDE/... sequences generated during legalization of wide adds which makes it harder to detect these sequences in the instruction selector (e.g. useful to prevent unnecessary reloading of AArch64 NZCV register).
- This cleans up a lot of legalizer output and even improves compilation-times.
AArch64 CTMark geomean: `O0` -5.6% size..text; `O0` and `O3` ~-0.9% compilation-time (instruction count).

Since this introduces KnownBits into code-paths used by `O0`, I reduced the default recursion depth.
This doesn't seem to make a difference in CTMark, but should prevent excessive recursive calls in the worst case.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D159140
</pre>
</div>
</content>
</entry>
<entry>
<title>GlobalISel: Remove block insertion legalizer check</title>
<updated>2023-06-10T01:04:37+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2023-06-07T21:21:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=02d25c82b8b54a3c3f3791c700c7f4192554a95e'/>
<id>02d25c82b8b54a3c3f3791c700c7f4192554a95e</id>
<content type='text'>
This report was broken. The passed null block would crash in the
remark constructor.

I have a patch which will introduce a new block, and it seems to work
fine. It doesn't require legalizing any instructions in the new block,
so it's possible those will be missed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This report was broken. The passed null block would crash in the
remark constructor.

I have a patch which will introduce a new block, and it seems to work
fine. It doesn't require legalizing any instructions in the new block,
so it's possible those will be missed.
</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] Improved wide multiplies</title>
<updated>2023-02-22T15:39:06+00:00</updated>
<author>
<name>Jessica Del</name>
<email>Jessica.Del@amd.com</email>
</author>
<published>2023-02-21T08:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc672b6a8b48195b7afaba6f0f9d64e579b1dc72'/>
<id>fc672b6a8b48195b7afaba6f0f9d64e579b1dc72</id>
<content type='text'>
These checks show optimized instructions if an operand is known to be
(partially) zero.

Change-Id: Ie2f6d0d3ee9d5b279d1f4c1dd0787492e39cc77a

Differential Revision: https://reviews.llvm.org/D140208
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These checks show optimized instructions if an operand is known to be
(partially) zero.

Change-Id: Ie2f6d0d3ee9d5b279d1f4c1dd0787492e39cc77a

Differential Revision: https://reviews.llvm.org/D140208
</pre>
</div>
</content>
</entry>
<entry>
<title>[GlobalISel][DebugInfo] Salvage trivially dead instructions</title>
<updated>2022-09-17T00:54:55+00:00</updated>
<author>
<name>Vladislav Dzhidzhoev</name>
<email>vdzhidzhoev@accesssoftek.com</email>
</author>
<published>2022-09-09T23:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6cf11f44627967c00adecd48b8ab9b4e97d627fd'/>
<id>6cf11f44627967c00adecd48b8ab9b4e97d627fd</id>
<content type='text'>
Use salvageDebugInfo for instructions erased as trivially dead in
GlobalISel.

It would be helpful to implement support of G_PTR_ADD and G_FRAME_INDEX
in salvageDebugInfo in future in order to preserve more variable
location.

Reviewed by: arsenm

Differential Revision: https://reviews.llvm.org/D133986
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use salvageDebugInfo for instructions erased as trivially dead in
GlobalISel.

It would be helpful to implement support of G_PTR_ADD and G_FRAME_INDEX
in salvageDebugInfo in future in order to preserve more variable
location.

Reviewed by: arsenm

Differential Revision: https://reviews.llvm.org/D133986
</pre>
</div>
</content>
</entry>
</feed>
