Treat assume intrinsics as not reading/writing memory despite
AA->getModRefInfo() saying they do, as is done in BasicAliasAnalysis.
Details
- Reviewers
george.burgess.iv • dberlin
Diff Detail
Event Timeline
So, should we not just move this into getModRefInfo?
(It seems like general applicable alias knowledge that requires no
computation)
I looked at that briefly, and I think that would have additional impact that we may not want. For example, it looked to me like changing getModRefInfo to ignore llvm.assume would cause LICM to hoist/sink assumes which seems at first glance to potentially be bad.
It seems like we should just fix that?
I see why it would do that, but it seems it doesn't separate whether it can
sink thinks with whether it should :)
(Note: there should be no other users, AFAIK, since i added this version of
getModRefInfo)
I can give it a shot. The LICM case might be a false alarm, since I believe it will also check isSafeToSpeculativelyExecute before hoisting/sinking, which should return false for llvm.assume.