[llvm] 2c4d524 - [Transforms/Utils] Use predecessors (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 00:16:19 PDT 2022


Author: Kazu Hirata
Date: 2022-06-05T00:16:14-07:00
New Revision: 2c4d52467a25aed5ec9ed868fe8b74a1a67d1535

URL: https://github.com/llvm/llvm-project/commit/2c4d52467a25aed5ec9ed868fe8b74a1a67d1535
DIFF: https://github.com/llvm/llvm-project/commit/2c4d52467a25aed5ec9ed868fe8b74a1a67d1535.diff

LOG: [Transforms/Utils] Use predecessors (NFC)

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/Local.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index a0609750852bd..42cdece2d5e3a 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -1126,7 +1126,7 @@ bool llvm::TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB,
     // If there is more than one pred of succ, and there are PHI nodes in
     // the successor, then we need to add incoming edges for the PHI nodes
     //
-    const PredBlockVector BBPreds(pred_begin(BB), pred_end(BB));
+    const PredBlockVector BBPreds(predecessors(BB));
 
     // Loop over all of the PHI nodes in the successor of BB.
     for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {


        


More information about the llvm-commits mailing list