[LCSSA] Simplify a loop. NFCI.

llvm-svn: 300433
This commit is contained in:
Davide Italiano 2017-04-17 00:02:45 +00:00
parent da886c665b
commit ee654bf5f1
1 changed files with 3 additions and 7 deletions

View File

@ -214,13 +214,9 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl<Instruction *> &Worklist,
// Post process PHI instructions that were inserted into another disjoint
// loop and update their exits properly.
for (auto *PostProcessPN : PostProcessPHIs) {
if (PostProcessPN->use_empty())
continue;
// Reprocess each PHI instruction.
Worklist.push_back(PostProcessPN);
}
for (auto *PostProcessPN : PostProcessPHIs)
if (!PostProcessPN->use_empty())
Worklist.push_back(PostProcessPN);
// Keep track of PHI nodes that we want to remove because they did not have
// any uses rewritten.