oota-llvm.git
15 years agoHandle external symbols
Anton Korobeynikov [Wed, 21 Oct 2009 00:13:42 +0000 (00:13 +0000)]
Handle external symbols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84711 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDistinguish between pcrel imm operands and 'normal' ones. Fix fixes gross weirdness...
Anton Korobeynikov [Wed, 21 Oct 2009 00:13:25 +0000 (00:13 +0000)]
Distinguish between pcrel imm operands and 'normal' ones. Fix fixes gross weirdness of asmprinting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84710 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd basic block operands & jump kinds
Anton Korobeynikov [Wed, 21 Oct 2009 00:13:05 +0000 (00:13 +0000)]
Add basic block operands & jump kinds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84709 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore all implicit reg operands
Anton Korobeynikov [Wed, 21 Oct 2009 00:12:44 +0000 (00:12 +0000)]
Ignore all implicit reg operands

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84708 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a workaround for different memops prefixes
Anton Korobeynikov [Wed, 21 Oct 2009 00:12:27 +0000 (00:12 +0000)]
Add a workaround for different memops prefixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84707 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheckpoint MCInst printer. We (almostly) able to print global / JT / constpool entries
Anton Korobeynikov [Wed, 21 Oct 2009 00:12:08 +0000 (00:12 +0000)]
Checkpoint MCInst printer. We (almostly) able to print global / JT / constpool entries

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84706 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd reg-imm tests
Anton Korobeynikov [Wed, 21 Oct 2009 00:11:44 +0000 (00:11 +0000)]
Add reg-imm tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84705 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd simple operand printing stuff
Anton Korobeynikov [Wed, 21 Oct 2009 00:11:27 +0000 (00:11 +0000)]
Add simple operand printing stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84704 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd experimental MSP430 MCInstLowering stuff
Anton Korobeynikov [Wed, 21 Oct 2009 00:11:08 +0000 (00:11 +0000)]
Add experimental MSP430 MCInstLowering stuff

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84703 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWire up MSP430 printMCInst() method
Anton Korobeynikov [Wed, 21 Oct 2009 00:10:47 +0000 (00:10 +0000)]
Wire up MSP430 printMCInst() method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84702 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd MSP430 InstPrinter stub
Anton Korobeynikov [Wed, 21 Oct 2009 00:10:30 +0000 (00:10 +0000)]
Add MSP430 InstPrinter stub

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84701 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse proper target data
Anton Korobeynikov [Wed, 21 Oct 2009 00:10:00 +0000 (00:10 +0000)]
Use proper target data

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84700 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRespect src register allocation requirements when breaking anti-dependencies. Remove...
David Goodwin [Tue, 20 Oct 2009 22:50:43 +0000 (22:50 +0000)]
Respect src register allocation requirements when breaking anti-dependencies. Remove some dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84691 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCosmetic changes.
Devang Patel [Tue, 20 Oct 2009 22:50:27 +0000 (22:50 +0000)]
Cosmetic changes.

