Commit Graph

4387 Commits

Author SHA1 Message Date
Chris Lattner b127c0684f remove a bogus note.
llvm-svn: 74509
2009-06-30 05:22:31 +00:00
Chris Lattner 5ed255e642 add a note
llvm-svn: 74508
2009-06-30 04:20:46 +00:00
David Greene 8adf1fdc80 Add a 256-bit register class and YMM registers.
llvm-svn: 74469
2009-06-29 22:50:51 +00:00
Rafael Espindola 538064d6b1 FIX PR 4459.
Not sure I understand how the temp register gets used,
but this fixes a bug and introduces no regressions.

llvm-svn: 74446
2009-06-29 20:29:59 +00:00
Owen Anderson 45c299ef65 Add a target-specific DAG combine on X86 to fold the common pattern of
fence-atomic-fence down to just the atomic op.  This is possible thanks to
X86's relatively strong memory model, which guarantees that locked instructions
(which are used to implement atomics) are implicit fences.

llvm-svn: 74435
2009-06-29 18:04:45 +00:00
David Greene 46b56ffae3 Add processor descriptions for Istanbul and Shanghai.
llvm-svn: 74429
2009-06-29 16:54:06 +00:00
David Greene a4b8998fbb Fix a subtarget feature bug.
llvm-svn: 74428
2009-06-29 16:51:01 +00:00
David Greene f92ba97cda Add more vector ValueTypes for AVX and other extended vector instruction
sets.

llvm-svn: 74427
2009-06-29 16:47:10 +00:00
Chris Lattner 1ec3afdc66 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 ae0acfcef0 pull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.
llvm-svn: 74378
2009-06-27 05:39:56 +00:00
Chris Lattner cce1589e4e simplify some code and eliminate the symbolicAddressesAreRIPRel() predicate.
llvm-svn: 74377
2009-06-27 05:24:12 +00:00
Chris Lattner d17366ae72 fix clang/test/CodeGenObjC/try.m, a basereg doesn't mean no global anymore.
llvm-svn: 74375
2009-06-27 04:50:14 +00:00
Chris Lattner 014e83d40d fix a bunch of failures in the X86-64 JIT by tolerating RIP as
a base register.  We just ignore it for now.

llvm-svn: 74374
2009-06-27 04:46:33 +00:00
Chris Lattner 9876bd8257 factor some logic out into a helper function, allow remat of loads from constant
globals.  This implements remat-constant.ll even without aggressive-remat.

llvm-svn: 74373
2009-06-27 04:38:55 +00:00
Chris Lattner fea81da433 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
Chris Lattner a3260c0b1b Fix PR4466 by making fastisel set operand flags correctly.
llvm-svn: 74366
2009-06-27 01:31:51 +00:00
David Greene 8f6f72cc99 Add feature flags for AVX and FMA and fix some SSE4A feature flag
initialization problems.

llvm-svn: 74350
2009-06-26 22:46:54 +00:00
Evan Cheng 07b016856d 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 3ef702e974 simplify printing of MO_ExternalSymbol in a non-pcrel context.
llvm-svn: 74334
2009-06-26 21:47:27 +00:00
Chris Lattner 40bc649ce9 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 49ed726e46 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 899abc4655 make sure to propagate operand flags in SelectTLSADDRAddr properly.
llvm-svn: 74326
2009-06-26 21:18:37 +00:00
Chris Lattner 76b3c06793 minor cleanup/framework changes.
llvm-svn: 74316
2009-06-26 20:00:05 +00:00
Chris Lattner 2ed6a9d7bd move magic for PIC constantpool references from asmprinter to isel.
llvm-svn: 74313
2009-06-26 19:22:52 +00:00
Chris Lattner 08d734448e use jump table operand flags in asm printer instead of "magic predicates"
llvm-svn: 74310
2009-06-26 18:55:01 +00:00
Chris Lattner 1d3b65a6ae fix a pasto.
llvm-svn: 74275
2009-06-26 05:56:49 +00:00
Chris Lattner bd7e26db16 propagate target operand flags through addressing mode selection.
llvm-svn: 74272
2009-06-26 05:51:45 +00:00
Devang Patel 2cc6d183b2 Let's ignore MDStrings also!
llvm-svn: 74255
2009-06-26 02:26:12 +00:00
Chris Lattner 2aaad91bbe start adding logic in isel to determine asm printer semantics, step N of M.
llvm-svn: 74246
2009-06-26 00:43:52 +00:00
Chris Lattner 83992b19e4 simplify shouldPrintPLT
llvm-svn: 74186
2009-06-25 17:58:52 +00:00
Chris Lattner 852739b46f 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
Chris Lattner 1927844ebf just eliminate the code entirely!
llvm-svn: 74183
2009-06-25 17:28:07 +00:00
Douglas Gregor 2042c3519d Add missing dependencies to the CMake build system.
llvm-svn: 74161
2009-06-25 05:03:06 +00:00
Chris Lattner ea7422e7bf fix comments to be correct.
llvm-svn: 74154
2009-06-25 01:15:47 +00:00
Devang Patel 9d68302e48 No need to code gen MDNodes
llvm-svn: 74150
2009-06-25 00:47:42 +00:00
Chris Lattner 6544289af3 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 9b4aaef9d4 reimplement getPICLabelString as PrintPICBaseSymbol to eliminate std::string heap thrashing.
llvm-svn: 74105
2009-06-24 19:19:16 +00:00
Chris Lattner 1fd5888294 sink management of DwarfWriter & MachineModuleInfo into the AsmPrinter base class.
llvm-svn: 74101
2009-06-24 19:09:55 +00:00
Chris Lattner 70413126b6 sink dwarf finalization out of each target into AsmPrinter::doFinalization
llvm-svn: 74097
2009-06-24 18:54:37 +00:00
Chris Lattner 2981dc1742 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 a297e0c9b1 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 f094f09b76 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 13fb0bef1c 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 e8ad3f13fa remove now-dead argument.
llvm-svn: 74091
2009-06-24 18:17:56 +00:00
Chris Lattner cc5104dcc4 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 63aab8a84c remove dead argument
llvm-svn: 74089
2009-06-24 18:00:11 +00:00
Chris Lattner 9db5fbac05 factor some code better.
llvm-svn: 74067
2009-06-24 05:47:59 +00:00
Chris Lattner 9f40bc2f79 wire up support for MCContext/MCStreamer in -experimental-asm-printer mode.
llvm-svn: 74066
2009-06-24 05:46:28 +00:00
Bob Wilson 5a495fea07 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
Sean Callanan 9c14bce0f9 Test commit: fixed spacing.
llvm-svn: 74022
2009-06-23 23:25:37 +00:00