1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

159 Commits

Author SHA1 Message Date
Chris Lattner
dfd345bf39 make gep matching in fastisel match the base of the gep as a
register if it isn't possible to match the indexes *and* the base.
This fixes some fast isel rejects of load instructions on oggenc.

llvm-svn: 97739
2010-03-04 19:48:19 +00:00
Dale Johannesen
516867fd79 Move dbg_value generation to target-independent FastISel,
as X86 is currently the only FastISel target.  Per review.

llvm-svn: 97255
2010-02-26 20:01:55 +00:00
Dale Johannesen
fe3e4e29e3 Generate DBG_VALUE from dbg.value intrinsics. These currently
comes out as comments but will eventually generate DWARF.

llvm-svn: 96601
2010-02-18 18:51:15 +00:00
Duncan Sands
2acaf3609c Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!

llvm-svn: 96223
2010-02-15 16:12:20 +00:00
Chris Lattner
d69e1c1bb2 refactor the conditional jump instructions in the .td file to
use a multipattern that generates both the 1-byte and 4-byte 
versions from the same defm

llvm-svn: 95901
2010-02-11 19:25:55 +00:00
Chris Lattner
7acf9be6c4 move target-independent opcodes out of TargetInstrInfo
into TargetOpcodes.h.  #include the new TargetOpcodes.h
into MachineInstr.  Add new inline accessors (like isPHI())
to MachineInstr, and start using them throughout the 
codebase.

llvm-svn: 95687
2010-02-09 19:54:29 +00:00
Dan Gohman
f45b7c6795 Rename the PerformTailCallOpt variable to GuaranteedTailCallOpt to reflect
its current purpose.

llvm-svn: 95564
2010-02-08 20:27:50 +00:00
Dale Johannesen
9e9159cd4d Add assertion to humor the paranoid.
llvm-svn: 94843
2010-01-29 21:21:28 +00:00
Evan Cheng
631bfe4479 Restore to pre-94570 state.
llvm-svn: 94625
2010-01-27 00:00:57 +00:00
Evan Cheng
0849122522 Ignore 'forced' tailcall opt in fastisel mode.
llvm-svn: 94617
2010-01-26 23:28:40 +00:00
Evan Cheng
b308493fc0 Code refactoring, no functionality change.
llvm-svn: 94570
2010-01-26 19:04:47 +00:00
Dale Johannesen
d75f9dc3ff Generate DEBUG_VALUE comments on x86. The (limited)
dbg.declare's we currently generate go through both
register allocators without perturbing the results.

llvm-svn: 94480
2010-01-26 00:09:58 +00:00
Dale Johannesen
e1ba7ecf45 Revert 93811 per request.
llvm-svn: 93818
2010-01-19 00:10:52 +00:00
Dale Johannesen
0b8b2713d3 Enable code to emit dbg.declare as DEBUG_VALUE
comments (fast isel, X86).  This doesn't seem
to break any functionality, but will introduce
cases where -g affects the generated code.  I'll
be fixing that.

llvm-svn: 93811
2010-01-18 23:34:55 +00:00
Eric Christopher
f599e07003 Have FastISel handle llvm.trap().
llvm-svn: 93781
2010-01-18 22:11:29 +00:00
Duncan Sands
395053f13a Revert commit 93204, since it causes the assembler to barf
on x86-64 linux with messages like this:
Error: Incorrect register `%r14' used with `l' suffix

llvm-svn: 93242
2010-01-12 17:46:16 +00:00
Evan Cheng
a93b476689 Add manual ISD::OR fastisel selection routines. TableGen is no longer autogen them after 93152 and 93191.
llvm-svn: 93204
2010-01-11 22:59:27 +00:00
Dan Gohman
5042879ae5 Reword this comment to reference a more fundamental issue.
llvm-svn: 93154
2010-01-11 17:14:46 +00:00
Eric Christopher
067afe673c After further thought revert the patch to make fast-isel avoid
putting relocations into the constant pool - this isn't needed
for correctness and in the rare occasion it happens would pull
us out of fast isel for the block.

If fast-isel application startup time ever becomes an issue we
can add better support for these addresses instead of bailing.

llvm-svn: 92995
2010-01-08 08:24:49 +00:00
Eric Christopher
2a3196c2e5 Remove extraneous include.
llvm-svn: 92972
2010-01-08 00:05:33 +00:00
Eric Christopher
d218bc7a2f If the data requires a relocation then don't attempt to
add it to the constant pool for fast-isel. We already
don't add it for the normal case.

llvm-svn: 92934
2010-01-07 19:45:14 +00:00
Benjamin Kramer
c233521d45 Convert a ton of simple integer type equality tests to the new predicate.
llvm-svn: 92760
2010-01-05 20:07:06 +00:00
David Greene
58e7c6145b Add a bool flag to StackObjects telling whether they reference spill
slots.  The AsmPrinter will use this information to determine whether to
print a spill/reload comment.

