[llvm-commits] [llvm] r139023 - in /llvm/trunk/lib/Transforms: InstCombine/InstructionCombining.cpp Scalar/SCCP.cpp
Duncan Sands
baldrick at free.fr
Fri Sep 2 11:46:28 PDT 2011
Hi Bill,
> Update comments to reflect reality.
why not delete them backwards? It seems to be advantageous.
Ciao, Duncan.
>
> Modified:
> llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
> llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
>
> Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=139023&r1=139022&r2=139023&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
> +++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Fri Sep 2 13:43:33 2011
> @@ -1574,8 +1574,7 @@
> for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
> if (Visited.count(BB)) continue;
>
> - // Delete the instructions backwards, as it has a reduced likelihood of
> - // having to update as many def-use and use-def chains.
> + // Delete the instructions.
> for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
> Instruction *Inst =&*I++;
> if (isa<TerminatorInst>(Inst))
>
> Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=139023&r1=139022&r2=139023&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Fri Sep 2 13:43:33 2011
> @@ -1686,8 +1686,7 @@
> if (isa<TerminatorInst>(BB->begin()))
> return;
>
> - // Delete the instructions backwards, as it has a reduced likelihood of
> - // having to update as many def-use and use-def chains.
> + // Delete the instructions.
> for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
> Instruction *Inst =&*I++;
> if (isa<TerminatorInst>(Inst))
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list