Commit Graph

13498 Commits

Author SHA1 Message Date
Evan Cheng
bbba00c8fa Ignore 'forced' tailcall opt in fastisel mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94617 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:28:40 +00:00
Chris Lattner
b11caedd6f now that enough stuff is constified, move function header printing
logic up from X86 into the common code.  The other targets will 
hopefully start using this soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:18:44 +00:00
Chris Lattner
30c6b75ac2 constify a method argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:15:09 +00:00
Evan Cheng
1613f40bab Delete blank lines that bug me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 23:07:57 +00:00
Chris Lattner
844be89d2d call emitconstantpool and emitjumptable like other targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94601 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 22:06:58 +00:00
Chris Lattner
cee63322ea Eliminate SetDirective, and replace it with HasSetDirective.
Default HasSetDirective to true, since most targets have it.

The targets that claim to not have it probably do, or it is
spelled differently. These include Blackfin, Mips, Alpha, and
PIC16.  All of these except pic16 are normal ELF targets, so
they almost certainly have it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94585 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:40:54 +00:00
Evan Cheng
2a531673b9 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94583 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:36:21 +00:00
Rafael Espindola
2e2563bf8e Emit .comm alignment in bytes but .align in powers of 2 for ARM ELF.
Original patch by Sandeep Patel and updated by me.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94582 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:21:43 +00:00
Chris Lattner
6a315c358c eliminate MCAsmInfo::NeedsSet: we now just use .set on any platform
that has it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94581 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:20:43 +00:00
Chris Lattner
b3732fbabd don't set to the default value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94580 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 20:17:34 +00:00
Evan Cheng
ddc419c581 Code refactoring, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 19:04:47 +00:00
Dan Gohman
ea32d8f465 Remove SIL, DIL, and BPL from the GR8_NOREX allocation order also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 18:30:24 +00:00
Dan Gohman
369d4b4c2e SIL, DIL, BPL, and SPL require a REX prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 18:14:22 +00:00
Chris Lattner
f1214cbf3c eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is
subsumed by TargetLowering::getJumpTableEncoding().  Change uses of
it to be more specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94529 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:53:37 +00:00
Chris Lattner
589c6f620e Move getJTISymbol from MachineJumpTableInfo to MachineFunction,
which is more convenient, and change getPICJumpTableRelocBaseExpr
to take a MachineFunction to match.

Next, move the X86 code that create a PICBase symbol to
X86TargetLowering::getPICBaseSymbol from 
X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific 
library.  This eliminates a 'gross hack', and allows us to
implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now
calls it.

This in turn allows us to eliminate the 
X86AsmPrinter::printPICJumpTableSetLabel method, which was the
only overload of printPICJumpTableSetLabel.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94526 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 06:28:43 +00:00
Chris Lattner
e35df92eca simplify asmprinter: only emit .set directives when entries have
EK_LabelDifference32 kind and the target has .set support.  Simplify
X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94518 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:15:20 +00:00
Chris Lattner
c64daabb70 implement X86 @GOTOFF jump table entries with the new EK_Custom32
jump table entry kind, instead of overloading 
AsmPrinter::printPICJumpTableEntry.

