summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-02-06 07:20:33 +0000
committerClement Courbet <courbet@google.com>2018-02-06 07:20:33 +0000
commit7d09780fa20514751dbcc9a181dd2f75d756367d (patch)
tree04837da041935e1b497006c8f747152d63dfcb3a /llvm/lib/CodeGen
parentba3585eaf22d8832ee0a56988bb582afad0c9a6f (diff)
downloadbcm5719-llvm-7d09780fa20514751dbcc9a181dd2f75d756367d.tar.gz
bcm5719-llvm-7d09780fa20514751dbcc9a181dd2f75d756367d.zip
[MergeICmps] Enable the MergeICmps Pass by default.
Summary: Now that PR33325 is fixed, this should always improve the generated code. Reviewers: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42793 llvm-svn: 324317
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 43fec69495b..84597570c16 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -94,10 +94,9 @@ static cl::opt<bool> EnableImplicitNullChecks(
"enable-implicit-null-checks",
cl::desc("Fold null checks into faulting memory operations"),
cl::init(false), cl::Hidden);
-static cl::opt<bool>
- EnableMergeICmps("enable-mergeicmps",
- cl::desc("Merge ICmp chains into a single memcmp"),
- cl::init(false), cl::Hidden);
+static cl::opt<bool> DisableMergeICmps("disable-mergeicmps",
+ cl::desc("Disable MergeICmps Pass"),
+ cl::init(false), cl::Hidden);
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,
@@ -596,7 +595,7 @@ void TargetPassConfig::addIRPasses() {
// loads and compares. ExpandMemCmpPass then tries to expand those calls
// into optimally-sized loads and compares. The transforms are enabled by a
// target lowering hook.
- if (EnableMergeICmps)
+ if (!DisableMergeICmps)
addPass(createMergeICmpsPass());
addPass(createExpandMemCmpPass());
}
OpenPOWER on IntegriCloud