1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

137 Commits

Author SHA1 Message Date
Torok Edwin
358888da3a Implement changes from Chris's feedback.
Finish converting lib/Target.

llvm-svn: 75043
2009-07-08 20:53:28 +00:00
Torok Edwin
ad3be984b7 Start converting to new error handling API.
cerr+abort -> llvm_report_error
assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included)

llvm-svn: 75018
2009-07-08 18:01:40 +00:00
Dale Johannesen
7a31324b42 Commit the file I actually changed as part of last
patch, instead of one I didn't.

llvm-svn: 74968
2009-07-07 23:28:22 +00:00
Daniel Dunbar
bc3d149e98 Remove unused AsmPrinter OptLevel argument, and propogate.
- This more or less amounts to a revert of r65379. I'm curious to know what
   happened that caused this variable to become unused.

llvm-svn: 74579
2009-07-01 01:48:54 +00:00
Bill Wendling
c0fb316bd3 Add an "alignment" field to the MachineFunction object. It makes more sense to
have the alignment be calculated up front, and have the back-ends obey whatever
alignment is decided upon.

This allows for future work that would allow for precise no-op placement and the
like.

llvm-svn: 74564
2009-06-30 22:38:32 +00:00
David Greene
c702ce1ab3 Add 256-bit memory operand support.
llvm-svn: 74548
2009-06-30 19:24:59 +00:00
Chris Lattner
4d88bfc0d6 remove a bunch of fixmes (old checking code) and commonize all the
target-specific operand printing functionality.  Yay.

llvm-svn: 74379
2009-06-27 05:46:24 +00:00
Chris Lattner
9571347ce0 pull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.
llvm-svn: 74378
2009-06-27 05:39:56 +00:00
Chris Lattner
19eb0dad26 Reimplement rip-relative addressing in the X86-64 backend. The new
implementation primarily differs from the former in that the asmprinter
doesn't make a zillion decisions about whether or not something will be
RIP relative or not.  Instead, those decisions are made by isel lowering
and propagated through to the asm printer.  To achieve this, we:

1. Represent RIP relative addresses by setting the base of the X86 addr
   mode to X86::RIP.
2. When ISel Lowering decides that it is safe to use RIP, it lowers to
   X86ISD::WrapperRIP.  When it is unsafe to use RIP, it lowers to
   X86ISD::Wrapper as before.
3. This removes isRIPRel from X86ISelAddressMode, representing it with
   a basereg of RIP instead.
4. The addressing mode matching logic in isel is greatly simplified.
5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate
   passed through various printoperand routines is gone now.
6. The various symbol printing routines in asmprinter now no longer infer
   when to emit (%rip), they just print the symbol.

I think this is a big improvement over the previous situation.  It does have
two small caveats though: 1. I implemented a horrible "no-rip" modifier for
the inline asm "P" constraint modifier.  This is a short term hack, there is
a much better, but more involved, solution.  2. I had to xfail an 
-aggressive-remat testcase because it isn't handling the use of RIP in the
constant-pool reading instruction.  This specific test is easy to fix without
-aggressive-remat, which I intend to do next.

llvm-svn: 74372
2009-06-27 04:16:01 +00:00
Evan Cheng
016ed65455 Add x86 support for 'n' inline asm modifier. This will be handled target independently as part of MC work.
llvm-svn: 74336
2009-06-26 22:00:19 +00:00
Chris Lattner
3a48623aef simplify printing of MO_ExternalSymbol in a non-pcrel context.
llvm-svn: 74334
2009-06-26 21:47:27 +00:00
Chris Lattner
a8ee785cef add %rip to the GR64 register class. Lets avoid allocating it to anything though! :)
llvm-svn: 74328
2009-06-26 21:25:00 +00:00
Chris Lattner
1f3d17f45d Move all the TLS processing logic into isel, don't do it in asmprinter at all.
llvm-svn: 74327
2009-06-26 21:20:29 +00:00
Chris Lattner
a56bff5e36 minor cleanup/framework changes.
llvm-svn: 74316
2009-06-26 20:00:05 +00:00
Chris Lattner
0a0494b4f9 move magic for PIC constantpool references from asmprinter to isel.
llvm-svn: 74313
2009-06-26 19:22:52 +00:00
Chris Lattner
45946d9021 use jump table operand flags in asm printer instead of "magic predicates"
llvm-svn: 74310
2009-06-26 18:55:01 +00:00
Devang Patel
a7a5664fbb Let's ignore MDStrings also!
llvm-svn: 74255
2009-06-26 02:26:12 +00:00
Chris Lattner
2aaaf51beb simplify shouldPrintPLT
llvm-svn: 74186
2009-06-25 17:58:52 +00:00
Chris Lattner
8c562c2f76 Use target-specific machine operand flags to eliminate a gross hack
from the asmprinter.

llvm-svn: 74184
2009-06-25 17:38:33 +00:00
Douglas Gregor
7841f61ced Add missing dependencies to the CMake build system.
llvm-svn: 74161
2009-06-25 05:03:06 +00:00
Chris Lattner
ec41c5f7ac fix comments to be correct.
llvm-svn: 74154
2009-06-25 01:15:47 +00:00
Devang Patel
d98b076409 No need to code gen MDNodes
llvm-svn: 74150
2009-06-25 00:47:42 +00:00
Chris Lattner
1417c35242 move some functions, add a FIXME, use PrintPICBaseSymbol to print the
picbase instead of inlining it.