This has a pretty horrible and inefficient FIXME around how @GOTOFF
is currently smashed into the mcsymbol name, but otherwise this is
much cleaner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94516 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 05:02:42 +00:00
Chris Lattner
f71cb015c1 add a new MachineBasicBlock::getSymbol method, replacing
the AsmPrinter::GetMBBSymbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94515 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:55:51 +00:00
Chris Lattner
1e459c4467 don't bother setting the AsmPrinter::MF ivar, now that
AsmPrinter::SetupMachineFunction sets it.  Note that systemz
and msp430 didn't.  Yay for reduced inconsistency! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94510 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:38:11 +00:00
Chris Lattner
b84822fb7b make MachineFunction keep track of its ID and make
MachineFunctionAnalysis dole them out, instead of having
AsmPrinter do both.  Have the AsmPrinter::SetupMachineFunction
method set the 'AsmPrinter::MF' variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94509 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 04:35:26 +00:00
Daniel Dunbar
c690aab230 Unbreak MSVC/CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94502 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 03:56:22 +00:00
Evan Cheng
8c7ecaf524 Implement cond ? -1 : 0 with sbb.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94490 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 02:00:44 +00:00
Dale Johannesen
11609fa2e3 Accept immediate as value of a dbg_value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94489 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:54:26 +00:00
Sean Callanan
7dcef4c475 Added the implementation of the Intel-specific
TargetAsmLexer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94482 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 01:00:10 +00:00
Dale Johannesen
5ed17ae92a Generate DEBUG_VALUE comments on x86. The (limited)
dbg.declare's we currently generate go through both
register allocators without perturbing the results.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:09:58 +00:00
Sean Callanan
cf2e3d108d Added the TargetAsmLexer implementation for AT&T syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94479 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:08:25 +00:00
Dale Johannesen
6ec25f570f use findDebugLoc in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94477 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-26 00:03:12 +00:00
Jim Grosbach
1f9b48ad87 Minor jump table cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94475 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:50:13 +00:00
Chris Lattner
5e1df8d1f7 in 32-bit pic mode for targets with a GOT, x86 emits jump table
entries with @GOTOFF whih is EK_GPRel32BlockAddress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:38:14 +00:00
Chris Lattner
281e7767df fix quoting problem jim noticed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94472 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:28:03 +00:00
Chris Lattner
071c62fad0 Rearrange handling of jump tables. Highlights:
1. MachineJumpTableInfo is now created lazily for a function the first time
   it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
   MachineJumpTableInfo::JTEntryKind enum.  This enum is determined by the
   TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
   throughout the compiler that "knows" that jump table entries are always
   32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
   their kind, instead of at machinefunction creation time.

Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94470 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:26:13 +00:00
Chris Lattner
b1e803985d prep work to support a future where getJumpTableInfo will return
a null pointer for functions with no jump tables.  No functionality
change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:22:00 +00:00
Chris Lattner
da63b3ad63 add a method to get the alignment of an integer type even
when we don't have one laying around.  Useful if you don't
have an llvmcontext handy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94468 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 23:18:11 +00:00
Johnny Chen
aeb326aad7 Make it SP, LR, PC for GPR Register Class instead of LR, SP, PC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94465 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:54:29 +00:00
Chris Lattner
44e87255e9 eliminate redundant argument to EmitJumpTableInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94464 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:41:33 +00:00
Johnny Chen
541ba7dd92 Implemented ARMInstPrinter::printThumbS4ImmOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 22:13:10 +00:00
Sean Callanan
436c48485c Implemented the dialect decision logic for the X86
TargetAsmLexer.  Dialect-specific lexing code will
be placed in the functions LexTokenATT() and
LexTokenIntel().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94456 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:59:20 +00:00
Johnny Chen
e43b6c9695 Fixed the order of GPR RegisterClass regs to be: ..., R10, R11, R12, ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:56:35 +00:00
Chris Lattner
798d125659 handle the _set_ symbol with an MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:17:10 +00:00
Chris Lattner
78f485afb7 rename MAI::PICJumpTableDirective to MAI::GPRel32Directive to
make it clear what it is, instead of how it is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94448 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:10:10 +00:00
Chris Lattner
a86106ed88 pull the non-pic jump table case out of printPICJumpTableEntry
and MCize the non-pic case.  Now printPICJumpTableEntry really
is just about printing PIC entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 21:01:58 +00:00
Chris Lattner
cba386ccac remove JumpTableDirective, it is always null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 20:52:54 +00:00
Chris Lattner
0890cf124f mcize jump table symbol manipulation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:51:38 +00:00
Chris Lattner
bfcb09688c sink an arm specific method out of asmprinter into the ARMAsmPrinter and
rename it to avoid shadowing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94440 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:39:52 +00:00
Chris Lattner
3a39f8cec8 remove dead code: the x86 target never sets usesGlobalOffsetTable,
even on x86-32/elf which uses a GOT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 19:23:04 +00:00
Chris Lattner
a6594fc715 mcstreamerize .file and .file. This also fixes an issue where the
normal form of .file would fail if the filename had a weird character
in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94437 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:58:59 +00:00
Chris Lattner
a800f7c464 emit ELF .type directives through MCStreamer instead of doing it textually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 18:33:40 +00:00
Chris Lattner
d960d3ae79 Remove support for i386 tiger tools for aligned common symbols.
Previously we would just silently miscompile code that used aligned
common's, now at least you'll get a build error.  tiger-ppc already
triggered the build error because it didn't have a version of this
logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:26:17 +00:00
Chris Lattner
6c23b1f6fe don't set value to its default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 07:23:14 +00:00
Jim Grosbach
546ae6ec77 ARM does accept the .comm directive alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-25 04:59:07 +00:00