diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-31 18:14:00 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-31 18:14:00 +0000 |
commit | 95d594cac3737ae1594a391276942a443cac426b (patch) | |
tree | 169dda5061241d6c695ce797a8d8f84887d5b43f /include/llvm/Analysis/ValueTracking.h | |
parent | 5b00ceaeeabff8c25abb09926343c3fcb06053d8 (diff) | |
download | llvm-95d594cac3737ae1594a391276942a443cac426b.tar.gz llvm-95d594cac3737ae1594a391276942a443cac426b.tar.bz2 llvm-95d594cac3737ae1594a391276942a443cac426b.tar.xz |
Teach CodeGen's version of computeMaskedBits to understand the range metadata.
This is the CodeGen equivalent of r153747. I tested that there is not noticeable
performance difference with any combination of -O0/-O2 /-g when compiling
gcc as a single compilation unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ValueTracking.h')
-rw-r--r-- | include/llvm/Analysis/ValueTracking.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index dfd774b916..68ea8a105d 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -24,7 +24,8 @@ namespace llvm { class APInt; class TargetData; class StringRef; - + class MDNode; + /// ComputeMaskedBits - Determine which of the bits specified in Mask are /// known to be either zero or one and return them in the KnownZero/KnownOne /// bit sets. This code only analyzes bits in Mask, in order to short-circuit @@ -38,7 +39,9 @@ namespace llvm { void ComputeMaskedBits(Value *V, const APInt &Mask, APInt &KnownZero, APInt &KnownOne, const TargetData *TD = 0, unsigned Depth = 0); - + void computeMaskedBitsLoad(const MDNode &Ranges, const APInt &Mask, + APInt &KnownZero); + /// ComputeSignBit - Determine whether the sign bit is known to be zero or /// one. Convenience wrapper around ComputeMaskedBits. void ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne, |