<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/test/Transforms/LoopVectorize/PowerPC/reg-usage.ll, 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>[LV] Move VPlan-based calculateRegisterUsage to VPlanAnalysis (NFC). (#135673)</title>
<updated>2025-06-02T16:40:50+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-06-02T16:40:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11713e86b04fb06dbace56023d114754170f7272'/>
<id>11713e86b04fb06dbace56023d114754170f7272</id>
<content type='text'>
Move VPlan-based calculateRegisterUsage from LoopVectorize
to VPlanAnalysis.cpp. It is a VPlan-based analysis and this helps
to reduce the size of LoopVectorize.

PR: https://github.com/llvm/llvm-project/pull/135673</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move VPlan-based calculateRegisterUsage from LoopVectorize
to VPlanAnalysis.cpp. It is a VPlan-based analysis and this helps
to reduce the size of LoopVectorize.

PR: https://github.com/llvm/llvm-project/pull/135673</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Compute register usage for interleaving on VPlan. (#126437)</title>
<updated>2025-04-08T19:52:50+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-04-08T19:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6f92339d9e764d8a8452f82eff690d8ef9070ac6'/>
<id>6f92339d9e764d8a8452f82eff690d8ef9070ac6</id>
<content type='text'>
Add a version of calculateRegisterUsage that works estimates register
usage for a VPlan. This mostly just ports the existing code, with some
updates to figure out what recipes will generate vectors vs scalars.

There are number of changes in the computed register usages, but they
should be more accurate w.r.t. to the generated vector code.

There are the following changes:

 * Scalar usage increases in most cases by 1, as we always create a
   scalar canonical IV, which is alive across the loop and is not
   considered by the legacy implementation

 * Output is ordered by insertion, now scalar registers are added first
   due the canonical IV phi.

 * Using the VPlan, we now also more precisely know if an induction will
   be vectorized or scalarized.

Depends on https://github.com/llvm/llvm-project/pull/126415

PR: https://github.com/llvm/llvm-project/pull/126437</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a version of calculateRegisterUsage that works estimates register
usage for a VPlan. This mostly just ports the existing code, with some
updates to figure out what recipes will generate vectors vs scalars.

There are number of changes in the computed register usages, but they
should be more accurate w.r.t. to the generated vector code.

There are the following changes:

 * Scalar usage increases in most cases by 1, as we always create a
   scalar canonical IV, which is alive across the loop and is not
   considered by the legacy implementation

 * Output is ordered by insertion, now scalar registers are added first
   due the canonical IV phi.

 * Using the VPlan, we now also more precisely know if an induction will
   be vectorized or scalarized.

Depends on https://github.com/llvm/llvm-project/pull/126415

PR: https://github.com/llvm/llvm-project/pull/126437</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Don't skip instrs with side-effects in reg pressure computation. (#126415)</title>
<updated>2025-03-19T15:13:43+00:00</updated>
<author>
<name>Florian Hahn</name>
<email>flo@fhahn.com</email>
</author>
<published>2025-03-19T15:13:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11b869957232e6f5dfec5c88d636fe808e329d8d'/>
<id>11b869957232e6f5dfec5c88d636fe808e329d8d</id>
<content type='text'>
calculateRegisterUsage adds end points for each user of an instruction
to Ends and ignores instructions not added to it, i.e. instructions with
no users.

This means things like stores aren't included, which in turn means
values that are only used in stores are also not included for
consideration. This means we underestimate the register usage in cases
where the only users are things like stores.

Update the code to don't skip instructions without users (i.e. not in
Ends) if they have side-effects.

PR: https://github.com/llvm/llvm-project/pull/126415</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
calculateRegisterUsage adds end points for each user of an instruction
to Ends and ignores instructions not added to it, i.e. instructions with
no users.

This means things like stores aren't included, which in turn means
values that are only used in stores are also not included for
consideration. This means we underestimate the register usage in cases
where the only users are things like stores.

Update the code to don't skip instructions without users (i.e. not in
Ends) if they have side-effects.

PR: https://github.com/llvm/llvm-project/pull/126415</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Change loops' interleave count computation (#73766)</title>
<updated>2024-01-04T07:15:22+00:00</updated>
<author>
<name>Nilanjana Basu</name>
<email>n_basu@apple.com</email>
</author>
<published>2024-01-04T07:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cd28da390f8b8dedd00f9a2a383ec81e90436841'/>
<id>cd28da390f8b8dedd00f9a2a383ec81e90436841</id>
<content type='text'>
[LV] Change loops' interleave count computation

