<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Analysis/TargetTransformInfo.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>[TTI] Use MemIntrinsicCostAttributes for getMaskedMemoryOpCost (#168029)</title>
<updated>2025-11-19T01:51:12+00:00</updated>
<author>
<name>Shih-Po Hung</name>
<email>shihpo.hung@sifive.com</email>
</author>
<published>2025-11-19T01:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=961940e1a7c9b4bbe0ae54c2ea4bdc69308947d6'/>
<id>961940e1a7c9b4bbe0ae54c2ea4bdc69308947d6</id>
<content type='text'>
- Split from #165532. This is a step toward a unified interface for
masked/gather-scatter/strided/expand-compress cost modeling.
- Replace the ad-hoc parameter list with a single attributes object.

API change:
```
- InstructionCost getMaskedMemoryOpCost(Opcode, Src, Alignment,
-                                       AddressSpace, CostKind);

+ InstructionCost getMaskedMemoryOpCost(MemIntrinsicCostAttributes,
+                                       CostKind);
```
Notes:
- NFCI intended: callers populate MemIntrinsicCostAttributes with the
same information as before.
- Follow-up: migrate gather/scatter, strided, and expand/compress cost
queries to the same attributes-based entry point.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Split from #165532. This is a step toward a unified interface for
masked/gather-scatter/strided/expand-compress cost modeling.
- Replace the ad-hoc parameter list with a single attributes object.

API change:
```
- InstructionCost getMaskedMemoryOpCost(Opcode, Src, Alignment,
-                                       AddressSpace, CostKind);

+ InstructionCost getMaskedMemoryOpCost(MemIntrinsicCostAttributes,
+                                       CostKind);
```
Notes:
- NFCI intended: callers populate MemIntrinsicCostAttributes with the
same information as before.
- Follow-up: migrate gather/scatter, strided, and expand/compress cost
queries to the same attributes-based entry point.</pre>
</div>
</content>
</entry>
<entry>
<title>[Analysis, CodeGen] Use ArrayRef instead of const ArrayRef (NFC) (#166026)</title>
<updated>2025-11-02T06:20:19+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-02T06:20:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=31b8ba56708b8967300f9fca11dae5d272462d7d'/>
<id>31b8ba56708b8967300f9fca11dae5d272462d7d</id>
<content type='text'>
This patch improves readability by using "ArrayRef&lt;T&gt;" instead of
"const ArrayRef&lt;T&gt;" and "const ArrayRef&lt;T&gt; &amp;" in function parameter
types.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch improves readability by using "ArrayRef&lt;T&gt;" instead of
"const ArrayRef&lt;T&gt;" and "const ArrayRef&lt;T&gt; &amp;" in function parameter
types.</pre>
</div>
</content>
</entry>
<entry>
<title>[LV] Bundle partial reductions inside VPExpressionRecipe (#147302)</title>
<updated>2025-10-23T11:18:55+00:00</updated>
<author>
<name>Sam Tebbs</name>
<email>samuel.tebbs@arm.com</email>
</author>
<published>2025-10-23T11:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b19a546aa8d341dfdfa2a3a0a37fb90ac786f92'/>
<id>6b19a546aa8d341dfdfa2a3a0a37fb90ac786f92</id>
<content type='text'>
This PR bundles partial reductions inside the VPExpressionRecipe class.

Stacked PRs:
1. https://github.com/llvm/llvm-project/pull/147026
2. https://github.com/llvm/llvm-project/pull/147255
3. https://github.com/llvm/llvm-project/pull/156976
4. https://github.com/llvm/llvm-project/pull/160154
5. -&gt; https://github.com/llvm/llvm-project/pull/147302
6. https://github.com/llvm/llvm-project/pull/162503
7. https://github.com/llvm/llvm-project/pull/147513</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This PR bundles partial reductions inside the VPExpressionRecipe class.

Stacked PRs:
1. https://github.com/llvm/llvm-project/pull/147026
2. https://github.com/llvm/llvm-project/pull/147255
3. https://github.com/llvm/llvm-project/pull/156976
4. https://github.com/llvm/llvm-project/pull/160154
5. -&gt; https://github.com/llvm/llvm-project/pull/147302
6. https://github.com/llvm/llvm-project/pull/162503
7. https://github.com/llvm/llvm-project/pull/147513</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[TTI][RISCV] Add cost modelling for intrinsic vp.load.ff (#160470)"</title>
<updated>2025-09-27T00:24:56+00:00</updated>
<author>
<name>ShihPo Hung</name>
<email>shihpo.hung@sifive.com</email>
</author>
<published>2025-09-27T00:14:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2be906b25581eebbd6607a5d99943251617622cb'/>
<id>2be906b25581eebbd6607a5d99943251617622cb</id>
<content type='text'>
This reverts commit aa08b1a9963f33ded658d3ee655429e1121b5212.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit aa08b1a9963f33ded658d3ee655429e1121b5212.
</pre>
</div>
</content>
</entry>
<entry>
<title>[TTI][RISCV] Add cost modelling for intrinsic vp.load.ff (#160470)</title>
<updated>2025-09-26T08:47:10+00:00</updated>
<author>
<name>Shih-Po Hung</name>
<email>shihpo.hung@sifive.com</email>
</author>
<published>2025-09-26T08:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aa08b1a9963f33ded658d3ee655429e1121b5212'/>
<id>aa08b1a9963f33ded658d3ee655429e1121b5212</id>
<content type='text'>
Split out from #151300 to isolate TargetTransformInfo cost modelling for
fault-only-first loads from VPlan implementation details. This change
adds costing support for vp.load.ff independently of the VPlan work.

For now, model a vp.load.ff as cost-equivalent to a vp.load.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split out from #151300 to isolate TargetTransformInfo cost modelling for
fault-only-first loads from VPlan implementation details. This change
adds costing support for vp.load.ff independently of the VPlan work.

For now, model a vp.load.ff as cost-equivalent to a vp.load.</pre>
</div>
</content>
</entry>
<entry>
<title>[TTI][ASan][RISCV] reland Move InterestingMemoryOperand to Analysis and embed in MemIntrinsicInfo #157863 (#159713)</title>
<updated>2025-09-23T01:42:58+00:00</updated>
<author>
<name>Hank Chang</name>
<email>hank.chang@sifive.com</email>
</author>
<published>2025-09-23T01:42:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f8e51df8e57736d27587baaa5f56e532dfc6de26'/>
<id>f8e51df8e57736d27587baaa5f56e532dfc6de26</id>
<content type='text'>
[Previously reverted due to failures on asan-rvv-intrinsics.ll, the test
case is riscv only and it is triggered by other target]
Reland [#157863](https://github.com/llvm/llvm-project/pull/157863), and
add `; REQUIRES: riscv-registered-target` in test case to skip the
configuration that doesn't register riscv target.


Previously asan considers target intrinsics as black boxes, so asan
could not instrument accurate check. This patch make
SmallVector&lt;InterestingMemoryOperand&gt; a member of MemIntrinsicInfo so
that TTI can make targets describe their intrinsic informations to asan.

Note,
1. This patch move InterestingMemoryOperand from Transforms to Analysis.
2. Extend MemIntrinsicInfo by adding a
SmallVector&lt;InterestingMemoryOperand&gt; member.
3. This patch does not support RVV indexed/segment load/store.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Previously reverted due to failures on asan-rvv-intrinsics.ll, the test
case is riscv only and it is triggered by other target]
Reland [#157863](https://github.com/llvm/llvm-project/pull/157863), and
add `; REQUIRES: riscv-registered-target` in test case to skip the
configuration that doesn't register riscv target.


Previously asan considers target intrinsics as black boxes, so asan
could not instrument accurate check. This patch make
SmallVector&lt;InterestingMemoryOperand&gt; a member of MemIntrinsicInfo so
that TTI can make targets describe their intrinsic informations to asan.

Note,
1. This patch move InterestingMemoryOperand from Transforms to Analysis.
2. Extend MemIntrinsicInfo by adding a
SmallVector&lt;InterestingMemoryOperand&gt; member.
3. This patch does not support RVV indexed/segment load/store.</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[TTI][ASan][RISCV] Move InterestingMemoryOperand to Analysis and embed in MemIntrinsicInfo" (#159700)</title>
<updated>2025-09-19T04:13:04+00:00</updated>
<author>
<name>Florian Mayer</name>
<email>fmayer@google.com</email>
</author>
<published>2025-09-19T04:13:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=48f804d609b38f22307f2e1c1345d1e4054cb2c6'/>
<id>48f804d609b38f22307f2e1c1345d1e4054cb2c6</id>
<content type='text'>
Reverts llvm/llvm-project#157863</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reverts llvm/llvm-project#157863</pre>
</div>
</content>
</entry>
<entry>
<title>[TTI][ASan][RISCV] Move InterestingMemoryOperand to Analysis and embed in MemIntrinsicInfo (#157863)</title>
<updated>2025-09-19T03:09:41+00:00</updated>
<author>
<name>Hank Chang</name>
<email>hank.chang@sifive.com</email>
</author>
<published>2025-09-19T03:09:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f8b7f64ad2d94bbda169023f933f18b31c9b4492'/>
<id>f8b7f64ad2d94bbda169023f933f18b31c9b4492</id>
<content type='text'>
Previously asan considers target intrinsics as black boxes, so asan
could not instrument accurate check. This patch make
SmallVector&lt;InterestingMemoryOperand&gt; a member of MemIntrinsicInfo so
that TTI can make targets describe their intrinsic informations to asan.

Note,
1. This patch move InterestingMemoryOperand from Transforms to Analysis.
2. Extend MemIntrinsicInfo by adding a
SmallVector&lt;InterestingMemoryOperand&gt; member.
3. This patch does not support RVV indexed/segment load/store.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously asan considers target intrinsics as black boxes, so asan
could not instrument accurate check. This patch make
SmallVector&lt;InterestingMemoryOperand&gt; a member of MemIntrinsicInfo so
that TTI can make targets describe their intrinsic informations to asan.

Note,
1. This patch move InterestingMemoryOperand from Transforms to Analysis.
2. Extend MemIntrinsicInfo by adding a
SmallVector&lt;InterestingMemoryOperand&gt; member.
3. This patch does not support RVV indexed/segment load/store.</pre>
</div>
</content>
</entry>
<entry>
<title>[VPlan] Always consider register pressure on RISC-V (#156951)</title>
<updated>2025-09-12T06:21:54+00:00</updated>
<author>
<name>Luke Lau</name>
<email>luke@igalia.com</email>
</author>
<published>2025-09-12T06:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4bb250d6a3d63c41f5d539c9b9a162070ea5b619'/>
<id>4bb250d6a3d63c41f5d539c9b9a162070ea5b619</id>
<content type='text'>
Stacked on #156923 

In https://godbolt.org/z/8svWaredK, we spill a lot on RISC-V because
whilst the largest element type is i8, we generate a bunch of pointer
vectors for gathers and scatters. This means the VF chosen is quite high
e.g. &lt;vscale x 16 x i8&gt;, but we end up using a bunch of &lt;vscale x 16 x
i64&gt; m8 registers for the pointers.

This was briefly fixed by #132190 where we computed register pressure in
VPlan and used it to prune VFs that were likely to spill. The legacy
cost model wasn't able to do this pruning because it didn't have
visibility into the pointer vectors that were needed for the
gathers/scatters.

However VF pruning was restricted again to just the case when max
bandwidth was enabled in #141736 to avoid an AArch64 regression, and
restricted again in #149056 to only prune VFs that had max bandwidth
enabled.

On RISC-V we take advantage of register grouping for performance and
choose a default of LMUL 2, which means there are 16 registers to work
with – half the number as SVE, so we encounter higher register pressure
more frequently.

As such, we likely want to always consider pruning VFs with high
register pressure and not just the VFs from max bandwidth.

This adds a TTI hook to opt into this behaviour for RISC-V which fixes
the motivating godbolt example above. When last checked this
significantly reduces the number of spills on SPEC CPU 2017, up to
80% on 538.imagick_r.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stacked on #156923 

In https://godbolt.org/z/8svWaredK, we spill a lot on RISC-V because
whilst the largest element type is i8, we generate a bunch of pointer
vectors for gathers and scatters. This means the VF chosen is quite high
e.g. &lt;vscale x 16 x i8&gt;, but we end up using a bunch of &lt;vscale x 16 x
i64&gt; m8 registers for the pointers.

This was briefly fixed by #132190 where we computed register pressure in
VPlan and used it to prune VFs that were likely to spill. The legacy
cost model wasn't able to do this pruning because it didn't have
visibility into the pointer vectors that were needed for the
gathers/scatters.

However VF pruning was restricted again to just the case when max
bandwidth was enabled in #141736 to avoid an AArch64 regression, and
restricted again in #149056 to only prune VFs that had max bandwidth
enabled.

On RISC-V we take advantage of register grouping for performance and
choose a default of LMUL 2, which means there are 16 registers to work
with – half the number as SVE, so we encounter higher register pressure
more frequently.

As such, we likely want to always consider pruning VFs with high
register pressure and not just the VFs from max bandwidth.

This adds a TTI hook to opt into this behaviour for RISC-V which fixes
the motivating godbolt example above. When last checked this
significantly reduces the number of spills on SPEC CPU 2017, up to
80% on 538.imagick_r.</pre>
</div>
</content>
</entry>
<entry>
<title>[LV][AArch64] Prefer epilogue with fixed-width over scalable VF. (#155546)</title>
<updated>2025-09-04T18:31:30+00:00</updated>
<author>
<name>Hassnaa Hamdi</name>
<email>hassnaa.hamdi@arm.com</email>
</author>
<published>2025-09-04T18:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=35b22764e26aa02ef3ad849bb449bf7fda8e6c75'/>
<id>35b22764e26aa02ef3ad849bb449bf7fda8e6c75</id>
<content type='text'>
In case of equal costs Prefer epilogue with fixed-width over scalable VF.
That is helpful in cases like post-LTO vectorization where epilogue with
fixed-width VF can be removed when we eventually know that the trip count
is less than the epilogue iterations.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In case of equal costs Prefer epilogue with fixed-width over scalable VF.
That is helpful in cases like post-LTO vectorization where epilogue with
fixed-width VF can be removed when we eventually know that the trip count
is less than the epilogue iterations.</pre>
</div>
</content>
</entry>
</feed>