s/validName/isValidName/g
s/with an Instruction/to an Instruction/g
s/RegisterMDKind/registerMDKind/g

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84689 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix -Asserts warning.
Daniel Dunbar [Tue, 20 Oct 2009 22:10:05 +0000 (22:10 +0000)]
Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84687 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix invalid for vector types fneg(bitconvert(x)) => bitconvert(x ^ sign)
Anton Korobeynikov [Tue, 20 Oct 2009 21:37:45 +0000 (21:37 +0000)]
Fix invalid for vector types fneg(bitconvert(x)) => bitconvert(x ^ sign)
transform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84683 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOops. Backing out 84681 - needs to wait for the indexing patch.
Lang Hames [Tue, 20 Oct 2009 21:28:22 +0000 (21:28 +0000)]
Oops. Backing out 84681 - needs to wait for the indexing patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84682 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded some debugging output to pre-alloc splitting.
Lang Hames [Tue, 20 Oct 2009 21:25:13 +0000 (21:25 +0000)]
Added some debugging output to pre-alloc splitting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84681 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a real testcase for PR4313
Chris Lattner [Tue, 20 Oct 2009 21:04:26 +0000 (21:04 +0000)]
add a real testcase for PR4313

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84676 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a test similar to that needed for PR4313, but that doesn't
Chris Lattner [Tue, 20 Oct 2009 21:00:47 +0000 (21:00 +0000)]
add a test similar to that needed for PR4313, but that doesn't
fail without the patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84675 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothe date on this testcase is wrong, it is unreduced, and it passes without the fix...
Chris Lattner [Tue, 20 Oct 2009 20:57:58 +0000 (20:57 +0000)]
the date on this testcase is wrong, it is unreduced, and it passes without the fix for PR4313.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84674 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix another place that calls Loop::contains a lot to construct a sorted
Dan Gohman [Tue, 20 Oct 2009 20:41:13 +0000 (20:41 +0000)]
Fix another place that calls Loop::contains a lot to construct a sorted
container of the blocks and do efficient lookups. This makes
isLoopSimplifyForm much faster on large loops, fixing a significant
compile-time issue in builds with assertions enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84673 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge and filecheckize
Chris Lattner [Tue, 20 Oct 2009 20:39:43 +0000 (20:39 +0000)]
merge and filecheckize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84672 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge two tests and convert to filecheck.
Chris Lattner [Tue, 20 Oct 2009 20:33:46 +0000 (20:33 +0000)]
merge two tests and convert to filecheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84671 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable by default while debugging
Jim Grosbach [Tue, 20 Oct 2009 20:31:31 +0000 (20:31 +0000)]
Disable by default while debugging

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84669 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoalternate fix for PR5258 which avoids worklist problems, with reduced testcase.
Chris Lattner [Tue, 20 Oct 2009 20:27:49 +0000 (20:27 +0000)]
alternate fix for PR5258 which avoids worklist problems, with reduced testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84667 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd cmd line opt to disable frame index reuse for ARM and T2. debug aid.
Jim Grosbach [Tue, 20 Oct 2009 20:19:50 +0000 (20:19 +0000)]
add cmd line opt to disable frame index reuse for ARM and T2. debug aid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84664 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRestore LoopUnswitch's block-oriented threshold. LoopUnswitch now checks both
Dan Gohman [Tue, 20 Oct 2009 20:06:09 +0000 (20:06 +0000)]
Restore LoopUnswitch's block-oriented threshold. LoopUnswitch now checks both
the estimated code size and the number of blocks when deciding whether to
do a non-trivial unswitch. This protects it from some very undesirable
worst-case behavior on large numbers of loop-unswitchable conditions, such
as in the testcase in PR5259.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84661 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCheckpoint more aggressive anti-dependency breaking for post-ra scheduler.
David Goodwin [Tue, 20 Oct 2009 19:54:44 +0000 (19:54 +0000)]
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

15 years agoBetter handle instructions that re-def a scratch register
Jim Grosbach [Tue, 20 Oct 2009 19:52:35 +0000 (19:52 +0000)]
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

15 years agoFollowing r84485, add Defs = [EFLAGS] to the 32-bit lock instructions too.
Dan Gohman [Tue, 20 Oct 2009 18:14:49 +0000 (18:14 +0000)]
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

15 years agoMove the Function*->allocated blocks map from the JITMemoryManager to the
Jeffrey Yasskin [Tue, 20 Oct 2009 18:13:21 +0000 (18:13 +0000)]
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

15 years agoRegister re-use for scavenged frame indices must check for re-deginition
Jim Grosbach [Tue, 20 Oct 2009 16:33:57 +0000 (16:33 +0000)]
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

15 years agoMake TranslateX86CC return COND_INVALID instead of aborting when it
Dan Gohman [Tue, 20 Oct 2009 16:22:37 +0000 (16:22 +0000)]
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

15 years agoFix PR5258, jump-threading creating invalid PHIs.
Torok Edwin [Tue, 20 Oct 2009 15:42:00 +0000 (15:42 +0000)]
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

15 years agoFix PR4313: IPSCCP was not setting the lattice value for the invoke instruction
Torok Edwin [Tue, 20 Oct 2009 15:15:09 +0000 (15:15 +0000)]
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

15 years agoRandom #include pruning.
Benjamin Kramer [Tue, 20 Oct 2009 11:44:38 +0000 (11:44 +0000)]
Random #include pruning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84632 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis file is replaeced by PIC16Section.h.
Sanjiv Gupta [Tue, 20 Oct 2009 09:16:32 +0000 (09:16 +0000)]
This file is replaeced by PIC16Section.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84628 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNNT: Implement "config mode", use -config path/to/llvm-config
Daniel Dunbar [Tue, 20 Oct 2009 07:30:54 +0000 (07:30 +0000)]
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

