[llvm] r261429 - [X86] Enable the LEA optimization pass by default.
Andrey Turetskiy via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 20 03:11:55 PST 2016
Author: aturetsk
Date: Sat Feb 20 05:11:55 2016
New Revision: 261429
URL: http://llvm.org/viewvc/llvm-project?rev=261429&view=rev
Log:
[X86] Enable the LEA optimization pass by default.
Differential Revision: http://reviews.llvm.org/D16877
Modified:
llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
llvm/trunk/test/CodeGen/X86/lea-opt-memop-check.ll
llvm/trunk/test/CodeGen/X86/lea-opt.ll
Modified: llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp?rev=261429&r1=261428&r2=261429&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp Sat Feb 20 05:11:55 2016
@@ -36,9 +36,10 @@ using namespace llvm;
#define DEBUG_TYPE "x86-optimize-LEAs"
-static cl::opt<bool> EnableX86LEAOpt("enable-x86-lea-opt", cl::Hidden,
- cl::desc("X86: Enable LEA optimizations."),
- cl::init(false));
+static cl::opt<bool>
+ DisableX86LEAOpt("disable-x86-lea-opt", cl::Hidden,
+ cl::desc("X86: Disable LEA optimizations."),
+ cl::init(false));
STATISTIC(NumSubstLEAs, "Number of LEA instruction substitutions");
STATISTIC(NumRedundantLEAs, "Number of redundant LEA instructions removed");
@@ -615,7 +616,7 @@ bool OptimizeLEAPass::runOnMachineFuncti
bool Changed = false;
// Perform this optimization only if we care about code size.
- if (!EnableX86LEAOpt || !MF.getFunction()->optForSize())
+ if (DisableX86LEAOpt || !MF.getFunction()->optForSize())
return false;
MRI = &MF.getRegInfo();
Modified: llvm/trunk/test/CodeGen/X86/lea-opt-memop-check.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lea-opt-memop-check.ll?rev=261429&r1=261428&r2=261429&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lea-opt-memop-check.ll (original)
+++ llvm/trunk/test/CodeGen/X86/lea-opt-memop-check.ll Sat Feb 20 05:11:55 2016
@@ -1,5 +1,5 @@
; REQUIRES: asserts
-; RUN: llc < %s -march=x86 -mtriple=i686-pc-win32 -enable-x86-lea-opt | FileCheck %s
+; RUN: llc < %s -march=x86 -mtriple=i686-pc-win32 | FileCheck %s
; PR26575
; Assertion `(Disp->isImm() || Disp->isGlobal()) && (Other.Disp->isImm() || Other.Disp->isGlobal()) && "Address displacement operand is always an immediate or a global"' failed.
Modified: llvm/trunk/test/CodeGen/X86/lea-opt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lea-opt.ll?rev=261429&r1=261428&r2=261429&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lea-opt.ll (original)
+++ llvm/trunk/test/CodeGen/X86/lea-opt.ll Sat Feb 20 05:11:55 2016
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=x86_64-linux -enable-x86-lea-opt | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s
%struct.anon1 = type { i32, i32, i32 }
%struct.anon2 = type { i32, [32 x i32], i32 }
More information about the llvm-commits
mailing list