A set of microbenchmarks in llvm-test-suite (https://github.com/llvm/llvm-test-suite/pull/56), when tested on a AArch64 platform, demonstrates that loop interleaving is beneficial when the vector loop runs at least twice or when the epilogue loop trip count (TC) is minimal. Therefore, we choose interleaving count (IC) between TC/VF &amp; TC/2*VF (VF = vectorization factor), such that remainder TC for the epilogue loop is minimum while the IC is maximum in case the remainder TC is same for both.

The initial tests for this change were submitted in PRs:
https://github.com/llvm/llvm-project/pull/70272 and https://github.com/llvm/llvm-project/pull/74689.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[LV] Change loops' interleave count computation

A set of microbenchmarks in llvm-test-suite (https://github.com/llvm/llvm-test-suite/pull/56), when tested on a AArch64 platform, demonstrates that loop interleaving is beneficial when the vector loop runs at least twice or when the epilogue loop trip count (TC) is minimal. Therefore, we choose interleaving count (IC) between TC/VF &amp; TC/2*VF (VF = vectorization factor), such that remainder TC for the epilogue loop is minimum while the IC is maximum in case the remainder TC is same for both.

The initial tests for this change were submitted in PRs:
https://github.com/llvm/llvm-project/pull/70272 and https://github.com/llvm/llvm-project/pull/74689.</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Reland "Update logic for calculating register usage due to invariants"</title>
<updated>2023-02-28T12:02:39+00:00</updated>
<author>
<name>sgokhale</name>
<email>sgokhale@nvidia.com</email>
</author>
<published>2023-02-28T12:02:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4f9a5447c633083e99fd5cb448116fa8e5b1f976'/>
<id>4f9a5447c633083e99fd5cb448116fa8e5b1f976</id>
<content type='text'>
Previously, while calculating register usage due to invariants, it was assumed that invariant would always be part of widening
instructions. This resulted in calculating vector register types for vectors which cant be legalized(check the newly added test for more details).

An invariant might not always need a vector register. For e.g., invariant might just be used for iteration check.

This patch checks if the invariant is part of any widening instruction and considers register usage accordingly. Fixes issue 60493

Differential Revision: https://reviews.llvm.org/D143422
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, while calculating register usage due to invariants, it was assumed that invariant would always be part of widening
instructions. This resulted in calculating vector register types for vectors which cant be legalized(check the newly added test for more details).

An invariant might not always need a vector register. For e.g., invariant might just be used for iteration check.

This patch checks if the invariant is part of any widening instruction and considers register usage accordingly. Fixes issue 60493

Differential Revision: https://reviews.llvm.org/D143422
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[LV] Update logic for calculating register usage due to invariants"</title>
<updated>2023-02-28T10:16:59+00:00</updated>
<author>
<name>sgokhale</name>
<email>sgokhale@nvidia.com</email>
</author>
<published>2023-02-28T10:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3c8ddbde37d40b81dc0dee7ce61ff0b18663946e'/>
<id>3c8ddbde37d40b81dc0dee7ce61ff0b18663946e</id>
<content type='text'>
Observing test failure for llvm/test/Transforms/LoopVectorize/AArch64/reg-usage.ll

This reverts commit d1628266946fdddb44bdad2b3ccf3cd5fc769f42.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Observing test failure for llvm/test/Transforms/LoopVectorize/AArch64/reg-usage.ll

This reverts commit d1628266946fdddb44bdad2b3ccf3cd5fc769f42.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Update logic for calculating register usage due to invariants</title>
<updated>2023-02-28T05:35:26+00:00</updated>
<author>
<name>sgokhale</name>
<email>sgokhale@nvidia.com</email>
</author>
<published>2023-02-27T07:50:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d1628266946fdddb44bdad2b3ccf3cd5fc769f42'/>
<id>d1628266946fdddb44bdad2b3ccf3cd5fc769f42</id>
<content type='text'>
Previously, while calculating register usage due to invariants, it was assumed that invariant would always be part of widening
instructions. This resulted in calculating vector register types for vectors which cant be legalized(check the newly added test for more details).

An invariant might not always need a vector register. For e.g., invariant might just be used for iteration check.

This patch checks if the invariant is part of any widening instruction and considers register usage accordingly. Fixes issue 60493

Differential Revision: https://reviews.llvm.org/D143422
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, while calculating register usage due to invariants, it was assumed that invariant would always be part of widening
instructions. This resulted in calculating vector register types for vectors which cant be legalized(check the newly added test for more details).

An invariant might not always need a vector register. For e.g., invariant might just be used for iteration check.

This patch checks if the invariant is part of any widening instruction and considers register usage accordingly. Fixes issue 60493

Differential Revision: https://reviews.llvm.org/D143422
</pre>
</div>
</content>
</entry>
<entry>
<title>[LoopVectorize] Convert some tests to opaque pointers (NFC)</title>
<updated>2023-01-04T16:25:42+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2023-01-04T16:18:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2fab927546b34f5af7770541a9bbb974d9818c5c'/>
<id>2fab927546b34f5af7770541a9bbb974d9818c5c</id>
<content type='text'>
Check lines for some of these tests were regenerated. The difference
is that with opaque pointers SCEVExpander always emits i8 GEPs,
making the address calculation explicit. This is a known problem
that will be solved long term by making all address calculations
explicit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check lines for some of these tests were regenerated. The difference
is that with opaque pointers SCEVExpander always emits i8 GEPs,
making the address calculation explicit. This is a known problem
that will be solved long term by making all address calculations
explicit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[NFCI] Regenerate SROA/LoopVectorize test checks"</title>
<updated>2022-04-03T23:15:30+00:00</updated>
<author>
<name>Dávid Bolvanský</name>
<email>david.bolvansky@gmail.com</email>
</author>
<published>2022-04-03T23:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=872f7000fc6a2945c715dd701984560b0a98105c'/>
<id>872f7000fc6a2945c715dd701984560b0a98105c</id>
<content type='text'>
This reverts commit 14e3450fb57305aa9ff3e9e60687b458e43835c9.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 14e3450fb57305aa9ff3e9e60687b458e43835c9.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFCI] Regenerate LoopVectorize test checks</title>
<updated>2022-04-03T19:56:24+00:00</updated>
<author>
<name>Dávid Bolvanský</name>
<email>david.bolvansky@gmail.com</email>
</author>
<published>2022-04-03T19:55:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a113a582b1a2c04f5df89db50e446074f74559b0'/>
<id>a113a582b1a2c04f5df89db50e446074f74559b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
