mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213562 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -91,8 +91,9 @@ static SetVector<BasicBlock *> buildExtractionBlockSet(IteratorT BBBegin,
|
||||
for (SetVector<BasicBlock *>::iterator I = std::next(Result.begin()),
|
||||
E = Result.end();
|
||||
I != E; ++I)
|
||||
for (BasicBlock *Pred : predecessors(*I))
|
||||
assert(Result.count(Pred) &&
|
||||
for (pred_iterator PI = pred_begin(*I), PE = pred_end(*I);
|
||||
PI != PE; ++PI)
|
||||
assert(Result.count(*PI) &&
|
||||
"No blocks in this region may have entries from outside the region"
|
||||
" except for the first block!");
|
||||
#endif
|
||||
@ -720,9 +721,9 @@ Function *CodeExtractor::extractCodeRegion() {
|
||||
SmallPtrSet<BasicBlock *, 1> ExitBlocks;
|
||||
for (SetVector<BasicBlock *>::iterator I = Blocks.begin(), E = Blocks.end();
|
||||
I != E; ++I)
|
||||
for (BasicBlock *Succ : successors(*I))
|
||||
if (!Blocks.count(Succ))
|
||||
ExitBlocks.insert(Succ);
|
||||
for (succ_iterator SI = succ_begin(*I), SE = succ_end(*I); SI != SE; ++SI)
|
||||
if (!Blocks.count(*SI))
|
||||
ExitBlocks.insert(*SI);
|
||||
NumExitBlocks = ExitBlocks.size();
|
||||
|
||||
// Construct new function based on inputs/outputs & add allocas for all defs.
|
||||
|
Reference in New Issue
Block a user