AFAICT, this is the same approach taken in MemorySSA.
PTAL,
Chad
Differential D25969
[AliasSetTracker] Make AST smarter about intrinsics that don't actually affect memory. mcrosier on Oct 25 2016, 2:56 PM. Authored by
Details AFAICT, this is the same approach taken in MemorySSA. PTAL,
Diff Detail
Event Timeline
Comment Actions This caused a failure on all PPC machines I have access to: Comment Actions This is definitely calling ASAN failures. My best guess, and just a guess, is that elimination is happening so that you have something like: lifetime.start(%a) and earlycse is now changing this to: lifetime.start(%a) without extending the lifetime markers Comment Actions I believe I've figured out the underlying problem. In short, LICM is relying on lifetime markers to prevent loads/stores from being moved out of a particular scope. From the broken test case: // Variable goes in and out of scope. for (int i = 0; i < 3; ++i) { int x[3] = {i, i, i}; p = x + i; } return *p; // BOOM } LICM will sink the stores to x[3] after the loop, which is obviously incorrect. I've reverted the change in r285227. Sorry for the breakage. |