1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

24468 Commits

Author SHA1 Message Date
Owen Anderson
0cee245fdc Add support for fast isel of zext.
llvm-svn: 55396
2008-08-26 23:14:49 +00:00
Gabor Greif
4b86114f92 disallow direct access to SDValue::ResNo, provide a getter instead
llvm-svn: 55394
2008-08-26 22:36:50 +00:00
Owen Anderson
d33f25d615 Add support for fptosi of constants in fast isel.
llvm-svn: 55393
2008-08-26 22:34:28 +00:00
Owen Anderson
14510f8fee Put a heuristic in place to prevent GVN from falling into bad cases with massively complicated CFGs.
This speeds up a particular testcase from 12+ hours to 5 seconds with little perceptible loss of quality.

llvm-svn: 55391
2008-08-26 22:07:42 +00:00
Dan Gohman
3e50c6348a Optimize SelectionDAG's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, use the
SelectionDAG's topological sort in LegalizeDAG instead of having
a separate implementation.

llvm-svn: 55389
2008-08-26 21:42:18 +00:00
Dan Gohman
57b5f9b931 Refactor the bitcast code into its own function.
llvm-svn: 55387
2008-08-26 21:28:54 +00:00
Dan Gohman
58882d14c4 Make FastISel use the correct argument type when casting GEP indices.
llvm-svn: 55384
2008-08-26 20:57:08 +00:00
Dan Gohman
722e912650 Don't select binary instructions with illegal types.
llvm-svn: 55383
2008-08-26 20:52:40 +00:00
Owen Anderson
b15e88b671 Add support for fast isel of sitofp, and remove some unnecessary and imprecise legality checks.
llvm-svn: 55381
2008-08-26 20:37:00 +00:00
Owen Anderson
821ddf6726 Use a combination of copyRegToReg and ISD::BIT_CONVERT when doing fast isel of bitcasts,
allowing it to support the full range of conversions people might ask for in a correct manner.

llvm-svn: 55378
2008-08-26 18:51:24 +00:00
Owen Anderson
fc7b8f3073 These assertions should be return false's instead, allowing the client to detect the failure.
llvm-svn: 55377
2008-08-26 18:50:40 +00:00
Owen Anderson
5fef19facf Make TargetInstrInfo::copyRegToReg return a bool indicating whether the copy requested
was inserted or not.  This allows bitcast in fast isel to properly handle the case
where an appropriate reg-to-reg copy is not available.

llvm-svn: 55375
2008-08-26 18:03:31 +00:00
Devang Patel
211c05f7a3 If IV is used in a int-to-float cast inside the loop then try to eliminate the cast operation.
llvm-svn: 55374
2008-08-26 17:57:54 +00:00
Owen Anderson
76c3c73a7a Add support for fast isel of non-constant fptosi instructions.
llvm-svn: 55373
2008-08-26 17:44:42 +00:00
Chris Lattner
c5c00890e5 If an xmm register is referenced explicitly in an inline asm, make sure to
assign it to a version of the xmm register with the regclass that matches its
type.  This fixes PR2715, a bug handling some crazy xpcom case in mozilla.

llvm-svn: 55358
2008-08-26 06:19:02 +00:00
Chris Lattner
4367c5c58b typo fix.
llvm-svn: 55355
2008-08-26 06:07:47 +00:00
Dan Gohman
815d50b9e6 Actually recycle SDNode allocations. SelectionDAG is using
RecyclingAllocator, but this change is needed for the nodes
to actually be recycled. This cuts SelectionDAG's memory
usage high-water-mark in half in some cases.

llvm-svn: 55351
2008-08-26 01:44:34 +00:00
Dan Gohman
5438048f54 Avoid a warning about isTargetNullPtr being unused in release builds.
llvm-svn: 55350
2008-08-26 01:38:29 +00:00
Evan Cheng
65d29b2553 This is done.
llvm-svn: 55348
2008-08-26 01:13:44 +00:00
Owen Anderson
9264f41ef2 Add a RetVT parameter to emitted FastISel methods, so that we will be able to pass the desired return
type down.  This is not currently used.

llvm-svn: 55345
2008-08-25 23:58:18 +00:00
Dale Johannesen
f201a3aaf3 Implement 32 & 64 bit versions of PPC atomic
binary primitives.

llvm-svn: 55343
2008-08-25 22:34:37 +00:00
Evan Cheng
45e24233c7 Unbreak build.
llvm-svn: 55342
2008-08-25 22:20:39 +00:00
Evan Cheng
19738e3956 80 col. violations.
llvm-svn: 55341
2008-08-25 21:58:43 +00:00
Owen Anderson
1532aad9a8 Expand bitcast support in fast isel to support bitcasts of non-constant values by emitting reg-reg copies.
llvm-svn: 55340
2008-08-25 21:32:34 +00:00
Evan Cheng
569b489cf5 Try approach to moving call address load inside of callseq_start. Now it's done during the preprocess of x86 isel. callseq_start's chain is changed to load's chain node; while load's chain is the last of callseq_start or the loads or copytoreg nodes inserted to move arguments to the right spot.
llvm-svn: 55338
2008-08-25 21:27:18 +00:00
Dale Johannesen
fbb408de74 Remove PPC-specific lowering for atomics; the
generic stuff works fine.

