mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +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:
@@ -514,8 +514,9 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
|
||||
assert(NumPreds < PN->getNumIncomingValues());
|
||||
// Count how many times each predecessor comes to this block.
|
||||
std::map<BasicBlock*, unsigned> PredCount;
|
||||
for (BasicBlock *Pred : predecessors(NewBB))
|
||||
--PredCount[Pred];
|
||||
for (pred_iterator PI = pred_begin(NewBB), E = pred_end(NewBB);
|
||||
PI != E; ++PI)
|
||||
--PredCount[*PI];
|
||||
|
||||
// Figure out how many entries to remove from each PHI.
|
||||
for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
|
||||
|
||||
Reference in New Issue
Block a user