llvm-svn: 74111
2009-06-24 19:44:36 +00:00
Chris Lattner
fda56cf68a reimplement getPICLabelString as PrintPICBaseSymbol to eliminate std::string heap thrashing.
llvm-svn: 74105
2009-06-24 19:19:16 +00:00
Chris Lattner
ee30c14d3b sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base class.
llvm-svn: 74101
2009-06-24 19:09:55 +00:00
Chris Lattner
d59a5b9f8b sink dwarf finalization out of each target into AsmPrinter::doFinalization
llvm-svn: 74097
2009-06-24 18:54:37 +00:00
Chris Lattner
0690755320 eliminate the ExtWeakSymbols set from AsmPrinter. This eliminates
a bunch of code from all the targets, and eliminates nondeterministic
ordering of directives being emitted in the output.

llvm-svn: 74096
2009-06-24 18:52:01 +00:00
Chris Lattner
afabad6552 only emit one .align for all the hidden gv stubs instead of one for each.
llvm-svn: 74094
2009-06-24 18:24:42 +00:00
Chris Lattner
0cb01a746f inline print*Stub and rearrange function stub printing to more closely match
gv and hiddengv stub printing.

llvm-svn: 74093
2009-06-24 18:24:09 +00:00
Chris Lattner
ce2854f097 remove dead code now that personality functions don't print stubs directly.
llvm-svn: 74092
2009-06-24 18:19:01 +00:00
Chris Lattner
7bc5373357 remove now-dead argument.
llvm-svn: 74091
2009-06-24 18:17:56 +00:00
Chris Lattner
3dc8c13453 simplify personality function stub printing to use the mangler and
decorateName like other stuff instead of special casing _.  Also, stick
it into GVStubs and let the normal stub printer print the stub instead 
of doing it manually.

llvm-svn: 74090
2009-06-24 18:17:00 +00:00
Chris Lattner
03ce0b9410 remove dead argument
llvm-svn: 74089
2009-06-24 18:00:11 +00:00
Chris Lattner
7eb17b387d factor some code better.
llvm-svn: 74067
2009-06-24 05:47:59 +00:00
Chris Lattner
9bce404faa wire up support for MCContext/MCStreamer in -experimental-asm-printer mode.
llvm-svn: 74066
2009-06-24 05:46:28 +00:00
Bob Wilson
7bd642b80c Provide InitializeAllTargets and InitializeNativeTarget functions in the
C bindings.  Change all the backend "Initialize" functions to have C linkage.
Change the "llvm/Config/Targets.def" header to use C-style comments to avoid
compile warnings.

llvm-svn: 74026
2009-06-23 23:59:40 +00:00
Douglas Gregor
3ca1e68417 Eliminate object-relinking support from CMake. Fixes PR 4429 and
cleans up the CMake-based build system a bit. Started by a patch from
Xerxes Rånby.

llvm-svn: 73969
2009-06-23 17:57:35 +00:00
Chris Lattner
06e180b758 simplify closing paren and (rip) printing.
llvm-svn: 73841
2009-06-21 02:22:53 +00:00
Chris Lattner
481746a193 remove #if 0 code
llvm-svn: 73837
2009-06-21 01:48:49 +00:00
Chris Lattner
5ef06d833d cosmetic changes.
llvm-svn: 73836
2009-06-21 01:27:55 +00:00
Chris Lattner
f1510099c3 remove dead code, the main codepath never has to deal
with MBB's.

llvm-svn: 73830
2009-06-20 19:34:47 +00:00
Chris Lattner
12ba79a2b7 eliminate the "call" operand modifier from the asm descriptions, modeling
it as a pcrel immediate instead.  This gets pc-rel weirdness out of the
main printoperand codepath.

llvm-svn: 73829
2009-06-20 19:34:09 +00:00
Chris Lattner
b0324ab35a fix edit-o
llvm-svn: 73824
2009-06-20 08:13:12 +00:00
Chris Lattner
3ffae2f77e some comments and cleanup
llvm-svn: 73818
2009-06-20 07:59:10 +00:00
Chris Lattner
7b43ca847d implement support for lowering subregs when preparing to print
LEA64_32r, eliminating a bunch of modifier logic stuff on addr modes.

Implement support for printing mbb labels as operands.

llvm-svn: 73817
2009-06-20 07:03:18 +00:00
Devang Patel
7003004d00 Initialize MMI
llvm-svn: 73813
2009-06-20 01:00:07 +00:00
Chris Lattner
18485eef13 hook up printMemReference.
llvm-svn: 73811
2009-06-20 00:50:32 +00:00
Chris Lattner
19fc691c16 Start implementing translation of MachineInstr to MCInst. Next
step is to make tblgen generate something more appropriate for MCInst,
and generate calls to operand translation routines where needed.
This includes a bunch of #if 0 code which will slowly be refactored into
something sensible.

llvm-svn: 73810
2009-06-20 00:49:26 +00:00
Chris Lattner
2e95d43f24 stub out some hacky code for wiring up the new asmprinter interfaces
on X86.  Not useful yet.

llvm-svn: 73799
2009-06-19 23:59:57 +00:00
Devang Patel
e8b5c14209 DwarfWriter is used to emit EH info also.
llvm-svn: 73792
2009-06-19 23:21:20 +00:00