<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Scalar/StructurizeCFG.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>Reapply: [AMDGPU][UnifyDivergentExitNodes][StructurizeCFG] Add support for callbr instruction with inline-asm (#152161) (#166195)</title>
<updated>2025-11-03T19:59:48+00:00</updated>
<author>
<name>Robert Imschweiler</name>
<email>robert.imschweiler@amd.com</email>
</author>
<published>2025-11-03T19:59:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a8ea7f4580b467183ce2075db6b1b2ec3beb6ebf'/>
<id>a8ea7f4580b467183ce2075db6b1b2ec3beb6ebf</id>
<content type='text'>
Reapply #152161 with fixed 'changed' flags.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reapply #152161 with fixed 'changed' flags.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[AMDGPU][UnifyDivergentExitNodes][StructurizeCFG] Add support for callbr instruction with inline-asm" (#166186)</title>
<updated>2025-11-03T16:33:20+00:00</updated>
<author>
<name>Robert Imschweiler</name>
<email>robert.imschweiler@amd.com</email>
</author>
<published>2025-11-03T16:33:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=af68efc9c49383c65b6f2bc800ea40b06b66b983'/>
<id>af68efc9c49383c65b6f2bc800ea40b06b66b983</id>
<content type='text'>
Reverts llvm/llvm-project#152161

Need to revert to fix changed logic for the expensive checks.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#152161

Need to revert to fix changed logic for the expensive checks.</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU][UnifyDivergentExitNodes][StructurizeCFG] Add support for callbr instruction with inline-asm (#152161)</title>
<updated>2025-11-03T15:09:12+00:00</updated>
<author>
<name>Robert Imschweiler</name>
<email>robert.imschweiler@amd.com</email>
</author>
<published>2025-11-03T15:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=332f9b5eeef85dca29112018ba111bf64a75d27d'/>
<id>332f9b5eeef85dca29112018ba111bf64a75d27d</id>
<content type='text'>
Finishes adding inline-asm callbr support for AMDGPU, started by
https://github.com/llvm/llvm-project/pull/149308.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Finishes adding inline-asm callbr support for AMDGPU, started by
https://github.com/llvm/llvm-project/pull/149308.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Remove redundant typename (NFC) (#166087)</title>
<updated>2025-11-02T21:15:16+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-02T21:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=707bab651ff39f399e2fa2c9c185d9a2795e8be8'/>
<id>707bab651ff39f399e2fa2c9c185d9a2795e8be8</id>
<content type='text'>
Identified with readability-redundant-typename.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with readability-redundant-typename.</pre>
</div>
</content>
</entry>
<entry>
<title>[AMDGPU] Improve StructurizeCFG pass performance by using SSAUpdaterBulk. (#150937)</title>
<updated>2025-10-14T18:07:10+00:00</updated>
<author>
<name>Valery Pykhtin</name>
<email>valery.pykhtin@amd.com</email>
</author>
<published>2025-10-14T18:07:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fc2afbda360478904f3630c36ec65dc8ee3e6a60'/>
<id>fc2afbda360478904f3630c36ec65dc8ee3e6a60</id>
<content type='text'>
SSAUpdaterBulk replaces legacy SSAUpdater.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SSAUpdaterBulk replaces legacy SSAUpdater.</pre>
</div>
</content>
</entry>
<entry>
<title>[StructurizeCFG] bug fix in zero cost hoist (#157969)</title>
<updated>2025-09-15T19:29:32+00:00</updated>
<author>
<name>Vigneshwar Jayakumar</name>
<email>vigneshwar.jayakumar@amd.com</email>
</author>
<published>2025-09-15T19:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d9fa0de5c861ebedf6573b5cd259e328e70bfc29'/>
<id>d9fa0de5c861ebedf6573b5cd259e328e70bfc29</id>
<content type='text'>
This fixes a bug where zero cost instruction was hoisted to nearest
common dominator but the hoisted instruction's operands didn't dominate
the common dominator causing poison values.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a bug where zero cost instruction was hoisted to nearest
common dominator but the hoisted instruction's operands didn't dominate
the common dominator causing poison values.</pre>
</div>
</content>
</entry>
<entry>
<title>[StructurizeCFG] nested-if zerocost hoist bugfix (#155408)</title>
<updated>2025-08-28T14:04:14+00:00</updated>
<author>
<name>Vigneshwar Jayakumar</name>
<email>vigneshwar.jayakumar@amd.com</email>
</author>
<published>2025-08-28T14:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df96e09c1eec06555d54532a63c2317c4caddcf0'/>
<id>df96e09c1eec06555d54532a63c2317c4caddcf0</id>
<content type='text'>
When zero cost instructions are hoisted, the simplifyHoistedPhi function
was setting incoming phi values which were not dominating the use
causing runtime failure. This was set to poison by rebuildSSA function.
This commit fixes the issue.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When zero cost instructions are hoisted, the simplifyHoistedPhi function
was setting incoming phi values which were not dominating the use
causing runtime failure. This was set to poison by rebuildSSA function.
This commit fixes the issue.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Remove unused includes of SmallSet.h (NFC) (#154893)</title>
<updated>2025-08-22T17:33:46+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-08-22T17:33:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11b4f110e0f9f1a0f987faa121c594af1bcd43cc'/>
<id>11b4f110e0f9f1a0f987faa121c594af1bcd43cc</id>
<content type='text'>
We just replaced SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;, bypassing
the redirection found in SmallSet.h.  With that, we no longer need to
include SmallSet.h in many files.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We just replaced SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;, bypassing
the redirection found in SmallSet.h.  With that, we no longer need to
include SmallSet.h in many files.</pre>
</div>
</content>
</entry>
<entry>
<title>[llvm] Replace SmallSet with SmallPtrSet (NFC) (#154068)</title>
<updated>2025-08-18T14:01:29+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-08-18T14:01:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=07eb7b76928d6873c60859a0339591ed9e0f512a'/>
<id>07eb7b76928d6873c60859a0339591ed9e0f512a</id>
<content type='text'>
This patch replaces SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;.  Note
that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer
element types:

  template &lt;typename PointeeType, unsigned N&gt;
class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, N&gt;
{};

We only have 140 instances that rely on this "redirection", with the
vast majority of them under llvm/. Since relying on the redirection
doesn't improve readability, this patch replaces SmallSet with
SmallPtrSet for pointer element types.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch replaces SmallSet&lt;T *, N&gt; with SmallPtrSet&lt;T *, N&gt;.  Note
that SmallSet.h "redirects" SmallSet to SmallPtrSet for pointer
element types:

  template &lt;typename PointeeType, unsigned N&gt;
class SmallSet&lt;PointeeType*, N&gt; : public SmallPtrSet&lt;PointeeType*, N&gt;
{};

We only have 140 instances that rely on this "redirection", with the
vast majority of them under llvm/. Since relying on the redirection
doesn't improve readability, this patch replaces SmallSet with
SmallPtrSet for pointer element types.</pre>
</div>
</content>
</entry>
<entry>
<title>reland "[StructurizeCFG] Hoist and simplify zero-cost incoming else p… (#149744)</title>
<updated>2025-07-25T20:23:45+00:00</updated>
<author>
<name>Vigneshwar Jayakumar</name>
<email>vigneshwar.jayakumar@amd.com</email>
</author>
<published>2025-07-25T20:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=56ae79a6ab70ded92846e053b13745ea51e48089'/>
<id>56ae79a6ab70ded92846e053b13745ea51e48089</id>
<content type='text'>
…hi values (#139605)"

This relands commit b11523b494b with the fix for llvm-buildbot failures
"clang-hip-vega20" and "openmp-offload-amdgpu-runtime-2". The reland
prevents hoisting the phi node which fixes the issue.

Original PR description:

The order of if and else blocks can introduce unnecessary VGPR copies.
Consider the case of an if-else block where the incoming phi from the
'Else block' only contains zero-cost instructions, and the 'Then' block
modifies some value. There would be no interference when coalescing
because only one value is live at any point before structurization.
However, in the structurized CFG, the Then value is live at 'Else' block
due to the path if→flow→else, leading to additional VGPR copies.

This patch addresses the issue by:
- Identifying PHI nodes with zero-cost incoming values from the Else
block and hoisting those values to the nearest common dominator of the
Then and Else blocks.
- Updating Flow PHI nodes by replacing poison entries (on the if→flow
edge) with the correct hoisted values.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…hi values (#139605)"

This relands commit b11523b494b with the fix for llvm-buildbot failures
"clang-hip-vega20" and "openmp-offload-amdgpu-runtime-2". The reland
prevents hoisting the phi node which fixes the issue.

Original PR description:

The order of if and else blocks can introduce unnecessary VGPR copies.
Consider the case of an if-else block where the incoming phi from the
'Else block' only contains zero-cost instructions, and the 'Then' block
modifies some value. There would be no interference when coalescing
because only one value is live at any point before structurization.
However, in the structurized CFG, the Then value is live at 'Else' block
due to the path if→flow→else, leading to additional VGPR copies.

This patch addresses the issue by:
- Identifying PHI nodes with zero-cost incoming values from the Else
block and hoisting those values to the nearest common dominator of the
Then and Else blocks.
- Updating Flow PHI nodes by replacing poison entries (on the if→flow
edge) with the correct hoisted values.</pre>
</div>
</content>
</entry>
</feed>
