diff options
| author | Clement Courbet <courbet@google.com> | 2017-09-01 10:56:34 +0000 |
|---|---|---|
| committer | Clement Courbet <courbet@google.com> | 2017-09-01 10:56:34 +0000 |
| commit | 65130e2d8daaaf8dd6646f7840f27fac6709d5cf (patch) | |
| tree | 55e7b0e5dbc2ace098b8aa02e4274a93803eedb0 /llvm/lib/CodeGen | |
| parent | d771f6cb16043afb97e2c4b3a6a02ff5aa963923 (diff) | |
| download | bcm5719-llvm-65130e2d8daaaf8dd6646f7840f27fac6709d5cf.tar.gz bcm5719-llvm-65130e2d8daaaf8dd6646f7840f27fac6709d5cf.zip | |
Reland rL312315: [MergeICmps] MergeICmps is a new optimization pass that turns chains of integer
Add missing header.
This reverts commit 86dd6335cf7607af22f383a9a8e072ba929848cf.
llvm-svn: 312322
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 481baea2dff..329768769f1 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -94,6 +94,10 @@ static cl::opt<bool> EnableImplicitNullChecks( "enable-implicit-null-checks", cl::desc("Fold null checks into faulting memory operations"), cl::init(false)); +static cl::opt<bool> EnableMergeICmps( + "enable-mergeicmps", + cl::desc("Merge ICmp chains into a single memcmp"), + cl::init(false)); static cl::opt<bool> PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt<bool> PrintISelInput("print-isel-input", cl::Hidden, @@ -591,6 +595,10 @@ void TargetPassConfig::addIRPasses() { addPass(createPrintFunctionPass(dbgs(), "\n\n*** Code after LSR ***\n")); } + if (getOptLevel() != CodeGenOpt::None && EnableMergeICmps) { + addPass(createMergeICmpsPass()); + } + // Run GC lowering passes for builtin collectors // TODO: add a pass insertion point here addPass(createGCLoweringPass()); |

