Revert r63999. It was breaking self-hosting builds.
authorBill Wendling <isanbard@gmail.com>
Sun, 8 Feb 2009 00:58:05 +0000 (00:58 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 8 Feb 2009 00:58:05 +0000 (00:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64062 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LLVMTargetMachine.cpp
lib/Transforms/Scalar/GVN.cpp
test/CodeGen/ARM/lsr-code-insertion.ll
test/CodeGen/X86/2006-05-11-InstrSched.ll

index f29944c7c90b5d8f500eb91c31e0a521bc4051ab..7def8fa61d2a3c57f825a4c7a656519e41b07b7c 100644 (file)
@@ -38,6 +38,11 @@ static cl::opt<bool> PrintEmittedAsm("print-emitted-asm", cl::Hidden,
 static cl::opt<bool> PrintGCInfo("print-gc", cl::Hidden,
     cl::desc("Dump garbage collector data"));
 
+// Hidden options to help debugging
+static cl::opt<bool>
+EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
+              cl::desc("Perform sinking on machine code"));
+
 // When this works it will be on by default.
 static cl::opt<bool>
 DisablePostRAScheduler("disable-post-RA-scheduler",
@@ -178,10 +183,11 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) {
   if (PrintMachineCode)
     PM.add(createMachineFunctionPrinterPass(cerr));
 
-  if (!Fast) {
+  if (!Fast)
     PM.add(createMachineLICMPass());
+
+  if (EnableSinking)
     PM.add(createMachineSinkingPass());
-  }
 
   // Run pre-ra passes.
   if (addPreRegAlloc(PM, Fast) && PrintMachineCode)
index 9c7f9041068b6877c007b197959f389a554c94ad..308264a620de39662b51d53abd10dc17581107df 100644 (file)
@@ -48,7 +48,7 @@ STATISTIC(NumPRELoad,   "Number of loads PRE'd");
 
 static cl::opt<bool> EnablePRE("enable-pre",
                                cl::init(true), cl::Hidden);
-cl::opt<bool> EnableLoadPRE("enable-load-pre"/*, cl::init(true)*/);
+cl::opt<bool> EnableLoadPRE("enable-load-pre", cl::init(true));
 
 //===----------------------------------------------------------------------===//
 //                         ValueTable Class
index 0a9227982d4d4c845ddeb6acabb8568d5014f246..3881e91453b4706f4d54e05836efa43f9363b2fc 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -stats |& grep {40.*Number of machine instrs printed}
+; RUN: llvm-as < %s | llc -stats |& grep {39.*Number of machine instrs printed}
 ; RUN: llvm-as < %s | llc -stats |& grep {.*Number of re-materialization}
 ; This test really wants to check that the resultant "cond_true" block only 
 ; has a single store in it, and that cond_true55 only has code to materialize 
index 774e7243fd37564639f472077d701d786a77e1c0..9d1d324fcec3e18c1813b1754b77f619e9496bb9 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats -realign-stack=0 |&\
-; RUN:     grep {asm-printer} | grep 31
+; RUN:     grep {asm-printer} | grep 32
 
 target datalayout = "e-p:32:32"
 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) nounwind {