Commit Graph

53188 Commits

Author SHA1 Message Date
David Goodwin
480c529e02 Checkpoint more aggressive anti-dependency breaking for post-ra scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 19:54:44 +00:00
Jim Grosbach
03d02d4faa Better handle instructions that re-def a scratch register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84657 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 19:52:35 +00:00
Dan Gohman
bab42bdd87 Following r84485, add Defs = [EFLAGS] to the 32-bit lock instructions too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 18:14:49 +00:00
Jeffrey Yasskin
1e86132122 Move the Function*->allocated blocks map from the JITMemoryManager to the
JITEmitter.

I'm gradually making Functions auto-remove themselves from the JIT when they're
destroyed. In this case, the Function needs to be removed from the JITEmitter,
but the map recording which Functions need to be removed lived behind the
JITMemoryManager interface, which made things difficult.

This patch replaces the deallocateMemForFunction(Function*) method with a pair
of methods deallocateFunctionBody(void *) and deallocateExceptionTable(void *)
corresponding to the two startFoo/endFoo pairs.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 18:13:21 +00:00
Jim Grosbach
f7a0c0de6d Register re-use for scavenged frame indices must check for re-deginition
of the register in the instruction which kills the scavenged value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 16:33:57 +00:00
Dan Gohman
1a49295eae Make TranslateX86CC return COND_INVALID instead of aborting when it
encounters an OEQ or UNE comparison, and update its callers to check
for this return status and recover. This fixes a problem resulting from
the LowerOperation hooks being called from LegalizeVectorOps, because
LegalizeVectorOps only lowers vectors, so OEQ and UNE comparisons may
still be at large. This fixes PR5092.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 16:22:37 +00:00
Torok Edwin
f993327e71 Fix PR5258, jump-threading creating invalid PHIs.
When an incoming value for a PHI is updated, we must also updated all other
incoming values for the same BB to match, otherwise we create invalid PHIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 15:42:00 +00:00
Torok Edwin
2b6183d254 Fix PR4313: IPSCCP was not setting the lattice value for the invoke instruction
when the invoke had multiple return values: it set the lattice value only on the
extractvalue.
This caused the invoke's lattice value to remain the default (undefined), and
later propagated to extractvalue's operand, which incorrectly introduces
undefined behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84637 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 15:15:09 +00:00
Benjamin Kramer
174101e13a Random #include pruning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 11:44:38 +00:00
Sanjiv Gupta
2edef7efdc This file is replaeced by PIC16Section.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84628 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 09:16:32 +00:00
Daniel Dunbar
80dd453b74 NNT: Implement "config mode", use -config path/to/llvm-config
- This runs the nightly test and does all the submission logic, but using the
   LLVM build specified by the llvm-config.

 - Useful for, among other things, testing NNT itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 07:30:54 +00:00
Daniel Dunbar
f27413866a NNT: Remove unused BUILDTYPE argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 07:30:46 +00:00
Chris Lattner
235e2f6a68 implement some more easy hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 06:22:33 +00:00
Chris Lattner
bf16faa16a Implement some hooks, make printOperand abort if unknown modifiers are
present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 06:15:28 +00:00
Chris Lattner
c6b8a99207 t2MOVi32imm is currently always lowered by the Thumb2ITBlockPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 05:58:02 +00:00
Daniel Dunbar
b576beaaa8 PowerPC ifdef'ing considered more complicated than one might like.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 05:33:23 +00:00
Daniel Dunbar
2685a29a8d Wire up the ARM MCInst printer, for llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 05:15:36 +00:00
Dan Gohman
07adb85cb7 Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks are
tracked. Instead of trying to manually keep track of these locations
while doing complex modifications, just recompute them when they're needed.
This fixes a bug in which the TopMBB and BotMBB were not correctly updated,
leading to invalid transformations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 04:50:37 +00:00
Evan Cheng
5f4fb86d58 Trim unnecessary includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 04:23:20 +00:00
Dan Gohman
81b16a3558 Add getTopBlock and getBottomBlock member functions to MachineLoopInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 04:16:37 +00:00
Nick Lewycky
13555eae17 Correct test for PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 04:09:50 +00:00
Daniel Dunbar
9a6d88d38b Revert "Tweak top-level Makefile to facilitate Apple-style build.", this is
breaking Clang's Apple-style build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 02:23:13 +00:00
Daniel Dunbar
9fb0b7ef35 NNT: Remove duplicate verbose print.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 02:23:05 +00:00
Jim Grosbach
8fa4efeabf Now that all ARM subtargets use frame index scavenging, the Thumb1 requires*
functions are not needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84587 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 01:32:47 +00:00
Evan Cheng
0222a8cfb8 If the physical register being spilled does not have an interval, spill its sub-registers instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84586 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 01:31:09 +00:00
Jim Grosbach
7e831db1d4 Enable post-pass frame index register scavenging for ARM and Thumb2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 01:26:58 +00:00
Chris Lattner
161dcbf799 lower ARM::MOVi32imm properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 01:11:37 +00:00
Chris Lattner
292df8eb1f add support for external symbols. The mc instprinter can now handle
reasonable code like Codegen/ARM/2009-02-27-SpillerBug.ll, producing 
identical output except for superior formatting of constant pool entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:56:16 +00:00
Chris Lattner
96bc2173bb get fancy: support basic block operands. Yay for jumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:52:47 +00:00
Chris Lattner
233917c072 add supprort for the 'sbit' operand, MOVi apparently has one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84577 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:46:11 +00:00
Chris Lattner
413ae25fb5 add support for instruction predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:42:49 +00:00
Chris Lattner
017d9478d5 implement printSORegOperand, add lowering for the nasty and despicable MOVi2pieces :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84573 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:40:56 +00:00
Jim Grosbach
1fc1dc0682 Refs: A8-598.
Leave Inst{11-8}, which represents the starting byte index of the extracted
result in the concatenation of the operands and is left unspecified.

