llvm.org GIT mirror llvm / c5d1a4f
Turn on machine LICM in non-fast mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63855 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
3 changed file(s) with 5 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
4141 static cl::opt
4242 EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
4343 cl::desc("Perform sinking on machine code"));
44 static cl::opt
45 EnableLICM("machine-licm",
46 cl::init(false), cl::Hidden,
47 cl::desc("Perform loop-invariant code motion on machine code"));
4844
4945 // When this works it will be on by default.
5046 static cl::opt
186182 if (PrintMachineCode)
187183 PM.add(createMachineFunctionPrinterPass(cerr));
188184
189 if (EnableLICM)
185 if (!Fast)
190186 PM.add(createMachineLICMPass());
191187
192188 if (EnableSinking)
0 ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin
1 ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -stats -info-output-file - | grep "Number of re-materialization" | grep 3
1 ; RUN: llvm-as < %s | llc -mtriple=arm-apple-darwin -stats -info-output-file - | grep "Number of re-materialization" | grep 2
22
33 %struct.CONTENTBOX = type { i32, i32, i32, i32, i32 }
44 %struct.LOCBOX = type { i32, i32, i32, i32 }
0 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -pre-alloc-split -stats |& \
1 ; RUN: grep {pre-alloc-split} | count 3
1 ; RUN: grep {pre-alloc-split} | count 2
22
3 define i32 @t() {
3 define i32 @t(i32 %arg) {
44 entry:
55 br label %bb6
66
1111 br label %bb6
1212
1313 bb6: ; preds = %.noexc6, %entry
14 %1 = uitofp i32 0 to double ; [#uses=1]
14 %1 = uitofp i32 %arg to double ; [#uses=1]
1515 %2 = sub i32 0, 0 ; [#uses=1]
1616 %3 = invoke i8* @_Znwm(i32 0)
1717 to label %.noexc6 unwind label %lpad32 ; [#uses=1]