From a2025eaaef419727f77fe7cfc2b6b1aea4fa0a8d Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 24 May 2017 16:53:03 +0000 Subject: [PATCH] [ValueTracking] Add OptimizationRemarkEmitter to the other signature for commuteKnownBits. This is needed for an upcoming patch. llvm-svn: 303772 --- llvm/include/llvm/Analysis/ValueTracking.h | 3 ++- llvm/lib/Analysis/ValueTracking.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h index cf24062..b1ee761 100644 --- a/llvm/include/llvm/Analysis/ValueTracking.h +++ b/llvm/include/llvm/Analysis/ValueTracking.h @@ -60,7 +60,8 @@ template class ArrayRef; KnownBits computeKnownBits(const Value *V, const DataLayout &DL, unsigned Depth = 0, AssumptionCache *AC = nullptr, const Instruction *CxtI = nullptr, - const DominatorTree *DT = nullptr); + const DominatorTree *DT = nullptr, + OptimizationRemarkEmitter *ORE = nullptr); /// Compute known bits from the range metadata. /// \p KnownZero the set of bits that are known to be zero /// \p KnownOne the set of bits that are known to be one diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 8e6c109..bd79cd5 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -149,8 +149,10 @@ static KnownBits computeKnownBits(const Value *V, unsigned Depth, KnownBits llvm::computeKnownBits(const Value *V, const DataLayout &DL, unsigned Depth, AssumptionCache *AC, const Instruction *CxtI, - const DominatorTree *DT) { - return ::computeKnownBits(V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT)); + const DominatorTree *DT, + OptimizationRemarkEmitter *ORE) { + return ::computeKnownBits(V, Depth, + Query(DL, AC, safeCxtI(V, CxtI), DT, ORE)); } bool llvm::haveNoCommonBitsSet(const Value *LHS, const Value *RHS, -- 2.7.4