From 589655015f28d26e32f4a6e7e7b5ce031e20439b Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Tue, 23 Aug 2016 20:52:00 +0000 Subject: [PATCH] [ValueTracking] Use a function_ref to avoid multiple instantiations No functional change intended, this should just be a code size improvement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279563 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/ValueTracking.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Analysis/ValueTracking.cpp b/lib/Analysis/ValueTracking.cpp index c9fc4d4a825..7f62a2685f4 100644 --- a/lib/Analysis/ValueTracking.cpp +++ b/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))) { -- 2.11.0