diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-02-01 10:51:23 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-02-01 10:51:23 +0000 |
commit | 80c55f265d1a68b7f03845a3e9356447f7d258c8 (patch) | |
tree | e374d88b98aa80fb781b972004f0246cb40e073f /tools | |
parent | 795e721a721e2594136fa6682fa370631722da37 (diff) |
[PM] Port EarlyCSE to the new pass manager.
I've added RUN lines both to the basic test for EarlyCSE and the
target-specific test, as this serves as a nice test that the TTI layer
in the new pass manager is in fact working well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/opt/PassRegistry.def | 1 | ||||
-rw-r--r-- | tools/opt/Passes.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/opt/PassRegistry.def b/tools/opt/PassRegistry.def index 4ee9e97158e..db1c25f4856 100644 --- a/tools/opt/PassRegistry.def +++ b/tools/opt/PassRegistry.def @@ -62,6 +62,7 @@ FUNCTION_ANALYSIS("targetir", #ifndef FUNCTION_PASS #define FUNCTION_PASS(NAME, CREATE_PASS) #endif +FUNCTION_PASS("early-cse", EarlyCSEPass()) FUNCTION_PASS("instcombine", InstCombinePass()) FUNCTION_PASS("invalidate<all>", InvalidateAllAnalysesPass()) FUNCTION_PASS("no-op-function", NoOpFunctionPass()) diff --git a/tools/opt/Passes.cpp b/tools/opt/Passes.cpp index b098a7c2351..357cf41d076 100644 --- a/tools/opt/Passes.cpp +++ b/tools/opt/Passes.cpp @@ -28,6 +28,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Transforms/InstCombine/InstCombine.h" +#include "llvm/Transforms/Scalar/EarlyCSE.h" #include "llvm/Transforms/Scalar/LowerExpectIntrinsic.h" using namespace llvm; |