mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-26 13:36:28 +00:00
Tell ScalarEvolution to forget everything it knows about a loop before
rotating the loop, since loop rotation is a very significant change. llvm-svn: 82901
This commit is contained in:
parent
eb9dbb2bd2
commit
fa43cefae4
@ -177,6 +177,11 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) {
|
||||
|
||||
// Now, this loop is suitable for rotation.
|
||||
|
||||
// Anything ScalarEvolution may know about this loop or the PHI nodes
|
||||
// in its header will soon be invalidated.
|
||||
if (ScalarEvolution *SE = getAnalysisIfAvailable<ScalarEvolution>())
|
||||
SE->forgetLoopBackedgeTakenCount(L);
|
||||
|
||||
// Find new Loop header. NewHeader is a Header's one and only successor
|
||||
// that is inside loop. Header's other successor is outside the
|
||||
// loop. Otherwise loop is not suitable for rotation.
|
||||
|
Loading…
Reference in New Issue
Block a user