When calling getClobberingMemoryAccess() with MemoryLocation on a MemoryPHI starting access, the walker currently immediately bails and returns the starting access. This makes sense for the API that does not accept a location (as we wouldn't know what clobber we should be checking for), but doesn't make sense for the MemoryLocation-based API. This means that it can't look through a MemoryPHI if it's the starting access, but can if there is one more non-clobbering def in between. This patch removes the limitation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Analysis/MemorySSA.cpp | ||
---|---|---|
2405 | The code previously fetched the defining access for MemoryUses, but imho this doesn't make sense for this API, which accepts a defining access as the starting point, unlike the other one. |
The code previously fetched the defining access for MemoryUses, but imho this doesn't make sense for this API, which accepts a defining access as the starting point, unlike the other one.