diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-11 21:05:34 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-11 21:05:34 +0000 |
commit | 61488a331088cea2e14de1d164f03f0169e9416b (patch) | |
tree | 14b7898ca7e624a41a9bfb324afc3916d3873e86 | |
parent | 9a12a786b0cb2acf9a87a37d6969064cedc39fd0 (diff) | |
download | external_llvm-61488a331088cea2e14de1d164f03f0169e9416b.zip external_llvm-61488a331088cea2e14de1d164f03f0169e9416b.tar.gz external_llvm-61488a331088cea2e14de1d164f03f0169e9416b.tar.bz2 |
temporarily revert previous patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83791 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 9d88354..06a5660 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -12681,9 +12681,6 @@ static void AddReachableCodeToWorklist(BasicBlock *BB, const TargetData *TD) { SmallVector<BasicBlock*, 256> Worklist; Worklist.push_back(BB); - - std::vector<Instruction*> InstrsForInstCombineWorklist; - InstrsForInstCombineWorklist.reserve(128); while (!Worklist.empty()) { BB = Worklist.back(); @@ -12730,7 +12727,7 @@ static void AddReachableCodeToWorklist(BasicBlock *BB, DBI_Prev = 0; } - InstrsForInstCombineWorklist.push_back(Inst); + IC.Worklist.Add(Inst); } // 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) 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) { |