1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

40950 Commits

Author SHA1 Message Date
Dan Gohman
d5e34d9dce Add a new FastISel method, getRegForValue, which takes care of
the details of materializing constants and other values into
registers, and make use of it in several places.

llvm-svn: 55426
2008-08-27 18:10:19 +00:00
Dan Gohman
6174651396 Add a comment about the current floating-point constant code in FastISel.
llvm-svn: 55425
2008-08-27 18:01:42 +00:00
Devang Patel
23569e6a1f Fix typos and whitespaces. Other cosmetic changes based on feedback.
llvm-svn: 55424
2008-08-27 17:50:18 +00:00
Chris Lattner
551cf02a2d Minor cleanup.
llvm-svn: 55423
2008-08-27 17:36:58 +00:00
Dan Gohman
3976cccecd Reinstate the x86-64 portion of r55190. When doing extloads into
64-bit registers from 16-bit and smaller memory locations, prefer
instructions that define the entire 64-bit register, to avoid
partial-register updates.

llvm-svn: 55422
2008-08-27 17:33:15 +00:00
Dan Gohman
d9e0302919 Optimize ScheduleDAGRRList's topological sort to use one pass instead
of two, and to not need a scratch std::vector. Also, compute the ordering
immediately in the result array, instead of in another scratch std::vector
that is copied to the result array.

llvm-svn: 55421
2008-08-27 16:29:48 +00:00
Dan Gohman
db4286e6f7 Optimize ScheduleDAG's ComputeDepths and ComputeHeights to not need
a scratch std::vector.

llvm-svn: 55420
2008-08-27 16:27:25 +00:00
Dan Gohman
5189ab26fb Remove the std::ostream form of PseudoSourceValue's print,
which isn't needed anymore.

llvm-svn: 55419
2008-08-27 16:19:44 +00:00
Dan Gohman
378f477a02 Update a comment to reflect recent changes.
llvm-svn: 55418
2008-08-27 16:18:22 +00:00
Dan Gohman
47abc17d0f Unbreak PseudoSourceValue::print. This fixes -print-machine-instrs
and various other things.

llvm-svn: 55415
2008-08-27 15:24:43 +00:00
Dan Gohman
be3a88eac3 Diagnose uses of unsized types with the byval attribute in the
verifier. See PR2711 for details.

llvm-svn: 55414
2008-08-27 14:48:06 +00:00
Dan Gohman
6d6043d2fc Update wording, as aggregates are now first-class.
llvm-svn: 55413
2008-08-27 14:44:57 +00:00
Evan Cheng
20b295388f Add DebugInfoBuilder. Patch by Talin!
llvm-svn: 55409
2008-08-27 06:51:14 +00:00
Dan Gohman
5e5f1c9e8f Basic FastISel support for floating-point constants.
llvm-svn: 55401
2008-08-27 01:09:54 +00:00
Owen Anderson
a0b7e0ab93 Fix handling of inttoptr and ptrtoint when unhandled operands are present.
llvm-svn: 55400
2008-08-27 00:35:37 +00:00
Owen Anderson
c5d2fe6354 Add support for fast isel of inttoptr and ptrtoint in the cases where truncation is not needed.
llvm-svn: 55399
2008-08-27 00:31:01 +00:00
Owen Anderson
a8911f33f8 Factor out a large amoutn of the cast handling code in fast isel into helper methods.
This simultaneously makes the code simpler and adds support for sext as well.

llvm-svn: 55398
2008-08-26 23:46:32 +00:00
Dan Gohman
284f18a884 Add a MachineInstrBuilder method for adding floating-point
immediate operands.

llvm-svn: 55397
2008-08-26 23:19:23 +00:00
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
84d7f86244 Refactor a bunch of FastISelEmitter code into a helper class, and
put each major step in a separate function. This makes the high
level sequence of events easier to follow.

llvm-svn: 55385
2008-08-26 21:21:20 +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
Cedric Venet
62a65ed510 - small bug corrected: incorrect iterator type.
- fix to please VS: add a return after an assert.

llvm-svn: 55380
2008-08-26 19:49:04 +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
9e2381b77d We need to check that the return type is correct, even in cases where we don't
have a return type that differs from the operand types.

llvm-svn: 55376
2008-08-26 18:50:00 +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
Gabor Greif
ee460cd197 fix doxygen comment
llvm-svn: 55372
2008-08-26 17:44:40 +00:00
Ted Kremenek
5f192023b2 Grammar fix.
llvm-svn: 55371
2008-08-26 16:41:15 +00:00
Ted Kremenek
909c1c36e2 Added "str()" method to raw_string_ostream.
str() mirrors the same method in std::ostringstream.
str() flushes the buffered stream contents to string and returns a reference to the string.

llvm-svn: 55370
2008-08-26 16:34:01 +00:00
Chris Lattner
1804f18b34 code simplification, no functionality change.
llvm-svn: 55363
2008-08-26 07:01:28 +00:00
Chris Lattner
006fc6636d stabilize more printing, this doesn't cause a problem
in the example attached to PR2590, but is a problem in general.

llvm-svn: 55361
2008-08-26 06:50:46 +00:00
Chris Lattner
6adb1b1b26 stablize SubRegsSet printing, part of PR2590
llvm-svn: 55360
2008-08-26 06:49:06 +00:00
Chris Lattner
e589d360a1 Stabilize 'getDwarfRegNumFull' output to not depend on random memory
orders, part of PR2590

llvm-svn: 55359
2008-08-26 06:43:25 +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
Owen Anderson
9c207563a1 Throw the switch to allow FastISel to emit instructions whose return types different from their inputs. Next step: adding lowering pattens in FastISel that actually use these newly available opcodes.
llvm-svn: 55349
2008-08-26 01:22:59 +00:00
Evan Cheng
65d29b2553 This is done.
llvm-svn: 55348
2008-08-26 01:13:44 +00:00
Owen Anderson
7e677167d6 Enhance TableGen to emit code for FastISel of opcodes with variadic return types without slowing down opcodes that are not variadic. No such opcodes are currently generated, but in theory it should be a matter of just hitting the switch.
llvm-svn: 55347
2008-08-26 00:42:26 +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