Commit Graph

56163 Commits

Author SHA1 Message Date
Anton Korobeynikov
3af4a0b4cb Add instruction formats & support stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93550 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 21:17:13 +00:00
Jakob Stoklund Olesen
33cc8d6b55 Don't make changes to the MBB in MachineBasicBlock::canFallThrough().
This fixes the regression for -pre-regalloc-taildup in
MultiSource/Applications/lambda-0.1.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 20:00:12 +00:00
Jakob Stoklund Olesen
057d53993c Simplify logic. Any functional change is unintended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93540 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:59:57 +00:00
Chris Lattner
9521c95f97 unbreak the build, grr symlinks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93539 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:51:05 +00:00
David Greene
ac931c011f Add some debug routines to SelectionDAG to dump full DAGs.
print/dumpWithDepth allows one to dump a DAG up to N levels deep.
dump/printWithFullDepth prints the whole DAG, subject to a depth limit
on 100 in the default case (to prevent infinite recursion).

Have CannotYetSelect to a dumpWithFullDepth so it is clearer exactly
what the non-matching DAG looks like.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93538 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:43:23 +00:00
Chris Lattner
54482b472a fix a bug in range information for $42, eliminate an
unneeded argument from ParseExpression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93536 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:39:23 +00:00
Chris Lattner
0a3c5a54a1 add range information for mem X86Operand's, now all
X86Operand's have range info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:33:43 +00:00
Chris Lattner
b4307b3370 extend MCAsmParser::ParseExpression and ParseParenExpression
to return range information for subexpressions.  Use this to
provide range info for several new X86Operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93534 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:28:38 +00:00
Chris Lattner
1f19f0f31d give X86Operand a ctor and start passing SMLoc's into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93532 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:06:59 +00:00
Victor Hernandez
3a32865d58 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93531 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 19:04:09 +00:00
Dale Johannesen
3752d2fe34 Revert 93499. After discussion with Chris we agreed
FrameIndexes should be lowered, but the same way as
everything else (target dependent) rather than in a
special hacked way.  The lowering needs to be done
for eventual purposes of Dwarf generation.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93530 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:58:14 +00:00
Chris Lattner
29ef9a21dd add range location info for registers, change
X86Operand::Create* implementations to avoid
copy ctor use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93528 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:51:29 +00:00
Nate Begeman
3fe980b127 Hook up llc's -filetype=obj to use MCStreamer if an MCCodeEmitter is available.
Remove most of old Mach-O Writer support, it has been replaced by MCMachOStreamer

