[PATCH] D19730: [BasicAA] Treat llvm.assume as not accessing memory in getModRefBehavior(Function)
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 12:39:01 PDT 2016
Hal Finkel wrote:
> I understand. However, without our current system, this still obviously
> needs to be correct. What is to prevent a pass from (correctly) seeing
> the call to assume, using AA to conclude it does not actually alter
> memory, seeing it has no return values, intrinsics don't throw, and so
Intrinsics are allowed to throw -- statepoints, patchpoints, guard
intrinsics and the deoptimize intrinsic are all defined to be throwing.
If all of LLVM respects the "can unwind" property, then we should be
able to mark assume as "readnone" and be done with it. I'm just not
sure that there aren't places in LLVM that assume (no pun intended!)
readnone functions are inherently nounwind.
-- Sanjoy
More information about the llvm-commits
mailing list