diff options
| author | Owen Anderson <resistor@mac.com> | 2011-01-04 22:15:21 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2011-01-04 22:15:21 +0000 |
| commit | 2cf7537dc6ca7ad69e5f3a70b5b26cc5fa0cff64 (patch) | |
| tree | 6e541b1c667c21ac97562190613c45965954dcbe /lib/Transforms | |
| parent | 631ee4b89f494a3056c62f84e434e1ecf266bb8a (diff) | |
Don't bother value numbering instructions with void types in GVN. In theory this should allow us to insert
fewer things into the value numbering maps, but any speedup is beneath the noise threshold on my machine
on 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 010d6c9fdf..b7fc9c30e0 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1685,6 +1685,10 @@ bool GVN::processInstruction(Instruction *I, return false; } + // Instructions with void type don't return a value, so there's + // no point in trying to find redudancies in them. + if (I->getType()->isVoidTy()) return false; + uint32_t NextNum = VN.getNextUnusedValueNumber(); unsigned Num = VN.lookup_or_add(I); |
