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
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks for this!
lib/Transforms/Scalar/LICM.cpp | ||
---|---|---|
121 ↗ | (On Diff #186012) | 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 ↗ | (On Diff #186012) | 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 |