summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-03-31 18:14:00 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-03-31 18:14:00 +0000
commit80c540e656c536918b7c3d6966cf745358ce18b3 (patch)
tree51cf37feed6062f5d3d73331e1393c806e9c436c /llvm/lib/Analysis/ValueTracking.cpp
parent51861b4855853158b9b35d78d46000af8cc1f500 (diff)
downloadbcm5719-llvm-80c540e656c536918b7c3d6966cf745358ce18b3.tar.gz
bcm5719-llvm-80c540e656c536918b7c3d6966cf745358ce18b3.zip
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. llvm-svn: 153817
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 17bad941e50..1784f008d5b 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -197,8 +197,8 @@ static void ComputeMaskedBitsMul(Value *Op0, Value *Op1, bool NSW,
KnownOne.setBit(BitWidth - 1);
}
-static void computeMaskedBitsLoad(const MDNode &Ranges, const APInt &Mask,
- APInt &KnownZero) {
+void llvm::computeMaskedBitsLoad(const MDNode &Ranges, const APInt &Mask,
+ APInt &KnownZero) {
unsigned BitWidth = Mask.getBitWidth();
unsigned NumRanges = Ranges.getNumOperands() / 2;
assert(NumRanges >= 1);
OpenPOWER on IntegriCloud