forked from OSchip/llvm-project
Eliminate duplicate phi nodes in loops. Loop rotation, for example, can introduce these, and it's beneficial to later passes to clean them up.
llvm-svn: 89298
This commit is contained in:
parent
cc69a1ba9a
commit
dcef55b2ef
|
@ -305,6 +305,12 @@ ReprocessLoop:
|
|||
}
|
||||
}
|
||||
|
||||
// If there are duplicate phi nodes (for example, from loop rotation),
|
||||
// get rid of them.
|
||||
for (Loop::block_iterator BB = L->block_begin(), E = L->block_end();
|
||||
BB != E; ++BB)
|
||||
EliminateDuplicatePHINodes(*BB);
|
||||
|
||||
return Changed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue