Owen Anderson [Mon, 15 Nov 2010 18:45:17 +0000 (18:45 +0000)]
Add correct Thumb2 encodings for mvn and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119170
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Nov 2010 18:41:10 +0000 (18:41 +0000)]
Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119169
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Nov 2010 18:36:48 +0000 (18:36 +0000)]
Add FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119167
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 15 Nov 2010 18:17:24 +0000 (18:17 +0000)]
Nuke redundant encoding bit set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119164
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 15 Nov 2010 18:07:16 +0000 (18:07 +0000)]
-basicaa is no longer the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119163
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 15 Nov 2010 17:52:45 +0000 (17:52 +0000)]
Teach InstructionSimplify the trick of skipping incoming phi
values that are equal to the phi itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119161
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 15 Nov 2010 16:43:28 +0000 (16:43 +0000)]
Move PHI tests to phi.ll, out of select.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119153
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Nov 2010 16:33:49 +0000 (16:33 +0000)]
Change MCExpr::EvaluateAsRelocatableImpl of variables to return the original
variable if recursing fails to simplify it.
Factor AliasedSymbol to be a method of MCSymbol.
Update MCAssembler::EvaluateFixup to match the change in
EvaluateAsRelocatableImpl.
Remove the WeakRefExpr hack, as the object writer now sees the weakref with
no extra effort needed.
Nothing else is using MCTargetExpr, but keep it for now.
Now that the ELF writer sees relocations with aliases, handle
.weak foo2
foo2:
.weak bar2
.set bar2,foo2
.quad bar2
the same way gas does and produce a relocation with bar2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119152
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Mon, 15 Nov 2010 16:18:39 +0000 (16:18 +0000)]
Dovetail with Dan Dunbar's rework of ELFObjectWriter.
Added 2 new subclasses - X86ELFObjectWriter and ARMELFObectWriter.
ARM and X86 require different code for RecordRelocation(), possibly others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119149
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 15 Nov 2010 14:40:36 +0000 (14:40 +0000)]
Fix PR8565.
This moves most of the isUsed logic to the MCSymbol itself. With this we
get a bit more relaxed about allowing definitions after uses: uses that
don't evaluate their argument immediately (jmp foo) are accepted.
ddunbar, this was the smallest compromise I could think of that lets us
accept gcc (and clang!) assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119144
91177308-0d34-0410-b5e6-
96231b3b80d8
Kalle Raiskila [Mon, 15 Nov 2010 10:12:32 +0000 (10:12 +0000)]
Improve code layout, mostly indentation.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119142
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 08:49:58 +0000 (08:49 +0000)]
Wire up primitive support in the assembler backend for writing .o files
directly on the mac. This is very early, doesn't support relocations and
has a terrible hack to avoid .machine from being printed, but despite
that it generates an bitwise-identical-to-cctools .o file for stuff like
this:
define i32 @test() nounwind { ret i32 42 }
I don't plan to continue pushing this forward, but if anyone else was
interested in doing it, it should be really straight-forward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119136
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 08:22:03 +0000 (08:22 +0000)]
split out an encoder for memri operands, allowing a relocation to be plopped
into the immediate field. This allows us to encode stuff like this:
lbz r3, lo16(__ZL4init)(r4) ; globalopt.cpp:5
; encoding: [0x88,0x64,A,A]
; fixup A - offset: 0, value: lo16(__ZL4init), kind: fixup_ppc_lo16
stw r3, lo16(__ZL1s)(r5) ; globalopt.cpp:6
; encoding: [0x90,0x65,A,A]
; fixup A - offset: 0, value: lo16(__ZL1s), kind: fixup_ppc_lo16
With this, we should have a completely function MCCodeEmitter for PPC, wewt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119134
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 08:02:41 +0000 (08:02 +0000)]
add support for encoding the lo14 forms used for a few PPC64 addressing
modes. For example, we now get:
ld r3, lo16(_G)(r3) ; encoding: [0xe8,0x63,A,
0bAAAAAA00]
; fixup A - offset: 0, value: lo16(_G), kind: fixup_ppc_lo14
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 07:52:06 +0000 (07:52 +0000)]
fix a regression with the new instprinter: we lost the ability to
print DBG_VALUE instructions. This should unbreak the llvm-gcc-powerpc-darwin9
buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119132
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 07:09:28 +0000 (07:09 +0000)]
pull the code to get the operand value out of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 06:59:17 +0000 (06:59 +0000)]
split the giant encoder loop into two new helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119129
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 06:42:13 +0000 (06:42 +0000)]
reduce nesting and minor cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119128
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 06:33:39 +0000 (06:33 +0000)]
implement the start of support for lo16 and ha16, allowing us to get stuff like:
lis r4, ha16(__ZL4init) ; encoding: [0x3c,0x80,A,A]
; fixup A - offset: 0, value: ha16(__ZL4init), kind: fixup_ppc_ha16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119127
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 06:12:22 +0000 (06:12 +0000)]
add a fixup for conditional branches, giving us output like this:
beq cr0, LBB0_4 ; encoding: [0x41,0x82,A,
0bAAAAAA00]
; fixup A - offset: 0, value: LBB0_4, kind: fixup_ppc_brcond14
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119126
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 06:09:35 +0000 (06:09 +0000)]
change direct branches to encode with the same encoding method
as direct calls. Change conditional branches to encode with
their own method, simplifying the JIT encoder and making room
for adding an mc fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119125
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 06:01:10 +0000 (06:01 +0000)]
eliminate a now-unneeded operand printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 05:57:53 +0000 (05:57 +0000)]
split call operands out to their own encoding class, simplifying
code in the JIT. Use this to form the first fixup for the PPC backend,
giving us stuff like this:
bl L_foo$stub ; encoding: [
0b010010AA,A,A,
0bAAAAAA01]
; fixup A - offset: 0, value: L_foo$stub, kind: fixup_ppc_br24
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119123
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 05:56:19 +0000 (05:56 +0000)]
correct the fixup comment printer to work on big endian platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119122
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 05:19:25 +0000 (05:19 +0000)]
add proper encoding for MTCRF instead of using a hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119121
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 05:19:05 +0000 (05:19 +0000)]
add fields to the .td files unconditionally, simplifying tblgen a bit.
Switch the ARM backend to use 'let' instead of 'set' with this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119120
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 05:07:03 +0000 (05:07 +0000)]
remove a pointless testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119119
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 04:51:55 +0000 (04:51 +0000)]
add basic encoding support for immediates and registers, allowing us
to encode all of these instructions correctly (for example):
mflr r0 ; encoding: [0x7c,0x08,0x02,0xa6]
stw r0, 8(r1) ; encoding: [0x90,0x01,0x00,0x08]
stwu r1, -64(r1) ; encoding: [0x94,0x21,0xff,0xc0]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119118
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 04:47:16 +0000 (04:47 +0000)]
add a dummy entry to fix a build error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 04:16:32 +0000 (04:16 +0000)]
Implement a basic MCCodeEmitter for PPC. This doesn't handle
fixups yet, and doesn't handle actually encoding operand values,
but this is enough for llc -show-mc-encoding to show the base
instruction encoding information, e.g.:
mflr r0 ; encoding: [0x7c,0x08,0x02,0xa6]
stw r0, 8(r1) ; encoding: [0x90,0x00,0x00,0x00]
stwu r1, -64(r1) ; encoding: [0x94,0x00,0x00,0x00]
Ltmp0:
lhz r4, 4(r3) ; encoding: [0xa0,0x00,0x00,0x00]
cmplwi cr0, r4, 8 ; encoding: [0x28,0x00,0x00,0x00]
beq cr0, LBB0_2 ; encoding: [0x40,0x00,0x00,0x00]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119116
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:53:53 +0000 (03:53 +0000)]
dissolve some more hacks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119115
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:51:13 +0000 (03:51 +0000)]
fix some fixme's, removing dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119114
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:48:58 +0000 (03:48 +0000)]
remove asmstrings (which can never be printed) from pseudo
instructions, allowing is to eliminate some dead operand
printing methods from the instprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119113
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:42:54 +0000 (03:42 +0000)]
strength reduce TOC temp label generation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119112
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:39:06 +0000 (03:39 +0000)]
rip out a ton of old instruction printing junk now that the
new instprinting logic is there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119111
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 15 Nov 2010 03:33:14 +0000 (03:33 +0000)]
Object: Add missing makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119110
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 15 Nov 2010 03:30:30 +0000 (03:30 +0000)]
Make sure ARM multi load / store pass copies memoperands when forming ldrd / strd. pr8113.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:27:05 +0000 (03:27 +0000)]
Turn on the new instprinter by default.
The only change in the output is:
1) we get a better comment on mfcr, we get:
mfcr r2 ; cr2
instead of:
mfcr r2 ; 32
2) we no longer emit $stub's on powerpc/leopard. The Leopard
linker autosynthesizes them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119108
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 15 Nov 2010 03:21:41 +0000 (03:21 +0000)]
Add LLVMObject Library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119107
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 03:13:19 +0000 (03:13 +0000)]
convert the operand bits into bitfields since they are all combinable in
different ways. Add $non_lazy_ptr support, and proper lowering for
global values.
Now all the ppc regression tests pass with the new instruction printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119106
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 02:46:57 +0000 (02:46 +0000)]
add targetoperand flags for jump tables, constant pool and block address
nodes to indicate when ha16/lo16 modifiers should be used. This lets
us pass PowerPC/indirectbr.ll.
The one annoying thing about this patch is that the MCSymbolExpr isn't
expressive enough to represent ha16(label1-label2) which we need on
PowerPC. I have a terrible hack in the meantime, but this will have
to be revisited at some point.
Last major conversion item left is global variable references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119105
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 02:43:46 +0000 (02:43 +0000)]
remove some extraneous quotes to make the new instprinter match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119104
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 15 Nov 2010 01:45:44 +0000 (01:45 +0000)]
silence a ton of warnings from clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119102
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 15 Nov 2010 00:48:12 +0000 (00:48 +0000)]
Attempt to unbreak cmake-based builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119098
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 15 Nov 2010 00:06:54 +0000 (00:06 +0000)]
First step of huge frame-related refactoring: move emit{Prologue,Epilogue} out of TargetRegisterInfo to TargetFrameInfo, which is definitely much better suitable place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119097
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 15 Nov 2010 00:06:05 +0000 (00:06 +0000)]
Whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119096
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 14 Nov 2010 23:53:26 +0000 (23:53 +0000)]
Move the logic to decide with which symbol we produce a relocation (if any) to
a central location. This also makes us a bit more compatible with gas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 23:42:06 +0000 (23:42 +0000)]
implement support for the MO_DARWIN_STUB TargetOperand flag,
and have isel apply to to call operands as required. This allows
us to get $stub suffixes on label references on ppc/tiger with the
new instprinter, fixing two tests. Only 2 to go.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 23:32:42 +0000 (23:32 +0000)]
tidy up, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 22:56:43 +0000 (22:56 +0000)]
with the picbase nonsense starting to be figured out, implement
lowering support for MovePCtoLR[8]. Down to 4 failures again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 22:48:15 +0000 (22:48 +0000)]
move the pic base symbol stuff up to MachineFunction
since it is trivial and will be shared between ppc and x86.
This substantially simplifies the X86 backend also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 22:37:11 +0000 (22:37 +0000)]
simplify getPICBaseSymbol a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 22:22:59 +0000 (22:22 +0000)]
reimplement ppc asmprinter "toc" handling to use a VariantKind
on the operand, required for .o file writing and fixing
the PowerPC/mult-alt-generic-powerpc64.ll failure with the new
instprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 22:22:14 +0000 (22:22 +0000)]
add some nounwind's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119086
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 22:03:15 +0000 (22:03 +0000)]
lower PPC::MFCRpseud when transforming to MC, avoiding calling
the aborting printSpecial() method. This gets us to 8 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119084
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:54:34 +0000 (21:54 +0000)]
make the stubbed-out printer methods abort instead of
printing nothing. This gets us back up to 24 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119083
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:51:37 +0000 (21:51 +0000)]
wire up a few more things, down to 4 test failures, all
about handling $stub, lo/hi etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:42:53 +0000 (21:42 +0000)]
properly wire up the instprinter to the ppc64 backend, down to 5 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:39:51 +0000 (21:39 +0000)]
implement pretty printing support for the various pseudo
ops the asmprinter supported, fixing PowerPC/rlwimi2.ll
among others. Down to 20 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119080
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:33:07 +0000 (21:33 +0000)]
Wire up symbol hi/lo printing. We don't print hi()/lo(), but this gets
us further along. Only 28 failures now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119079
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:20:46 +0000 (21:20 +0000)]
implement basic support for symbol operand lowering,
and printing support for call operands. Down to 77 failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119078
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 14 Nov 2010 21:17:13 +0000 (21:17 +0000)]
Detect presence of AsmPrinter's. Remove some cruft too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119077
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 14 Nov 2010 21:17:08 +0000 (21:17 +0000)]
Updated CMake library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119076
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:16:04 +0000 (21:16 +0000)]
trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119075
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:12:33 +0000 (21:12 +0000)]
switch PPC to a simplified MCInstLowering model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119074
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 14 Nov 2010 21:11:16 +0000 (21:11 +0000)]
Fix another case of a .comm directive without a corresponding .type
directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119073
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:09:28 +0000 (21:09 +0000)]
fix PPC.h to not pull in TargetMachine.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119072
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 21:00:02 +0000 (21:00 +0000)]
rename LowerToMCInst -> LowerARMMachineInstrToMCInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:58:38 +0000 (20:58 +0000)]
even more simplifications. ARM MCInstLowering is now just
a single function instead of a class. It doesn't need the
complexity that X86 does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119070
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:51:15 +0000 (20:51 +0000)]
hopefully unbreak the cmake build, patch by frits van bommel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:41:53 +0000 (20:41 +0000)]
more shrinkification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:40:08 +0000 (20:40 +0000)]
more simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:31:06 +0000 (20:31 +0000)]
simplify and tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:22:56 +0000 (20:22 +0000)]
implement basic support for memory operands and crbit operands,
this fixes 3 more ppc tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119065
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 14 Nov 2010 20:15:05 +0000 (20:15 +0000)]
CMakeLists.txt: removed mismatched endif predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:11:21 +0000 (20:11 +0000)]
implement several trivial operand printers, reducing
failures in CodeGen/PowerPC from 120 -> 117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119063
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 20:02:39 +0000 (20:02 +0000)]
Implement support for printing register and immediate operands,
add support for darwin vs aix syntax. We now can print instructions
like this:
add r3, r3, r4
blr
and (in aix mode):
add 3, 3, 4
blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119062
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 19:53:02 +0000 (19:53 +0000)]
stub out PPCMCInstLowering, add a new option that uses it and the new
instprinter when -enable-ppc-inst-printer is passed to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119061
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 14 Nov 2010 19:40:55 +0000 (19:40 +0000)]
Fix the type of a symbol created with .comm and no corresponding .type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119060
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 19:40:38 +0000 (19:40 +0000)]
stub out a powerpc MCInstPrinter implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119059
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 19:12:57 +0000 (19:12 +0000)]
hopefully fix cmake as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119058
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 19:10:47 +0000 (19:10 +0000)]
fix the autoconf script to detect "has asmprinter"ness of a target by
looking for lib/Target/*AsmPrinter.cpp. Fix llvm-config to handle targets
that don't have an explicit AsmPrinter library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119057
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 18:43:56 +0000 (18:43 +0000)]
move all the target's asmprinters into the main target. The piece
that should be split out is the InstPrinter (if a target is mc'ized).
This change makes all the targets be consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119056
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 14 Nov 2010 18:36:10 +0000 (18:36 +0000)]
If dom tree information is available, make it possible to pass
it to get better phi node simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119055
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 18:33:33 +0000 (18:33 +0000)]
move PPCAsmPrinter into the main PPC library, like ARM and X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 18:27:11 +0000 (18:27 +0000)]
fix cmake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 18:25:50 +0000 (18:25 +0000)]
no alpha jit support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 18:24:41 +0000 (18:24 +0000)]
remove JIT support from the Alpha backend. The JIT will be moving to MC,
and the Alpha backend isn't MCized yet. Approved by Andrew.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119051
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Sun, 14 Nov 2010 18:14:32 +0000 (18:14 +0000)]
Segregate tests by target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119050
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 18:09:50 +0000 (18:09 +0000)]
random acts of tidiness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119049
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 14 Nov 2010 13:30:18 +0000 (13:30 +0000)]
Teach InstructionSimplify about phi nodes. I chose to have it simply
offload the work to hasConstantValue rather than do something more
complicated (such handling mutually recursive phis) because (1) it is
not clear it is worth it; and (2) if it is worth it, maybe such logic
would be better placed in hasConstantValue. Adjust some GVN tests
which are now cleaned up much further (eg: all phi nodes are removed).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119043
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 14 Nov 2010 12:53:18 +0000 (12:53 +0000)]
Boost the power of phi node constant folding slightly: if all
operands are the phi node itself or undef, then return undef.
This logic already existed at a higher level so in practice it
shouldn't make the slightest difference. Note that this code
could be replaced by a call to PN->hasConstantValue(). However
since we bail out the moment we see a non-constant operand, it
is more efficient to have a specialized version of that logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119041
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Nov 2010 12:37:51 +0000 (12:37 +0000)]
unittests/CMakeLists.txt: Add missing VMCore/ValueMapTest.cpp to VMCoreTests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119040
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 14 Nov 2010 11:23:23 +0000 (11:23 +0000)]
Strip trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119038
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 07:03:49 +0000 (07:03 +0000)]
rename test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 07:03:38 +0000 (07:03 +0000)]
filecheckize, remove an old and useless test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119032
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 14 Nov 2010 07:02:03 +0000 (07:02 +0000)]
this test is pretty pointless and "propogation" isn't a word (or so Misha claims).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119031
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 14 Nov 2010 05:37:38 +0000 (05:37 +0000)]
Second attempt at providing correct encodings for Thumb2 binary operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119029
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 14 Nov 2010 04:17:37 +0000 (04:17 +0000)]
Handle a peculiar comdat case: Creating a section with an undefined
signature symbol causes a local symbol to be created unless there is
some other use of the symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119026
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 14 Nov 2010 03:28:22 +0000 (03:28 +0000)]
FileCheck: Eliminate DOSish \r from input file.
It can pass two tests below on Win32.
- Clang :: CodeGenCXX/dyncast.cpp
- LLVM :: CodeGen/ARM/globals.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119023
91177308-0d34-0410-b5e6-
96231b3b80d8