diff options
| author | Rouzbeh <rouzbeh.paktinat1@huawei.com> | 2024-05-27 09:54:39 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 09:54:39 -0400 |
| commit | 670259466b238176ac302c8dedf806d2b2be7e0c (patch) | |
| tree | 48e7a33737f463307c24a515c5e065d732a4642f /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 21ee27877a87185199d150f9a49f2d3337bad86e (diff) | |
[LoopCacheAnalysis] Fix loop cache cost to always round the cost up to the nearest integer number (#88915)
Currently loop cache analysis uses following formula to evaluate cost of
an RefGroup for a consecutive memory access:
`RefCost=(TripCount*Stride)/CLS`
This cost evaluates to zero when `TripCount*Stride` is smaller than
cache-line-size. This results in wrong cost value for a loop and
misleads loopInterchange decisions as shown in [this
case](https://llvm.godbolt.org/z/jTz1vn4hn).
This patch fixes the problem by rounding the cost to 1 once this problem
happens.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
