mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 07:31:53 +00:00
temporarily revert previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83791 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9a12a786b0
commit
61488a3310
@ -12682,9 +12682,6 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
|
|||||||
SmallVector<BasicBlock*, 256> Worklist;
|
SmallVector<BasicBlock*, 256> Worklist;
|
||||||
Worklist.push_back(BB);
|
Worklist.push_back(BB);
|
||||||
|
|
||||||
std::vector<Instruction*> InstrsForInstCombineWorklist;
|
|
||||||
InstrsForInstCombineWorklist.reserve(128);
|
|
||||||
|
|
||||||
while (!Worklist.empty()) {
|
while (!Worklist.empty()) {
|
||||||
BB = Worklist.back();
|
BB = Worklist.back();
|
||||||
Worklist.pop_back();
|
Worklist.pop_back();
|
||||||
@ -12730,7 +12727,7 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
|
|||||||
DBI_Prev = 0;
|
DBI_Prev = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
InstrsForInstCombineWorklist.push_back(Inst);
|
IC.Worklist.Add(Inst);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recursively visit successors. If this is a branch or switch on a
|
// Recursively visit successors. If this is a branch or switch on a
|
||||||
@ -12762,16 +12759,6 @@ static void AddReachableCodeToWorklist(BasicBlock *BB,
|
|||||||
for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i)
|
for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i)
|
||||||
Worklist.push_back(TI->getSuccessor(i));
|
Worklist.push_back(TI->getSuccessor(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Once we've found all of the instructions to add to instcombine's worklist,
|
|
||||||
// add them in reverse order. This way instcombine will visit from the top
|
|
||||||
// of the function down. This jives well with the way that it adds all uses
|
|
||||||
// of instructions to the worklist after doing a transformation, thus avoiding
|
|
||||||
// some N^2 behavior in pathological cases.
|
|
||||||
for (std::vector<Instruction*>::reverse_iterator
|
|
||||||
I = InstrsForInstCombineWorklist.rbegin(),
|
|
||||||
E = InstrsForInstCombineWorklist.rend(); I != E; ++I)
|
|
||||||
IC.Worklist.Add(*I);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||||
|
Loading…
Reference in New Issue
Block a user