summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-23 20:52:00 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-23 20:52:00 +0000
commit54690dcdb00d73e7136aade84949666a7047f8cc (patch)
tree01f4e6d2daa4feff8afa19a9bfeb161cf9c59f32
parentdf2ab917ad82577fc9efe128f0819123518d9f64 (diff)
downloadbcm5719-llvm-54690dcdb00d73e7136aade84949666a7047f8cc.tar.gz
bcm5719-llvm-54690dcdb00d73e7136aade84949666a7047f8cc.zip
[ValueTracking] Use a function_ref to avoid multiple instantiations
No functional change intended, this should just be a code size improvement. llvm-svn: 279563
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index c9fc4d4a825..7f62a2685f4 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -782,11 +782,11 @@ static void computeKnownBitsFromAssume(const Value *V, APInt &KnownZero,
// shift amount, compute the implied known-zero or known-one bits of the shift
// operator's result respectively for that shift amount. The results from calling
// KZF and KOF are conservatively combined for all permitted shift amounts.
-template <typename KZFunctor, typename KOFunctor>
-static void computeKnownBitsFromShiftOperator(const Operator *I,
- APInt &KnownZero, APInt &KnownOne,
- APInt &KnownZero2, APInt &KnownOne2,
- unsigned Depth, const Query &Q, KZFunctor KZF, KOFunctor KOF) {
+static void computeKnownBitsFromShiftOperator(
+ const Operator *I, APInt &KnownZero, APInt &KnownOne, APInt &KnownZero2,
+ APInt &KnownOne2, unsigned Depth, const Query &Q,
+ function_ref<APInt(const APInt &, unsigned)> KZF,
+ function_ref<APInt(const APInt &, unsigned)> KOF) {
unsigned BitWidth = KnownZero.getBitWidth();
if (auto *SA = dyn_cast<ConstantInt>(I->getOperand(1))) {
OpenPOWER on IntegriCloud