15 years agoNNT: Remove unused BUILDTYPE argument.
Daniel Dunbar [Tue, 20 Oct 2009 07:30:46 +0000 (07:30 +0000)]
NNT: Remove unused BUILDTYPE argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84619 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement some more easy hooks.
Chris Lattner [Tue, 20 Oct 2009 06:22:33 +0000 (06:22 +0000)]
implement some more easy hooks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84614 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement some hooks, make printOperand abort if unknown modifiers are
Chris Lattner [Tue, 20 Oct 2009 06:15:28 +0000 (06:15 +0000)]
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

15 years agot2MOVi32imm is currently always lowered by the Thumb2ITBlockPass.
Chris Lattner [Tue, 20 Oct 2009 05:58:02 +0000 (05:58 +0000)]
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

15 years agoPowerPC ifdef'ing considered more complicated than one might like.
Daniel Dunbar [Tue, 20 Oct 2009 05:33:23 +0000 (05:33 +0000)]
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

15 years agoWire up the ARM MCInst printer, for llvm-mc.
Daniel Dunbar [Tue, 20 Oct 2009 05:15:36 +0000 (05:15 +0000)]
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

15 years agoRe-apply r84295, with fixes to how the loop "top" and "bottom" blocks are
Dan Gohman [Tue, 20 Oct 2009 04:50:37 +0000 (04:50 +0000)]
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

15 years agoTrim unnecessary includes.
Evan Cheng [Tue, 20 Oct 2009 04:23:20 +0000 (04:23 +0000)]
Trim unnecessary includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84597 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd getTopBlock and getBottomBlock member functions to MachineLoopInfo.
Dan Gohman [Tue, 20 Oct 2009 04:16:37 +0000 (04:16 +0000)]
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

15 years agoCorrect test for PowerPC.
Nick Lewycky [Tue, 20 Oct 2009 04:09:50 +0000 (04:09 +0000)]
Correct test for PowerPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84595 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert "Tweak top-level Makefile to facilitate Apple-style build.", this is
Daniel Dunbar [Tue, 20 Oct 2009 02:23:13 +0000 (02:23 +0000)]
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

15 years agoNNT: Remove duplicate verbose print.
Daniel Dunbar [Tue, 20 Oct 2009 02:23:05 +0000 (02:23 +0000)]
NNT: Remove duplicate verbose print.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84591 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNow that all ARM subtargets use frame index scavenging, the Thumb1 requires*
Jim Grosbach [Tue, 20 Oct 2009 01:32:47 +0000 (01:32 +0000)]
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

15 years agoIf the physical register being spilled does not have an interval, spill its sub-regis...
Evan Cheng [Tue, 20 Oct 2009 01:31:09 +0000 (01:31 +0000)]
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

15 years agoEnable post-pass frame index register scavenging for ARM and Thumb2
Jim Grosbach [Tue, 20 Oct 2009 01:26:58 +0000 (01:26 +0000)]
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

15 years agolower ARM::MOVi32imm properly.
Chris Lattner [Tue, 20 Oct 2009 01:11:37 +0000 (01:11 +0000)]
lower ARM::MOVi32imm properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84583 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd support for external symbols. The mc instprinter can now handle
Chris Lattner [Tue, 20 Oct 2009 00:56:16 +0000 (00:56 +0000)]
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

15 years agoget fancy: support basic block operands. Yay for jumps.
Chris Lattner [Tue, 20 Oct 2009 00:52:47 +0000 (00:52 +0000)]
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

15 years agoadd supprort for the 'sbit' operand, MOVi apparently has one.
Chris Lattner [Tue, 20 Oct 2009 00:46:11 +0000 (00:46 +0000)]
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

15 years agoadd support for instruction predicates.
Chris Lattner [Tue, 20 Oct 2009 00:42:49 +0000 (00:42 +0000)]
add support for instruction predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84575 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement printSORegOperand, add lowering for the nasty and despicable MOVi2pieces :)
Chris Lattner [Tue, 20 Oct 2009 00:40:56 +0000 (00:40 +0000)]
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

15 years agoRefs: A8-598.
Jim Grosbach [Tue, 20 Oct 2009 00:38:19 +0000 (00:38 +0000)]
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

15 years agoAdd missing encoding bits to NLdSt class of instructions.
Jim Grosbach [Tue, 20 Oct 2009 00:19:08 +0000 (00:19 +0000)]
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

15 years agoX86 should ignore implicit regs when lowering to MCInst also,
Chris Lattner [Mon, 19 Oct 2009 23:35:57 +0000 (23:35 +0000)]
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

