diff options
| author | David Blaikie <dblaikie@gmail.com> | 2018-04-24 15:40:07 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2018-04-24 15:40:07 +0000 |
| commit | ba47dd16c5711ae05ae623d19cd11261c1fe402c (patch) | |
| tree | f45ae28fd902234a2185aa465062e36c4d75c90b /llvm | |
| parent | f85f5da3b2acfde2ff8a83a917db9ae1319329c2 (diff) | |
| download | bcm5719-llvm-ba47dd16c5711ae05ae623d19cd11261c1fe402c.tar.gz bcm5719-llvm-ba47dd16c5711ae05ae623d19cd11261c1fe402c.zip | |
Fix some layering in AggressiveInstCombine (avoiding inclusion of Scalar.h)
llvm-svn: 330726
Diffstat (limited to 'llvm')
6 files changed, 16 insertions, 16 deletions
diff --git a/llvm/include/llvm/LinkAllPasses.h b/llvm/include/llvm/LinkAllPasses.h index 49d94b0374f..d3d1841819f 100644 --- a/llvm/include/llvm/LinkAllPasses.h +++ b/llvm/include/llvm/LinkAllPasses.h @@ -39,6 +39,7 @@ #include "llvm/IR/Function.h" #include "llvm/IR/IRPrintingPasses.h" #include "llvm/Support/Valgrind.h" +#include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/AlwaysInliner.h" #include "llvm/Transforms/IPO/FunctionAttrs.h" diff --git a/llvm/include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h b/llvm/include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h index a318d18ab31..f970acdc741 100644 --- a/llvm/include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h +++ b/llvm/include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h @@ -10,8 +10,8 @@ /// /// This file provides the primary interface to the aggressive instcombine pass. /// This pass is suitable for use in the new pass manager. For a pass that works -/// with the legacy pass manager, please look for -/// \c createAggressiveInstCombinerPass() in Scalar.h. +/// with the legacy pass manager, please use +/// \c createAggressiveInstCombinerPass(). /// //===----------------------------------------------------------------------===// @@ -29,6 +29,13 @@ class AggressiveInstCombinePass public: PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); }; + +//===----------------------------------------------------------------------===// +// +// AggressiveInstCombiner - Combine expression patterns to form expressions with +// fewer, simple instructions. This pass does not modify the CFG. +// +FunctionPass *createAggressiveInstCombinerPass(); } #endif diff --git a/llvm/include/llvm/Transforms/Scalar.h b/llvm/include/llvm/Transforms/Scalar.h index 0fca26b749e..599332d03e0 100644 --- a/llvm/include/llvm/Transforms/Scalar.h +++ b/llvm/include/llvm/Transforms/Scalar.h @@ -80,7 +80,6 @@ FunctionPass *createDeadStoreEliminationPass(); // values. FunctionPass *createCallSiteSplittingPass(); - //===----------------------------------------------------------------------===// // // AggressiveDCE - This pass uses the SSA based Aggressive DCE algorithm. This @@ -89,7 +88,6 @@ FunctionPass *createCallSiteSplittingPass(); // FunctionPass *createAggressiveDCEPass(); - //===----------------------------------------------------------------------===// // // GuardWidening - An optimization over the @llvm.experimental.guard intrinsic @@ -128,13 +126,6 @@ Pass *createIndVarSimplifyPass(); //===----------------------------------------------------------------------===// // -// AggressiveInstCombiner - Combine expression patterns to form expressions with -// fewer, simple instructions. This pass does not modify the CFG. -// -FunctionPass *createAggressiveInstCombinerPass(); - -//===----------------------------------------------------------------------===// -// // LICM - This pass is a loop invariant code motion and memory promotion pass. // Pass *createLICMPass(); diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp index 27d2fb0f8e0..49656ba3d2f 100644 --- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp +++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp @@ -21,8 +21,8 @@ #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/IR/DataLayout.h" #include "llvm/IR/Dominators.h" +#include "llvm/IR/LegacyPassManager.h" #include "llvm/Pass.h" -#include "llvm/Transforms/Scalar.h" using namespace llvm; #define DEBUG_TYPE "aggressive-instcombine" @@ -123,3 +123,7 @@ void LLVMInitializeAggressiveInstCombiner(LLVMPassRegistryRef R) { FunctionPass *llvm::createAggressiveInstCombinerPass() { return new AggressiveInstCombinerLegacyPass(); } + +void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM) { + unwrap(PM)->add(createAggressiveInstCombinerPass()); +} diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index e85a9279a92..997ae616114 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -29,6 +29,7 @@ #include "llvm/IR/Verifier.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/ManagedStatic.h" +#include "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/ForceFunctionAttrs.h" #include "llvm/Transforms/IPO/FunctionAttrs.h" diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp index 526061f8757..24cbdc799d2 100644 --- a/llvm/lib/Transforms/Scalar/Scalar.cpp +++ b/llvm/lib/Transforms/Scalar/Scalar.cpp @@ -114,10 +114,6 @@ void LLVMAddAggressiveDCEPass(LLVMPassManagerRef PM) { unwrap(PM)->add(createAggressiveDCEPass()); } -void LLVMAddAggressiveInstCombinerPass(LLVMPassManagerRef PM) { - unwrap(PM)->add(createAggressiveInstCombinerPass()); -} - void LLVMAddBitTrackingDCEPass(LLVMPassManagerRef PM) { unwrap(PM)->add(createBitTrackingDCEPass()); } |

