Turn on my codegen prepare heuristic by default. It doesn't affect
authorChris Lattner <sabre@nondot.org>
Wed, 26 Nov 2008 22:16:44 +0000 (22:16 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 26 Nov 2008 22:16:44 +0000 (22:16 +0000)
performance in most cases on the Grawp tester, but does speed some
things up (like shootout/hash by 15%).  This also doesn't impact
compile time in a noticable way on the Grawp tester.

It also, of course, gets the testcase it was designed for right :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60120 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/CodeGenPrepare.cpp
test/CodeGen/X86/isel-sink3.ll

index 367ea1b056c857940198865e0c3e8b30cbfdcd69..93252c8b3bdc227c2f1130c2da677930ed3c3f4c 100644 (file)
@@ -1025,10 +1025,6 @@ bool AddressingModeMatcher::ValueAlreadyLiveAtInst(Value *Val,Value *KnownLive1,
 
 
 
-#include "llvm/Support/CommandLine.h"
-cl::opt<bool> ENABLECRAZYHACK("enable-smarter-addr-folding", cl::Hidden);
-
-
 /// IsProfitableToFoldIntoAddressingMode - It is possible for the addressing
 /// mode of the machine to fold the specified instruction into a load or store
 /// that ultimately uses it.  However, the specified instruction has multiple
@@ -1053,7 +1049,7 @@ cl::opt<bool> ENABLECRAZYHACK("enable-smarter-addr-folding", cl::Hidden);
 bool AddressingModeMatcher::
 IsProfitableToFoldIntoAddressingMode(Instruction *I, ExtAddrMode &AMBefore,
                                      ExtAddrMode &AMAfter) {
-  if (IgnoreProfitability || !ENABLECRAZYHACK) return true;
+  if (IgnoreProfitability) return true;
   
   // AMBefore is the addressing mode before this instruction was folded into it,
   // and AMAfter is the addressing mode after the instruction was folded.  Get
index a0fba3acc591210cd1c736223d2dadc0b1285448..75c23c343532df5bca765cab42393234837578ff 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llvm-as < %s | llc -enable-smarter-addr-folding | grep {addl.(%eax), %ecx}
-; RUN: llvm-as < %s | llc -enable-smarter-addr-folding | not grep leal
+; RUN: llvm-as < %s | llc | grep {addl.(%eax), %ecx}
+; RUN: llvm-as < %s | llc | not grep leal
 ; this should not sink %1 into bb1, that would increase reg pressure.
 
 ; rdar://6399178