summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-21 17:06:51 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-07-21 17:06:51 +0000
commit6c99015fe2c1814f793530adc96f48050081612e (patch)
tree6dd9bd97817fed538386fcedbf363d38470ace2a /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent1aaad6970cee96c214cc663bc7ae2cecb6fd1e7c (diff)
downloadbcm5719-llvm-6c99015fe2c1814f793530adc96f48050081612e.tar.gz
bcm5719-llvm-6c99015fe2c1814f793530adc96f48050081612e.zip
Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."
This reverts commit r213474 (and r213475), which causes a miscompile on a stage2 LTO build. I'll reply on the list in a moment. llvm-svn: 213562
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index ce420ee4bf0..a96c46ad63e 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -66,8 +66,9 @@ static void ConnectProlog(Loop *L, Value *TripCount, unsigned Count,
// The new PHI node is inserted in the prolog end basic block.
// The new PHI name is added as an operand of a PHI node in either
// the loop header or the loop exit block.
- for (BasicBlock *Succ : successors(Latch)) {
- for (BasicBlock::iterator BBI = Succ->begin();
+ for (succ_iterator SBI = succ_begin(Latch), SBE = succ_end(Latch);
+ SBI != SBE; ++SBI) {
+ for (BasicBlock::iterator BBI = (*SBI)->begin();
PHINode *PN = dyn_cast<PHINode>(BBI); ++BBI) {
// Add a new PHI node to the prolog end block and add the
OpenPOWER on IntegriCloud