Patch by Johnny Chen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84572 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:38:19 +00:00
Jim Grosbach
780d207d1c Add missing encoding bits to NLdSt class of instructions.
Patch by Johnny Chen.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20 00:19:08 +00:00
Chris Lattner
af0df67d2b X86 should ignore implicit regs when lowering to MCInst also,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84567 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 23:35:57 +00:00
Chris Lattner
306d14f9aa handle addmode4 modifiers, fix a fixme in printRegisterList
by ignoring all implicit regs when lowering.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84566 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 23:31:43 +00:00
Chris Lattner
84d8bf9d28 simplify by using the twine form of GetOrCreateSymbol
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 23:05:23 +00:00
Oscar Fuentes
8e6323c8b9 Updated cmake library dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 23:00:00 +00:00
Jim Grosbach
6009751244 Enable allocation of R3 in Thumb1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84563 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:57:03 +00:00
Chris Lattner
5a207897bc use EmitLabel instead of text emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84562 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:51:16 +00:00
Chris Lattner
7c5b021793 add a twine version of MCContext::GetOrCreateSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84561 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:49:00 +00:00
Chris Lattner
a70e644820 lower the ARM::CONSTPOOL_ENTRY pseudo op, giving us constant pool entries
like:

@ BB#1:
	.align	2
LCPI1_0:
	.long	L_.str-(LPC0+8)

Note that proper indentation of the label :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:33:05 +00:00
Jim Grosbach
d482f55af1 Adjust the scavenge register spilling to allow the target to choose an
appropriate restore location for the spill as well as perform the actual
save and restore.

The Thumb1 target uses this to make sure R12 is not clobbered while a spilled
scavenger register is live there.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84554 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:27:30 +00:00
Chris Lattner
4d15222341 add MCInstLower support for lowering ARM::PICADD, a pseudo op for pic stuffola.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:23:04 +00:00
Owen Anderson
d41ed4e2c4 Refactor lookup_or_add to contain _MUCH_ less duplicated code. Add support for
numbering first class aggregate instructions while we're at it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:14:22 +00:00
Chris Lattner
e306d8d6cc add register list and hacked up addrmode #4 support, we now get this:
_main:
	stmsp! sp!, {r7, lr}
	mov r7, sp
	sub sp, sp, #4
	mov r0, #0
	str r0, [sp]
	ldr r0, LCPI1_0
	bl _printf
	ldr r0, [sp]
	mov sp, r7
	ldmsp! sp!, {r7, pc}

Note the unhappy ldm/stm because of modifiers being ignored.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84546 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 22:09:23 +00:00
Chris Lattner
3310a963cf revert r84540, fixing build breakage I didn't see because of
broken makefile deps :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 21:59:25 +00:00
Chris Lattner
084f87d445 add addrmode2 support, getting us up to:
_main:
	stm , 
	mov r7, sp
	sub sp, sp, #4
	mov r0, #0
	str r0, [sp]
	ldr r0, LCPI1_0
	bl _printf
	ldr r0, [sp]
	mov sp, r7
	ldm , 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 21:57:05 +00:00
Chris Lattner
6f99776f6c add jump tables, constant pools and some trivial global
lowering stuff.  We can now compile hello world to:

_main:
	stm , 
	mov r7, sp
	sub sp, sp, #4
	mov r0, #0
	str r0, 
	ldr r0, 
	bl _printf
	ldr r0, 
	mov sp, r7
	ldm , 

Almost looks like arm code :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 21:53:00 +00:00
Victor Hernandez
93bb60d379 Malloc calls are marked NoAlias, so the code below the isMalloc() check makes it redundant. Removing the isMalloc() check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-19 21:47:22 +00:00