15 years agohandle addmode4 modifiers, fix a fixme in printRegisterList
Chris Lattner [Mon, 19 Oct 2009 23:31:43 +0000 (23:31 +0000)]
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

15 years agosimplify by using the twine form of GetOrCreateSymbol
Chris Lattner [Mon, 19 Oct 2009 23:05:23 +0000 (23:05 +0000)]
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

15 years agoUpdated cmake library dependencies.
Oscar Fuentes [Mon, 19 Oct 2009 23:00:00 +0000 (23:00 +0000)]
Updated cmake library dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84564 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnable allocation of R3 in Thumb1
Jim Grosbach [Mon, 19 Oct 2009 22:57:03 +0000 (22:57 +0000)]
Enable allocation of R3 in Thumb1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84563 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse EmitLabel instead of text emission
Chris Lattner [Mon, 19 Oct 2009 22:51:16 +0000 (22:51 +0000)]
use EmitLabel instead of text emission

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84562 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a twine version of MCContext::GetOrCreateSymbol.
Chris Lattner [Mon, 19 Oct 2009 22:49:00 +0000 (22:49 +0000)]
add a twine version of MCContext::GetOrCreateSymbol.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84561 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolower the ARM::CONSTPOOL_ENTRY pseudo op, giving us constant pool entries
Chris Lattner [Mon, 19 Oct 2009 22:33:05 +0000 (22:33 +0000)]
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

15 years agoAdjust the scavenge register spilling to allow the target to choose an
Jim Grosbach [Mon, 19 Oct 2009 22:27:30 +0000 (22:27 +0000)]
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

15 years agoadd MCInstLower support for lowering ARM::PICADD, a pseudo op for pic stuffola.
Chris Lattner [Mon, 19 Oct 2009 22:23:04 +0000 (22:23 +0000)]
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

15 years agoRefactor lookup_or_add to contain _MUCH_ less duplicated code. Add support for
Owen Anderson [Mon, 19 Oct 2009 22:14:22 +0000 (22:14 +0000)]
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

15 years agoadd register list and hacked up addrmode #4 support, we now get this:
Chris Lattner [Mon, 19 Oct 2009 22:09:23 +0000 (22:09 +0000)]
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

15 years agorevert r84540, fixing build breakage I didn't see because of
Chris Lattner [Mon, 19 Oct 2009 21:59:25 +0000 (21:59 +0000)]
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

15 years agoadd addrmode2 support, getting us up to:
Chris Lattner [Mon, 19 Oct 2009 21:57:05 +0000 (21:57 +0000)]
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

15 years agoadd jump tables, constant pools and some trivial global
Chris Lattner [Mon, 19 Oct 2009 21:53:00 +0000 (21:53 +0000)]
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

15 years agoMalloc calls are marked NoAlias, so the code below the isMalloc() check makes it...
Victor Hernandez [Mon, 19 Oct 2009 21:47:22 +0000 (21:47 +0000)]
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

15 years agopass mangler in as a reference instead of a pointer.
Chris Lattner [Mon, 19 Oct 2009 21:45:31 +0000 (21:45 +0000)]
pass mangler in as a reference instead of a pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84540 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore refactoring...
Mikhail Glushenkov [Mon, 19 Oct 2009 21:24:28 +0000 (21:24 +0000)]
More refactoring...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84537 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreduce #includes
Chris Lattner [Mon, 19 Oct 2009 21:23:15 +0000 (21:23 +0000)]
reduce #includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84536 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd printing support for SOImm operands, getting us to:
Chris Lattner [Mon, 19 Oct 2009 21:21:39 +0000 (21:21 +0000)]
add printing support for SOImm operands, getting us to:

_main:
stm ,
mov r7, sp
sub sp, sp, #4
mov r0, #0
str r0,

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84535 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify some code.
Owen Anderson [Mon, 19 Oct 2009 21:14:57 +0000 (21:14 +0000)]
Simplify some code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84533 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowire up some basic printOperand goodness, giving us stuff like this before
Chris Lattner [Mon, 19 Oct 2009 20:59:55 +0000 (20:59 +0000)]
wire up some basic printOperand goodness, giving us stuff like this before
we abort:

