diff options
| author | zGoldthorpe <zgoldtho@ualberta.ca> | 2025-07-01 15:46:19 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-01 17:46:19 -0400 |
| commit | f393211454a23bc06de76c00b8c2d96b72fe4530 (patch) | |
| tree | 739adb914bab69ef38841287aa50b2218731b18c /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | d99b14623f430fc141c583041f6a255ccdb2ac0e (diff) | |
[Reland][IPO] Added attributor for identifying invariant loads (#146584)
Patched and tested the `AAInvariantLoadPointer` attributor from #141800,
which identifies pointers whose loads are eligible to be marked as
`!invariant.load`.
The bug in the attributor was due to `AAMemoryBehavior` always
identifying pointers obtained from `alloca`s as having no writes. I'm
not entirely sure why `AAMemoryBehavior` behaves this way, but it seems
to be beceause it identifies the scope of an `alloca` to be limited to
only that instruction (and, certainly, no memory writes occur within the
`alloca` instructin). This patch just adds a check to disallow all loads
from `alloca` pointers from being marked `!invariant.load` (since any
well-defined program will have to write to stack pointers at some
point).
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
