[PATCH] D16877: [X86] Enable LEA optimization pass by default
Andrey Turetskiy via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 11 02:55:45 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL260507: [X86] Enable the LEA optimization pass by default. (authored by aturetsk).
Changed prior to commit:
http://reviews.llvm.org/D16877?vs=46881&id=47618#toc
Repository:
rL LLVM
http://reviews.llvm.org/D16877
Files:
llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
llvm/trunk/test/CodeGen/X86/lea-opt.ll
Index: llvm/trunk/test/CodeGen/X86/lea-opt.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/lea-opt.ll
+++ llvm/trunk/test/CodeGen/X86/lea-opt.ll
@@ -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 }
Index: llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
+++ llvm/trunk/lib/Target/X86/X86OptimizeLEAs.cpp
@@ -35,9 +35,10 @@
#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");
@@ -568,7 +569,7 @@
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();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16877.47618.patch
Type: text/x-patch
Size: 1542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/1e4eeffa/attachment.bin>
More information about the llvm-commits
mailing list