summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-03-25 06:52:52 +0000
committerCraig Topper <craig.topper@gmail.com>2017-03-25 06:52:52 +0000
commit47596dd4ccd3a46c626bab21b8bdfe2901368ddc (patch)
tree133037a245c15e0b20e0009346cace6100c1eed8 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parent19d8c1fed2ff39bf55bc0bf5ccd08f4be2218f73 (diff)
downloadbcm5719-llvm-47596dd4ccd3a46c626bab21b8bdfe2901368ddc.tar.gz
bcm5719-llvm-47596dd4ccd3a46c626bab21b8bdfe2901368ddc.zip
[InstCombine] Change the interface of SimplifyDemandedBits so that it takes the instruction and operand instead of the Use.
The first thing it did was get the User for the Use to get the instruction back. This requires looking through the Uses for the User using the waymarking walk. That's pretty fast, but its probably still better to just pass the Instruction we already had. llvm-svn: 298772
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 0a3382e1903..6e89c58b282 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -539,7 +539,8 @@ private:
Value *SimplifyDemandedUseBits(Value *V, APInt DemandedMask, APInt &KnownZero,
APInt &KnownOne, unsigned Depth,
Instruction *CxtI);
- bool SimplifyDemandedBits(Use &U, const APInt &DemandedMask, APInt &KnownZero,
+ bool SimplifyDemandedBits(Instruction *I, unsigned Op,
+ const APInt &DemandedMask, APInt &KnownZero,
APInt &KnownOne, unsigned Depth = 0);
/// Helper routine of SimplifyDemandedUseBits. It tries to simplify demanded
/// bit for "r1 = shr x, c1; r2 = shl r1, c2" instruction sequence.
OpenPOWER on IntegriCloud