[PATCH] D28834: Improve what can be promoted in LICM.
Xin Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 15:35:41 PST 2017
trentxintong added inline comments.
Comment at: test/Transforms/LICM/scalar-promote-unwind.ll:211
+ invoke void @boo_with_arg(i32* %0)
+ to label %invoke.cont unwind label %lpad
> This doesn't really test what you want it to... it would fail the aliasing test anyway.
> Actually, hmm, it's hard to come up with a practical test where the PointerMayBeCaptured check is actually necessary: you need a call which could throw, but provably doesn't access a malloc whose address is captured... our current AA infrastructure can't prove something like that given the way C++ unwinding works. I guess you could construct an artificial IR testcase with a call that's readnone but not nothrow.
yea, thats what i can think off right now. the problem is if the ptr escapes, then the function that actually throws will potentially be able to read/write it ...
More information about the llvm-commits