Commit Graph

5270 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
43b5f9312d make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 20:43:08 +00:00
Chris Lattner
75f265fbbb fix a parsing problem on instructions like:
movw	$8, (_cost_table_-L97$pb)+66(%eax)

After the parens, we could still have a binop.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94345 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 01:07:33 +00:00
Mon P Wang
eb38ebf15c Improved widening loads by adding support for wider loads if
the alignment allows.  Fixed a bug where we didn't use a
vector load/store for PR5626.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94338 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-24 00:05:03 +00:00
Chris Lattner
f9f93e4388 resolve a fixme: the "nonexecutable stack directive" is actually
a .section.  Switch to it with SwitchSection.

However, I think that this directive should be safe on any ELF target.
If so, we should hoist it up out of the X86 and SystemZ targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 07:21:06 +00:00
Chris Lattner
a5ad93a10a move the various directive enums out of the MCStreamer class
into a new MCDirectives.h file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94294 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:39:22 +00:00
Eric Christopher
e9625cf698 Don't lower splat vector load to relative to the esp if the
stack may be misaligned.

Update test accordingly.

Patch by Evan Cheng!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 06:02:43 +00:00
Chris Lattner
64c2b24498 use some helpers instead of duplicating logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94285 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 05:26:25 +00:00
Ted Kremenek
b2dc8f3b00 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 04:01:37 +00:00
Sean Callanan
e88f55254c Added the skeleton for the implementation of the X86
target-specific AsmLexer, and added the appropriate
registration calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 02:43:15 +00:00
Sean Callanan
e9b466d4f0 Modified the register matcher function in AsmMatcher to
be static.  Also made it possible for clients to get it
and no other functions from ...GenAsmMatcher.inc by
defining REGISTERS_ONLY before including GenAsmMatcher.inc.
This sets the stage for target-specific lexers that can
identify registers and return AsmToken::Register as
appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-23 00:40:33 +00:00
Evan Cheng
afc36739cd Be more conservative with clustering f32 / f64 loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 23:49:11 +00:00
Daniel Dunbar
8a3ee718cd Mark EH_RETURN64 as CodeGenOnly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 20:16:37 +00:00
Chris Lattner
e73a31f667 Stop building RTTI information for *most* llvm libraries. Notable
missing ones are libsupport, libsystem and libvmcore.  libvmcore is
currently blocked on bugpoint, which uses EH.  Once it stops using
EH, we can switch it off.

This #if 0's out 3 unit tests, because gtest requires RTTI information.
Suggestions welcome on how to fix this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 06:49:46 +00:00
Evan Cheng
96dc115ef3 Add two target hooks to determine whether two loads are near and should be scheduled together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94147 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 03:34:51 +00:00
Chris Lattner
c6ef277a0b create a new MCParser library and move some stuff into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94129 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-22 01:44:57 +00:00
Dan Gohman
a10756ee65 Re-implement the main strength-reduction portion of LoopStrengthReduction.
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.

It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94061 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 02:09:26 +00:00
Evan Cheng
94da721d8c Fix a minor issue in x86 load / store folding table. movups does an unaligned load so it doesn't require 16-byte alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94058 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-21 00:55:14 +00:00
Dale Johannesen
73e884bb3e make findDebugLoc a class method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 21:36:02 +00:00
David Greene
cf495bc2e5 When XDEBUG is enabled, check for SelectionDAG cycles at some key
points.  This will help us find future problems like the one
described in PR6019.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94019 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 20:13:31 +00:00
Chris Lattner
8eeba35bab revert 93934, removing the MCAsmInfo endianness bit. I can't
stomache MCAsmInfo having this, and I found a better solution to
this layering issue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93985 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 06:34:14 +00:00
Dale Johannesen
918f0f0bea Move findDebugLoc somewhere more central. Fix
more cases where debug declarations affect
debug line info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93953 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-20 00:19:24 +00:00
Dale Johannesen
bbe2bbeac8 Fix a case where debug_value was perturbing the
line number info.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93937 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-19 22:50:05 +00:00