mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 08:25:27 +00:00
LCSSA: Add a workaround for another nasty SCEV cache invalidation issue.
I'm not entirely happy with this solution, but I don't see a smarter way currently. Fixes PR14214. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167112 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -255,6 +255,11 @@ bool LCSSA::ProcessInstruction(Instruction *Inst,
|
||||
if (Loop *L = LI->getLoopFor(ExitBB))
|
||||
SE->forgetLoop(L);
|
||||
}
|
||||
|
||||
// If we added a PHI, drop the cache to avoid invalidating SCEV caches.
|
||||
// FIXME: This is a big hammer, can we clear the cache more selectively?
|
||||
if (SE && !AddedPHIs.empty())
|
||||
SE->forgetLoop(L);
|
||||
|
||||
// Rewrite all uses outside the loop in terms of the new PHIs we just
|
||||
// inserted.
|
||||
|
Reference in New Issue
Block a user