diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 08:46:33 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-05 08:46:33 +0000 |
| commit | 409c25f78d40b4f01069c410b201414392333dbe (patch) | |
| tree | 1053aa00271a63189672a0a7c73bb5d15d31ae3b | |
| parent | 399660c38466826ef6c747f87b42984e333c6707 (diff) | |
| download | bcm5719-llvm-409c25f78d40b4f01069c410b201414392333dbe.tar.gz bcm5719-llvm-409c25f78d40b4f01069c410b201414392333dbe.zip | |
Turn on machine LICM in non-fast mode.
llvm-svn: 63855
| -rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 6 | ||||
| -rw-r--r-- | llvm/test/CodeGen/ARM/remat.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/pre-split2.ll | 6 |
3 files changed, 5 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index c9ff15d4947..7def8fa61d2 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -42,10 +42,6 @@ static cl::opt<bool> PrintGCInfo("print-gc", cl::Hidden, static cl::opt<bool> EnableSinking("enable-sinking", cl::init(false), cl::Hidden, cl::desc("Perform sinking on machine code")); -static cl::opt<bool> -EnableLICM("machine-licm", - cl::init(false), cl::Hidden, - cl::desc("Perform loop-invariant code motion on machine code")); // When this works it will be on by default. static cl::opt<bool> @@ -187,7 +183,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) { if (PrintMachineCode) PM.add(createMachineFunctionPrinterPass(cerr)); - if (EnableLICM) + if (!Fast) PM.add(createMachineLICMPass()); if (EnableSinking) diff --git a/llvm/test/CodeGen/ARM/remat.ll b/llvm/test/CodeGen/ARM/remat.ll index 30b1d29e29e..454d36b46f2 100644 --- a/llvm/test/CodeGen/ARM/remat.ll +++ b/llvm/test/CodeGen/ARM/remat.ll @@ -1,5 +1,5 @@ ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -stats -info-output-file - | grep "Number of re-materialization" | grep 3 +; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -stats -info-output-file - | grep "Number of re-materialization" | grep 2 %struct.CONTENTBOX = type { i32, i32, i32, i32, i32 } %struct.LOCBOX = type { i32, i32, i32, i32 } diff --git a/llvm/test/CodeGen/X86/pre-split2.ll b/llvm/test/CodeGen/X86/pre-split2.ll index fcb3f05a838..2009ad8b66d 100644 --- a/llvm/test/CodeGen/X86/pre-split2.ll +++ b/llvm/test/CodeGen/X86/pre-split2.ll @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \ -; RUN: grep {pre-alloc-split} | count 3 +; RUN: grep {pre-alloc-split} | count 2 -define i32 @t() { +define i32 @t(i32 %arg) { entry: br label %bb6 @@ -12,7 +12,7 @@ entry: br label %bb6 bb6: ; preds = %.noexc6, %entry - %1 = uitofp i32 0 to double ; <double> [#uses=1] + %1 = uitofp i32 %arg to double ; <double> [#uses=1] %2 = sub i32 0, 0 ; <i32> [#uses=1] %3 = invoke i8* @_Znwm(i32 0) to label %.noexc6 unwind label %lpad32 ; <i8*> [#uses=1] |

