If there is no clobbering access for a store inside the loop, that store
can only be hoisted if there are no interfearing loads.
A more general verification introduced here: there are no loads that are
not optimized to an access outside the loop.
Addresses PR40586.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 27966 Build 27965: arc lint + arc unit
Event Timeline
Thanks for this!
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
121 | I don't think that this will play nicely in threaded environments (ThinLTO?) An alternative might be to stick it into LICM as a member, then pass it to canSinkOrHoistInst as a param, though I don't know this code well enough to say whether that's the best approach | |
1194 | Why does optimizedness matter here? MemoryUses should always have valid defining accesses; I imagine that a valid-but-not-fully-optimal one would be good enough as long as it points outside of the loop |
I don't think that this will play nicely in threaded environments (ThinLTO?)
An alternative might be to stick it into LICM as a member, then pass it to canSinkOrHoistInst as a param, though I don't know this code well enough to say whether that's the best approach