[llvm-commits] CVS: llvm/lib/Transforms/Scalar/GVNPRE.cpp
Reid Spencer
rspencer at reidspencer.com
Wed Jun 20 19:30:01 PDT 2007
Owen Anderson wrote:
>Changes in directory llvm/lib/Transforms/Scalar:
>
>GVNPRE.cpp updated: 1.47 -> 1.48
>---
>Log message:
>
>Eliminate a redundant check. This speeds up optimization of 253.perlbmk from 13.5 seconds to 10.9 seconds.
>
>
This is speeding up run time of GVNPRE not run time of 253.perlbmk, right?
Reid
>
>---
>Diffs of the changes: (+3 -7)
>
> GVNPRE.cpp | 10 +++-------
> 1 files changed, 3 insertions(+), 7 deletions(-)
>
>
>Index: llvm/lib/Transforms/Scalar/GVNPRE.cpp
>diff -u llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.47 llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.48
>--- llvm/lib/Transforms/Scalar/GVNPRE.cpp:1.47 Wed Jun 20 19:19:05 2007
>+++ llvm/lib/Transforms/Scalar/GVNPRE.cpp Wed Jun 20 20:59:05 2007
>@@ -887,13 +887,9 @@
> // However, for opaques, such as constants within PHI nodes, it is
> // possible that they have not yet received a number. Make sure they do
> // so now.
>- uint32_t valNum = 0;
>- if (isa<BinaryOperator>(*I) || isa<CmpInst>(*I))
>- valNum = VN.lookup(*I);
>- else
>- valNum = VN.lookup_or_add(*I);
>- if (find_leader(anticIn, valNum) == 0)
>- val_insert(anticIn, *I);
>+ if (!isa<BinaryOperator>(*I) && !isa<CmpInst>(*I))
>+ VN.lookup_or_add(*I);
>+ val_insert(anticIn, *I);
> }
>
> clean(anticIn);
>
>
>
>_______________________________________________
>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