llvm.org GIT mirror llvm / ab8b794
Turn on my codegen prepare heuristic by default. It doesn't affect 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 Chris Lattner 11 years ago
2 changed file(s) with 3 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
10241024
10251025
10261026
1027 #include "llvm/Support/CommandLine.h"
1028 cl::opt ENABLECRAZYHACK("enable-smarter-addr-folding", cl::Hidden);
1029
1030
10311027 /// IsProfitableToFoldIntoAddressingMode - It is possible for the addressing
10321028 /// mode of the machine to fold the specified instruction into a load or store
10331029 /// that ultimately uses it. However, the specified instruction has multiple
10521048 bool AddressingModeMatcher::
10531049 IsProfitableToFoldIntoAddressingMode(Instruction *I, ExtAddrMode &AMBefore,
10541050 ExtAddrMode &AMAfter) {
1055 if (IgnoreProfitability || !ENABLECRAZYHACK) return true;
1051 if (IgnoreProfitability) return true;
10561052
10571053 // AMBefore is the addressing mode before this instruction was folded into it,
10581054 // and AMAfter is the addressing mode after the instruction was folded. Get
None ; RUN: llvm-as < %s | llc -enable-smarter-addr-folding | grep {addl.(%eax), %ecx}
1 ; RUN: llvm-as < %s | llc -enable-smarter-addr-folding | not grep leal
0 ; RUN: llvm-as < %s | llc | grep {addl.(%eax), %ecx}
1 ; RUN: llvm-as < %s | llc | not grep leal
22 ; this should not sink %1 into bb1, that would increase reg pressure.
33
44 ; rdar://6399178