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:
Jim Grosbach 2009-11-19 02:03:18 +00:00
parent cc69a1ba9a
commit dcef55b2ef
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}