_main:
stm ,
mov r7, sp
sub sp, sp,
mov r0,
str r0,

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84532 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd the files that go with the previous rev
Chris Lattner [Mon, 19 Oct 2009 20:21:05 +0000 (20:21 +0000)]
add the files that go with the previous rev

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84531 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowire up skeletal support for having llc print instructions
Chris Lattner [Mon, 19 Oct 2009 20:20:46 +0000 (20:20 +0000)]
wire up skeletal support for having llc print instructions
through mcinst lowering -> mcinstprinter, when llc is passed
the -enable-arm-mcinst-printer flag.  Currently this
is very "aborty".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84530 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBanish ConstantsLock. It's serving no purpose other than slowing things down
Owen Anderson [Mon, 19 Oct 2009 20:11:52 +0000 (20:11 +0000)]
Banish ConstantsLock.  It's serving no purpose other than slowing things down
at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84529 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowire up ARM's printMCInst method. Now llvm-mc should be able to produce
Chris Lattner [Mon, 19 Oct 2009 19:59:05 +0000 (19:59 +0000)]
wire up ARM's printMCInst method.  Now llvm-mc should be able to produce
"something" when printing MCInsts, it will just be missing all the
operand info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84528 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostub out a minimal ARMInstPrinter.
Chris Lattner [Mon, 19 Oct 2009 19:56:26 +0000 (19:56 +0000)]
stub out a minimal ARMInstPrinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84527 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove strings from instructions who are never asmprinted.
Chris Lattner [Mon, 19 Oct 2009 19:51:42 +0000 (19:51 +0000)]
remove strings from instructions who are never asmprinted.
All of these "subreg32" modifier instructions are handled
explicitly by the MCInst lowering phase.  If they got to
the asmprinter, they would explode.  They should eventually
be replace with correct use of subregs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84526 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up the JITResolver stub/callsite<->function maps.
Jeffrey Yasskin [Mon, 19 Oct 2009 18:49:59 +0000 (18:49 +0000)]
Clean up the JITResolver stub/callsite<->function maps.

The JITResolver maps Functions to their canonical stubs and all callsites for
lazily-compiled functions to their target Functions. To make Function
destruction work, I'm going to need to remove all callsites on destruction, so
this patch also adds the reverse mapping for that.

There was an incorrect assumption in here that the only stub for a function
would be the one caused by needing to lazily compile it, while x86-64 far calls
and dlsym-stubs could also cause such stubs, but I didn't look for a test case
that the assumption broke.

This also adds DenseMapInfo<AssertingVH> so I can use DenseMaps instead of
std::maps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84522 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify code, reducing string thrashing.
Chris Lattner [Mon, 19 Oct 2009 18:49:14 +0000 (18:49 +0000)]
simplify code, reducing string thrashing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84521 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch hidden gv stubs to use MachineModuleInfoMachO instead of a custom map.
Chris Lattner [Mon, 19 Oct 2009 18:44:38 +0000 (18:44 +0000)]
switch hidden gv stubs to use MachineModuleInfoMachO instead of a custom map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84520 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse MachineModuleInfoMachO for non-lazy gv stubs instead of a private map.
Chris Lattner [Mon, 19 Oct 2009 18:38:33 +0000 (18:38 +0000)]
use MachineModuleInfoMachO for non-lazy gv stubs instead of a private map.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84519 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconvert to filecheck syntax and make a lot more aggressive.
Chris Lattner [Mon, 19 Oct 2009 18:27:56 +0000 (18:27 +0000)]
convert to filecheck syntax and make a lot more aggressive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84517 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r84295, this unbreaks llvm-gcc bootstrap on x86-64/linux
Anton Korobeynikov [Mon, 19 Oct 2009 18:21:09 +0000 (18:21 +0000)]
Revert r84295, this unbreaks llvm-gcc bootstrap on x86-64/linux

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84516 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename test
Chris Lattner [Mon, 19 Oct 2009 18:18:07 +0000 (18:18 +0000)]
rename test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84515 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove dead map
Chris Lattner [Mon, 19 Oct 2009 18:11:25 +0000 (18:11 +0000)]
remove dead map

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84513 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodon't bother trying to avoid emitting redundant constant pool alignment directives.
Chris Lattner [Mon, 19 Oct 2009 18:08:02 +0000 (18:08 +0000)]
don't bother trying to avoid emitting redundant constant pool alignment directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84512 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove accidental comment.
Chris Lattner [Mon, 19 Oct 2009 18:03:41 +0000 (18:03 +0000)]
remove accidental comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84510 91177308-0d34-0410-b5e6-96231b3b80d8