From ee654bf5f199dbed8c7378e58e5f3ec9968d1f71 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Mon, 17 Apr 2017 00:02:45 +0000 Subject: [PATCH] [LCSSA] Simplify a loop. NFCI. llvm-svn: 300433 --- llvm/lib/Transforms/Utils/LCSSA.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp index d2bf206..1042b97 100644 --- a/llvm/lib/Transforms/Utils/LCSSA.cpp +++ b/llvm/lib/Transforms/Utils/LCSSA.cpp @@ -214,13 +214,9 @@ bool llvm::formLCSSAForInstructions(SmallVectorImpl &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. -- 2.7.4