summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2017-07-26 19:03:18 +0000
committerAdam Nemet <anemet@apple.com>2017-07-26 19:03:18 +0000
commitea06e6e86558e3347b9abac5188b16140733c3de (patch)
tree02de3d93bf6e1598f39aa9245bb81a9c0cdf70fe /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parentd1fefa3d7cfebb468a2280b73895cd1e2ad70e82 (diff)
downloadbcm5719-llvm-ea06e6e86558e3347b9abac5188b16140733c3de.tar.gz
bcm5719-llvm-ea06e6e86558e3347b9abac5188b16140733c3de.zip
Migrate SimplifyLibCalls to new OptimizationRemarkEmitter
Summary: This changes SimplifyLibCalls to use the new OptimizationRemarkEmitter API. In fact, as SimplifyLibCalls is only ever called via InstCombine, (as far as I can tell) the OptimizationRemarkEmitter is added there, and then passed through to SimplifyLibCalls later. I have avoided changing any remark text. This closes PR33787 Patch by Sam Elliott! Reviewers: anemet, davide Reviewed By: anemet Subscribers: davide, mehdi_amini, eraman, fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D35608 llvm-svn: 309158
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index c38a4981bf1..e3dfc66d1b8 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -42,6 +42,7 @@ class TargetLibraryInfo;
class DbgDeclareInst;
class MemIntrinsic;
class MemSetInst;
+class OptimizationRemarkEmitter;
/// Assign a complexity or rank value to LLVM Values. This is used to reduce
/// the amount of pattern matching needed for compares and commutative
@@ -226,6 +227,7 @@ private:
DominatorTree &DT;
const DataLayout &DL;
const SimplifyQuery SQ;
+ OptimizationRemarkEmitter &ORE;
// Optional analyses. When non-null, these can both be used to do better
// combining and will be updated to reflect any changes.
LoopInfo *LI;
@@ -236,10 +238,11 @@ public:
InstCombiner(InstCombineWorklist &Worklist, BuilderTy &Builder,
bool MinimizeSize, bool ExpensiveCombines, AliasAnalysis *AA,
AssumptionCache &AC, TargetLibraryInfo &TLI, DominatorTree &DT,
- const DataLayout &DL, LoopInfo *LI)
+ OptimizationRemarkEmitter &ORE, const DataLayout &DL,
+ LoopInfo *LI)
: Worklist(Worklist), Builder(Builder), MinimizeSize(MinimizeSize),
ExpensiveCombines(ExpensiveCombines), AA(AA), AC(AC), TLI(TLI), DT(DT),
- DL(DL), SQ(DL, &TLI, &DT, &AC), LI(LI), MadeIRChange(false) {}
+ DL(DL), SQ(DL, &TLI, &DT, &AC), ORE(ORE), LI(LI), MadeIRChange(false) {}
/// \brief Run the combiner over the entire worklist until it is empty.
///
OpenPOWER on IntegriCloud