<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Transforms/Vectorize/VPlanHelpers.h, branch users/nico/python-2</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>[VPlan] Speed up VPSlotTracker by using ModuleSlotTracker (#139881)</title>
<updated>2025-06-26T21:40:48+00:00</updated>
<author>
<name>Igor Kirillov</name>
<email>igor.kirillov@arm.com</email>
</author>
<published>2025-06-26T21:40:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aeec2c6e489364525a1c293248b7657d7e07726f'/>
<id>aeec2c6e489364525a1c293248b7657d7e07726f</id>
<content type='text'>
Currently, when VPSlotTracker is initialized with a VPlan, its
assignName method calls printAsOperand on each underlying instruction.
Each such call recomputes slot numbers for the entire function, leading
to O(N × M) complexity, where M is the number of instructions in the
loop and N is the number of instructions in the function.

This results in slow debug output for large loops. For example, printing
costs of all instructions becomes O(M² × N), which is especially painful
when enabling verbose dumps.

This patch improves debugging performance by caching slot numbers using
ModuleSlotTracker. It avoids redundant recomputation and makes debug
output significantly faster.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, when VPSlotTracker is initialized with a VPlan, its
assignName method calls printAsOperand on each underlying instruction.
Each such call recomputes slot numbers for the entire function, leading
to O(N × M) complexity, where M is the number of instructions in the
loop and N is the number of instructions in the function.

This results in slow debug output for large loops. For example, printing
costs of all instructions becomes O(M² × N), which is especially painful
when enabling verbose dumps.

This patch improves debugging performance by caching slot numbers using
ModuleSlotTracker. It avoids redundant recomputation and makes debug
output significantly faster.</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Update packScalarIntoVector to take and return wide value (NFC)</title>
<updated>2025-06-21T17:03:14+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-21T17:01:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9f7a15539441cc589c4116de43e752c9c62cafef'/>
<id>9f7a15539441cc589c4116de43e752c9c62cafef</id>
<content type='text'>
Make the function more flexible in preparation for new users.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the function more flexible in preparation for new users.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Skip cost assert if VPlan converted to single-scalar recipes.</title>
<updated>2025-05-24T10:09:27+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-24T10:09:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a9b2998e315af64b7a68606af9064db425699c39'/>
<id>a9b2998e315af64b7a68606af9064db425699c39</id>
<content type='text'>
Check if a VPlan transform converted recipes to single-scalar
VPReplicateRecipes (after 07c085af3efcd67503232f99a1652efc6e54c1a9). If
that's the case, the legacy cost model incorrectly overestimates the cost.

Fixes https://github.com/llvm/llvm-project/issues/141237.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check if a VPlan transform converted recipes to single-scalar
VPReplicateRecipes (after 07c085af3efcd67503232f99a1652efc6e54c1a9). If
that's the case, the legacy cost model incorrectly overestimates the cost.

Fixes https://github.com/llvm/llvm-project/issues/141237.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Manage noalias/alias_scope metadata in VPlan. (#136450)</title>
<updated>2025-05-09T10:19:12+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-09T10:19:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e854c381c6344b2ff8d1b58aa97008b4ecd9a9c5'/>
<id>e854c381c6344b2ff8d1b58aa97008b4ecd9a9c5</id>
<content type='text'>
Use VPIRMetadata added in
https://github.com/llvm/llvm-project/pull/135272
to also manage no-alias metadata added by versioning.

Note that this means we have to build the no-alias metadata up-front
once. If it is not used, it will be discarded automatically.

This also fixes a case where incorrect metadata was added to wide
loads/stores that got converted from an interleave group.

Compile-time impact is neutral:

https://llvm-compile-time-tracker.com/compare.php?from=38bf1af41c5425a552a53feb13c71d82873f1c18&amp;to=2fd7844cfdf5ec0f1c2ce0b9b3ae0763245b6922&amp;stat=instructions:u</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use VPIRMetadata added in
https://github.com/llvm/llvm-project/pull/135272
to also manage no-alias metadata added by versioning.

Note that this means we have to build the no-alias metadata up-front
once. If it is not used, it will be discarded automatically.

This also fixes a case where incorrect metadata was added to wide
loads/stores that got converted from an interleave group.

Compile-time impact is neutral:

https://llvm-compile-time-tracker.com/compare.php?from=38bf1af41c5425a552a53feb13c71d82873f1c18&amp;to=2fd7844cfdf5ec0f1c2ce0b9b3ae0763245b6922&amp;stat=instructions:u</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Replace getPreheaderBBFor with getCFGPredecessor. (NFC)</title>
<updated>2025-05-05T20:47:19+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-05T20:47:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=75532b21b18d10f455b6d45983dc0a11a7d5434f'/>
<id>75532b21b18d10f455b6d45983dc0a11a7d5434f</id>
<content type='text'>
Replace existing uses of getPreheaderBBFor with the newly added more
general getCFGPredecessor.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace existing uses of getPreheaderBBFor with the newly added more
general getCFGPredecessor.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Move scalarizeInstruction out of ILV (NFC).</title>
<updated>2025-05-03T19:52:03+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-05-03T19:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=daf32369dd1230628e4ca6fc919859bc33dc0032'/>
<id>daf32369dd1230628e4ca6fc919859bc33dc0032</id>
<content type='text'>
15bb1db4a9830 removed the last dependency on ILV, move the code out of
ILV in preparation of consolidating in VPlanRecipes.cpp.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
15bb1db4a9830 removed the last dependency on ILV, move the code out of
ILV in preparation of consolidating in VPlanRecipes.cpp.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Manage instruction metadata in VPlan. (#135272)</title>
<updated>2025-04-24T10:57:19+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-04-24T10:57:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d136f90a9806daf6d9ac905734a27974fc8f1b7'/>
<id>5d136f90a9806daf6d9ac905734a27974fc8f1b7</id>
<content type='text'>
Add a new helper to manage IR metadata that can be progated to generated
instructions for recipes.

This helps to remove a number of remaining uses of getUnderlyingInstr
during VPlan execution.

PR: https://github.com/llvm/llvm-project/pull/135272</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new helper to manage IR metadata that can be progated to generated
instructions for recipes.

This helps to remove a number of remaining uses of getUnderlyingInstr
during VPlan execution.

PR: https://github.com/llvm/llvm-project/pull/135272</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Remove dead UF argument from VPTransformState ctor (NFC).</title>
<updated>2025-03-30T16:31:00+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-03-30T16:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=424c8f9217b7f746eb10c97be7314556c24065cd'/>
<id>424c8f9217b7f746eb10c97be7314556c24065cd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Only execute VPExpandSCEVRecipes once and remove them (NFC).</title>
<updated>2025-03-23T09:06:01+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-03-23T09:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c482b8faeace855332a8c070cffaf3d0732cc79e'/>
<id>c482b8faeace855332a8c070cffaf3d0732cc79e</id>
<content type='text'>
Instead of executing the whole entry VPIRBB twice, first only execute
the VPExpandSCEVRecipes and replace their uses with the expanded
VPValue, which will be a live-in. This allows removing special logic in
VPExpandSCEVRecipe to support executing twice and allows moving the
ExpandedSCEVs map out of VPTransformState.

It will also allow adding other recipes to the entry VPBB in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of executing the whole entry VPIRBB twice, first only execute
the VPExpandSCEVRecipes and replace their uses with the expanded
VPValue, which will be a live-in. This allows removing special logic in
VPExpandSCEVRecipe to support executing twice and allows moving the
ExpandedSCEVs map out of VPTransformState.

It will also allow adding other recipes to the entry VPBB in the future.
</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Restrict hoisting of broadcast operations using VPDominatorTree (#117138)</title>
<updated>2025-03-13T14:16:04+00:00</updated>
<author>
<name>Mel Chen</name>
<email>mel.chen@sifive.com</email>
</author>
<published>2025-03-13T13:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d5e706691c6d811820598a73694d3430c1d11b0'/>
<id>5d5e706691c6d811820598a73694d3430c1d11b0</id>
<content type='text'>
This patch restricts broadcast operations from being hoisted to the vector
preheader unless the basic block that defines the broadcasted value properly
dominates the vector preheader.

This prevents potential use-before-definition issues when the broadcasted
value is defined within the plan. VPDominatorTree is used to confirm this
restriction while still allowing safe hoisting for broadcasted values defined
outside the plan.

Issue https://github.com/llvm/llvm-project/issues/117139
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch restricts broadcast operations from being hoisted to the vector
preheader unless the basic block that defines the broadcasted value properly
dominates the vector preheader.

This prevents potential use-before-definition issues when the broadcasted
value is defined within the plan. VPDominatorTree is used to confirm this
restriction while still allowing safe hoisting for broadcasted values defined
outside the plan.

Issue https://github.com/llvm/llvm-project/issues/117139
</pre>
</div>
</content>
</entry>
</feed>