Further refactoring to completely remove MachOWriter and drive the object file
writer with the AsmPrinter MCInst/MCSection logic is forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93527 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:51:18 +00:00
Chris Lattner
309264d1e4 clean up the memory management of the operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:44:13 +00:00
Chris Lattner
23075746a1 refactor ParseRegister to avoid using X86Operand as a temporary
datastructure when parsing a mem operand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:27:19 +00:00
Chris Lattner
df7a680964 mention that unwind isn't to be trusted, patch by Dustin Laurence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 18:08:37 +00:00
Victor Hernandez
5f03238d62 Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 17:36:47 +00:00
Jay Foad
46a49da410 Test case for http://llvm.org/PR6028.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 11:29:26 +00:00
Jay Foad
5b3701256c Fix http://llvm.org/PR6028, an assertion failure when an UndefValue of
integer type is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 08:32:58 +00:00
Bob Wilson
bfdcf3bd49 Change pre-regalloc tail duplication to only duplicate indirect branch blocks.
The pre-regalloc pass caused some regressions in both compile time and
performance of the generated code, and it did not improve performance, except
for indirect branches.  I also moved the check for single-block loops to speed
up the common case when running the taildup pass before reg allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93505 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 06:29:17 +00:00
Victor Hernandez
283ba2fbb4 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 03:37:48 +00:00
Anton Korobeynikov
8396a17bc3 Temporary disable tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93501 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 02:09:27 +00:00
Dale Johannesen
bc971c1575 Lower FrameIndex operand of DEBUG_VALUE (specially) and
print it as a comment on X86.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 01:54:55 +00:00
Dale Johannesen
243a32f96b Remove DEBUG_DECLARE, looks like we don't need it.
Also, DEBUG_VALUE has side effects.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93498 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 01:50:44 +00:00
Anton Korobeynikov
f7ed979257 Fix cmp emission on msp430: we definitely should turn stuff like
"icmp lhs, rhs" into "cmp rhs, lhs". This should fix PR5979.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93496 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 01:29:49 +00:00
Devang Patel
c9b16cc108 Do not use AT_specification die for static variables. It confuses gdb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93494 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 01:12:22 +00:00
Jeffrey Yasskin
3581d662e9 Make sure include/llvm/MC/MCParsedAsmOperand.h can be compiled alone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93492 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:41:53 +00:00
Jim Grosbach
f4549b02a7 fix 80-column violations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93487 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:36:15 +00:00
Devang Patel
82341e0e61 new test case for r93485.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93486 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:34:26 +00:00
Jim Grosbach
03825f8401 Fix 80 column violations and clean up whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93484 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:32:47 +00:00
Devang Patel
f8b72ca6c8 Do not emit multiple AT_container_type attributes.
We need to find a better way to emit this info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93481 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:26:31 +00:00
Jim Grosbach
867bbbfff7 Name change for consistency. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:22:18 +00:00
Jim Grosbach
5efaed3bf4 EmitAtomicCmpSwap() custome inserter needs to delete the MI passed in. EmitAtomicBinary() already does this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-15 00:18:34 +00:00
Jeffrey Yasskin
13c10c4e49 Teach PPC how to replaceMachineCodeForFunction correctly. (Fixes
JITTest.FunctionIsRecompiledAndRelinked.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 23:15:26 +00:00
Eric Christopher
83c20d3fb3 Pad my commit stats by reducing indentation in this now separate
commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93473 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 23:00:10 +00:00
Johnny Chen
51bc5612b3 Added 16-bit Thumb Load/Store immediate instructions with encoding bits so that
the disassembler can properly decode Load/Store register/immediate instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93471 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:42:17 +00:00
Chris Lattner
9d3c755fd6 add virtual methods to get the start/end of a MCParsedAsmOperand,
the default implementation returns "unknown".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:29:57 +00:00
Chris Lattner
9898671a74 Split the TargetAsmParser "ParseInstruction" interface in half:
the new ParseInstruction method just parses and returns a list of
target operands.  A new MatchInstruction interface is used to
turn the operand list into an MCInst.

This requires new/deleting all the operands, but it also gives 
targets the ability to use polymorphic operands if they want to. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:21:20 +00:00
Anton Korobeynikov
74a265686d Add variable-width shifts for MSP430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:09:38 +00:00
Anton Korobeynikov
5fcf52ccf3 Remove pseudo-MI in custom inserter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93467 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 22:09:11 +00:00
Dale Johannesen
cf0b76649b Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93463 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:50:17 +00:00
Eric Christopher
745d8c95ef Few minor changes that were requested. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93462 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:48:00 +00:00
Jim Grosbach
86e69fa901 Add comment explaining the necessity of r93456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:38:31 +00:00
Chris Lattner
f007e853e2 prune #includes in TargetAsmParser.h
Pass in SMLoc of instr opcode into ParseInstruction.
Make AsmToken be a class, not a struct.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:32:45 +00:00
Jim Grosbach
9f82da7cbf Dwarf EH prepare needs to be run after SjLj prepare. Otherwise,
catch info can get misplaced when a selector ends up more than one block
removed from the parent invoke(s). This could happen when a landing pad is
shared by multiple invokes and is also a target of a normal edge from
elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:22:16 +00:00
Chris Lattner
7659389d0d introduce MCParsedAsmOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:21:40 +00:00
Chris Lattner
45220a8439 introduce the MCParsedAsmOperand class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:20:55 +00:00
Evan Cheng
1a67dd2d47 Small tweak to inline cost computation. Ext of i/fcmp results are mostly optimized away in codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 21:04:31 +00:00
Anton Korobeynikov
f4b6d88cda Remove spurious semicolon.
Patch by Diego Iastrubni!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 20:19:51 +00:00
Victor Hernandez
e05f66ef2e In debug builds, assert that function-local metadata has only 1 parent function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-14 20:12:34 +00:00