From 10003e31f47cb8a542e3d13b0fb5f56902e38854 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Wed, 7 Feb 2018 09:58:55 +0000 Subject: [MergeICmps] Re-commit rL324317 "Enable the MergeICmps Pass by default." With fixes from rL324341. Original commit message: [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: 324465 --- llvm/lib/CodeGen/TargetPassConfig.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/CodeGen') 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 EnableImplicitNullChecks( "enable-implicit-null-checks", cl::desc("Fold null checks into faulting memory operations"), cl::init(false), cl::Hidden); -static cl::opt - EnableMergeICmps("enable-mergeicmps", - cl::desc("Merge ICmp chains into a single memcmp"), - cl::init(false), cl::Hidden); +static cl::opt DisableMergeICmps("disable-mergeicmps", + cl::desc("Disable MergeICmps Pass"), + cl::init(false), cl::Hidden); static cl::opt PrintLSR("print-lsr-output", cl::Hidden, cl::desc("Print LLVM IR produced by the loop-reduce pass")); static cl::opt 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()); } -- cgit v1.2.3