From 54690dcdb00d73e7136aade84949666a7047f8cc Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 23 Aug 2016 20:52:00 +0000 Subject: [ValueTracking] Use a function_ref to avoid multiple instantiations No functional change intended, this should just be a code size improvement. llvm-svn: 279563 --- llvm/lib/Analysis/ValueTracking.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Analysis/ValueTracking.cpp') diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index c9fc4d4..7f62a26 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 -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 KZF, + function_ref KOF) { unsigned BitWidth = KnownZero.getBitWidth(); if (auto *SA = dyn_cast(I->getOperand(1))) { -- cgit v1.1