Mark rewritten cmp-and-swap as not using CR1.

llvm-svn: 55336
2008-08-25 21:09:52 +00:00
Owen Anderson
27491bbf2c Add support for fast isel of (integer) immediate materialization pattens, and use them to support
bitcast of constants in fast isel.

llvm-svn: 55325
2008-08-25 20:20:32 +00:00
Dale Johannesen
39bd83dbc0 It's important for the cmp-and-swap to balance
loads and stores but it's even more important for
it to store the right value.:(

llvm-svn: 55319
2008-08-25 18:53:26 +00:00
Bill Wendling
7f52506926 Nevermind. This broke the bootstrap (?!).
llvm-svn: 55318
2008-08-25 18:32:39 +00:00
Bill Wendling
f86b246fdb MOVQ2DQ and MOVQ2DQ use SSE2. We should conditionalize the use of these
instructions on having SSE2.

llvm-svn: 55317
2008-08-25 18:20:52 +00:00
Chris Lattner
df2af1f4c5 Fix pasto (values -> types) noticed by Josh Conner
llvm-svn: 55315
2008-08-25 17:03:15 +00:00
Chris Lattner
0efa9e9d2e flush stream after dumping.
llvm-svn: 55301
2008-08-25 04:55:46 +00:00
Evan Cheng
2b9f879a99 Fix asm printing of MOVSDto64mr and MOV64toSDrm.
llvm-svn: 55300
2008-08-25 04:11:42 +00:00
Bill Wendling
5728cf59fd Temporarily reverting r55292. It's causing a bootstraping failure:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc ... src/libiberty/make-temp-file.c -o make-temp-file.o
Assertion failed: (Node2Index[SU->NodeNum] > Node2Index[I->Dep->NodeNum] && "Wrong topological sorting"), function InitDAGTopologicalSorting, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp, line 508.
../../../../llvm-gcc.src/libiberty/hashtab.c:955: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
make[4]: *** [hashtab.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [multi-do] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libiberty] Error 2
make: *** [all] Error 2

llvm-svn: 55295
2008-08-24 21:45:30 +00:00
Chris Lattner
5a8d6a20e6 remove the type checking logic already done by tblgen, just keep the
parts tblgen doesn't do (checking for constant, alloca, enclosing 
function has gc marker).  This passes dj! :)

llvm-svn: 55294
2008-08-24 20:46:13 +00:00
Chris Lattner
e5073632e2 simplify PseudoSourceValue printing a bit. Unnest all of PseudoSourceValue.cpp from the llvm namespace.
llvm-svn: 55293
2008-08-24 20:37:32 +00:00
Evan Cheng
a600778748 Move callseq_start above the call address load to allow load to be folded into the call node.
llvm-svn: 55292
2008-08-24 19:19:55 +00:00
Evan Cheng
19c915aa0e Print PseudoSourceValue.
llvm-svn: 55291
2008-08-24 18:51:20 +00:00
Chris Lattner
f6e98a0f30 add a hack to temporarily allow pseudo source values.
llvm-svn: 55289
2008-08-24 18:33:17 +00:00
Chris Lattner
2147640791 make sure to flush the stream after dumping, to make sure it goes out immediately.
llvm-svn: 55288
2008-08-24 18:28:30 +00:00
Cedric Venet
6c99b53fda Use additionnal include directory instead of ../ in #include.
Suggested by aKor.

llvm-svn: 55282
2008-08-24 12:30:46 +00:00
Cedric Venet
d1b22a76d2 Updating VC++ project.
Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005.

llvm-svn: 55279
2008-08-24 11:56:40 +00:00
Chris Lattner
9f10b57760 improve encapsulation of the BBExecutable set.
llvm-svn: 55271
2008-08-23 23:39:31 +00:00
Chris Lattner
15f29cad83 Switch an assortment of maps, sets and vectors to more efficient versions,
patch contributed by m-s!

llvm-svn: 55270
2008-08-23 23:36:38 +00:00
Chris Lattner
b09962fd1a get MachineConstantPool off std::ostream, onto raw_ostream. It would be
really nice if someone converted MachineFunction::print to raw_ostream.

llvm-svn: 55268
2008-08-23 22:53:13 +00:00
Chris Lattner
ea485fa47d minor cleanups.
llvm-svn: 55267
2008-08-23 22:52:27 +00:00
Chris Lattner
3ad9fe55e5 Add raw_stream adaptors that write into an std::string and SmallVector/SmallString.
llvm-svn: 55265
2008-08-23 22:43:04 +00:00
Chris Lattner
fe3155fc62 Switch the asmprinter (.ll) and all the stuff it requires over to
use raw_ostream instead of std::ostream.  Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).

Other interesting changes:
 1) This makes Value::print be non-virtual.
 2) AP[S]Int and ConstantRange can no longer print to ostream directly, 
    use raw_ostream instead.
 3) This fixes a bug in raw_os_ostream where it didn't flush itself 
    when destroyed.
 4) This adds a new SDNode::print method, instead of only allowing "dump".


A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream 
versions.

This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.

llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Chris Lattner
565b9e9b37 Add #include
llvm-svn: 55258
2008-08-23 21:34:34 +00:00
Chris Lattner
98afd37464 add #include
llvm-svn: 55257
2008-08-23 21:33:24 +00:00