- Aug 12, 2010
-
-
Bob Wilson authored
instruction opcode. This also fixes part of PR7792. llvm-svn: 110875
-
- Aug 11, 2010
-
-
Jim Grosbach authored
llvm-svn: 110810
-
Bill Wendling authored
float t1(int argc) { return (argc == 1123) ? 1.234f : 2.38213f; } We would generate truly awful code on ARM (those with a weak stomach should look away): _t1: movw r1, #1123 movs r2, #1 movs r3, #0 cmp r0, r1 mov.w r0, #0 it eq moveq r0, r2 movs r1, #4 cmp r0, #0 it ne movne r3, r1 adr r0, #LCPI1_0 ldr r0, [r0, r3] bx lr The problem was that legalization was creating a cascade of SELECT_CC nodes, for for the comparison of "argc == 1123" which was fed into a SELECT node for the ?: statement which was itself converted to a SELECT_CC node. This is because the ARM back-end doesn't have custom lowering for SELECT nodes, so it used the default "Expand". I added a fairly simple "LowerSELECT" to the ARM back-end. It takes care of this testcase, but can obviously be expanded to include more cases. Now we generate this, which looks optimal to me: _t1: movw r1, #1123 movs r2, #0 cmp r0, r1 adr r0, #LCPI0_0 it eq moveq r2, #4 ldr r0, [r0, r2] bx lr .align 2 LCPI0_0: .long 1075344593 @ float 2.382130e+00 .long 1067316150 @ float 1.234000e+00 llvm-svn: 110799
-
Evan Cheng authored
Report error if codegen tries to instantiate a ARM target when the cpu does support it. e.g. cortex-m* processors. llvm-svn: 110798
-
Evan Cheng authored
llvm-svn: 110797
-
Evan Cheng authored
llvm-svn: 110796
-
Evan Cheng authored
llvm-svn: 110795
-
Daniel Dunbar authored
MC/ARM: Add basic support for handling predication by parsing it out of the mnemonic into a separate operand form. llvm-svn: 110794
-
Daniel Dunbar authored
llvm-svn: 110793
-
Daniel Dunbar authored
llvm-svn: 110792
-
Daniel Dunbar authored
llvm-svn: 110790
-
Daniel Dunbar authored
llvm-svn: 110788
-
Evan Cheng authored
llvm-svn: 110787
-
Evan Cheng authored
instructions: dmb, dsb, isb, msr, and mrs. llvm-svn: 110786
-
Evan Cheng authored
memory and synchronization barrier dmb and dsb instructions. - Change instruction names to something more sensible (matching name of actual instructions). - Added tests for memory barrier codegen. llvm-svn: 110785
-
Daniel Dunbar authored
llvm-svn: 110783
-
Daniel Dunbar authored
llvm-svn: 110782
-
Daniel Dunbar authored
for some reason they have a very odd MCInst form where the operands overlap, but I haven't dug in to find out why yet. llvm-svn: 110781
-
Daniel Dunbar authored
llvm-svn: 110780
-
Bill Wendling authored
llvm-svn: 110762
-
Bill Wendling authored
llvm-svn: 110761
-
Bob Wilson authored
(I discovered 2 more copies of the ARM instruction format list, bringing the total to 4!! Two of them were already out of sync. I haven't yet gotten into the disassembler enough to know the best way to fix this, but something needs to be done.) Add support for encoding these instructions. llvm-svn: 110754
-
Evan Cheng authored
llvm-svn: 110745
-
- Aug 10, 2010
-
-
Bill Wendling authored
a register before checking if it was defined. llvm-svn: 110733
-
Evan Cheng authored
llvm-svn: 110710
-
Evan Cheng authored
Re-apply r110655 with fixes. Epilogue must restore sp from fp if the function stack frame has a var-sized object. Also added a test case to check for the added benefit of this patch: it's optimizing away the unnecessary restore of sp from fp for some non-leaf functions. llvm-svn: 110707
-
Daniel Dunbar authored
register is", it breaks a couple test-suite tests. llvm-svn: 110701
-
Evan Cheng authored
reserved, not available for general allocation. This eliminates all the extra checks for Darwin. This change also fixes the use of FP to access frame indices in leaf functions and cleaned up some confusing code in epilogue emission. llvm-svn: 110655
-
Evan Cheng authored
This will always be false before PEI: (DisableFramePointerElim(MF) && MFI->adjustsStack()) Which means it's going to make r11 available as a general purpose register even if -disable-fp-elim is specified. It's working on Darwin only because r7 is always reserved. But it's obviously broken for other targets. llvm-svn: 110614
-
- Aug 09, 2010
-
-
Evan Cheng authored
llvm-svn: 110587
-
Evan Cheng authored
Change -prefer-32bit-thumb to attribute -mattr=+32bit instead to disable more 32-bit to 16-bit optimizations. llvm-svn: 110584
-
Evan Cheng authored
llvm-svn: 110579
-
- Aug 08, 2010
-
-
Bill Wendling authored
relatively expensive comparison analyzer on each instruction. Also rename the comparison analyzer method to something more in line with what it actually does. This pass is will eventually be folded into the Machine CSE pass. llvm-svn: 110539
-
- Aug 06, 2010
-
-
Owen Anderson authored
llvm-svn: 110460
-
Rafael Espindola authored
Without this what was happening was: * R3 is not marked as "used" * ARM backend thinks it has to save it to the stack because of vaarg * Offset computation correctly ignores it * Offsets are wrong llvm-svn: 110446
-
Bill Wendling authored
This pass tries to remove comparison instructions when possible. For instance, if you have this code: sub r1, 1 cmp r1, 0 bz L1 and "sub" either sets the same flag as the "cmp" instruction or could be converted to set the same flag, then we can eliminate the "cmp" instruction all together. This is a important for ARM where the ALU instructions could set the CPSR flag, but need a special suffix ('s') to do so. llvm-svn: 110423
-
Owen Anderson authored
llvm-svn: 110410
-
Owen Anderson authored
ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
-
- Aug 05, 2010
-
-
Jim Grosbach authored
register for local access when it's closer to the stack slot being refererenced than the stack pointer. Make sure to take into account any argument frame SP adjustments that are in affect at the time. rdar://8256090 llvm-svn: 110366
-
Bob Wilson authored
llvm-svn: 110363
-