Remove default argument values.  It's too easy to pass a wrong argument
value when multiple arguments have default values.  Make everything
explicit to trap bugs early.

Update all targets to adhere to the new interfaces..

llvm-svn: 87022
2009-11-12 20:49:22 +00:00
Chris Lattner
a3cf123e86 strength reduce a ton of type equality tests to check the typeid (Through
the new predicates I added) instead of going through a context and doing a
pointer comparison.  Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.

llvm-svn: 83297
2009-10-05 05:54:46 +00:00
Sandeep Patel
9c4e094e2a Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.
llvm-svn: 80773
2009-09-02 08:44:58 +00:00
Dan Gohman
60fae1b2a2 X86FastISel support for loading and storing values of type i1.
llvm-svn: 80186
2009-08-27 00:31:47 +00:00
Owen Anderson
9df206d02d Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Owen Anderson
48f2f0ae72 Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
the latter is capable of representing either a primitive or an extended type.

llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Owen Anderson
b4bce99769 Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
llvm-svn: 78610
2009-08-10 22:56:29 +00:00
Dan Gohman
1110fb6bbd Teach X86FastISel how to handle CCValAssign::BCvt, which is used for
MMX arguments. This fixes PR4684.

llvm-svn: 78163
2009-08-05 05:33:42 +00:00
Owen Anderson
1dc40e205b Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Owen Anderson
cc287b28c9 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Torok Edwin
f955a6ef49 llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").

llvm-svn: 75640
2009-07-14 16:55:14 +00:00
Owen Anderson
393d8b0a0c Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.

llvm-svn: 75445
2009-07-13 04:09:18 +00:00
Torok Edwin
ae8a3ff177 assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

llvm-svn: 75379
2009-07-11 20:10:48 +00:00
Chris Lattner
1781e322d7 code model is never set to default.
llvm-svn: 75278
2009-07-10 21:03:06 +00:00
Chris Lattner
478fc8442b remove the now-dead TM argument to these methods.
llvm-svn: 75276
2009-07-10 21:00:45 +00:00
Chris Lattner
9deef50410 add a couple of predicates to test for "stub style pic in PIC mode" and "stub style pic in dynamic-no-pic" mode.
llvm-svn: 75273
2009-07-10 20:47:30 +00:00
Chris Lattner
6097f82e18 simplify fast isel by using ClassifyGlobalReference. This
elimiantes the last use of GVRequiresExtraLoad, so delete it.

llvm-svn: 75244
2009-07-10 07:48:51 +00:00
Chris Lattner
41fccd30b7 GVRequiresExtraLoad is now never used for calls, simplify it based on this.
llvm-svn: 75232
2009-07-10 05:52:02 +00:00
Chris Lattner
832a724072 actually, just eliminate PCRelGVRequiresExtraLoad. It makes the code
more complex and slow than just directly testing what we care about.

llvm-svn: 75231
2009-07-10 05:48:03 +00:00
Chris Lattner
2161376696 There is only one case where GVRequiresExtraLoad returns true for calls:
split its handling out to PCRelGVRequiresExtraLoad, and simplify code
based on this.

llvm-svn: 75230
2009-07-10 05:45:15 +00:00
Chris Lattner
faa8001b62 split call handling out of X86SelectAddress into X86SelectCallAddress
llvm-svn: 75228
2009-07-10 05:33:42 +00:00
Owen Anderson
8970999512 Thread LLVMContext through MVT and related parts of SDISel.
llvm-svn: 75153
2009-07-09 17:57:24 +00:00
Chris Lattner
1614fd5095 move reasoning about darwin $non_lazy_ptr stubs from asmprinter into
isel.

llvm-svn: 75117
2009-07-09 06:59:17 +00:00
Chris Lattner
9feb73cd75 rearrange some code, no functionality change.
llvm-svn: 75113
2009-07-09 06:41:35 +00:00
Chris Lattner
36eaa356a4 make direct calls set MO_PLT or MO_DARWIN_STUB as appropriate with fast isel.
llvm-svn: 75112
2009-07-09 06:34:26 +00:00
Chris Lattner
76adfe755d simplify some code based on the fact that picstyles != none are only valid
in pic or dynamic-no-pic mode. Also, x86-64 never used picstylegot.

llvm-svn: 75101
2009-07-09 04:39:06 +00:00
Chris Lattner
4cddab0f14 @GOTPCREL is also rip-relative. Fix fast-isel to do the right thing.
This fixes an llvm-gcc bootstrap problem I introduced.

llvm-svn: 74691
2009-07-02 04:22:01 +00:00
Chris Lattner
e703feb0ac Fix yet-another bug I introduced into fastisel, this time handling
constant pool references that weren't getting properly rip-relative.

llvm-svn: 74689
2009-07-02 03:14:25 +00:00