1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

1456 Commits

Author SHA1 Message Date
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
Dan Gohman
a9d5f9b006 Move the point at which FastISel taps into the SelectionDAGISel
process up to a higher level. This allows FastISel to leverage
more of SelectionDAGISel's infastructure, such as updating Machine
PHI nodes.

Also, implement transitioning from SDISel back to FastISel in
the middle of a block, so it's now possible to go back and
forth. This allows FastISel to hand individual CallInsts and other
complicated things off to SDISel to handle, while handling the rest
of the block itself.

To help support this, reorganize the SelectionDAG class so that it
is allocated once and reused throughout a function, instead of
being completely reallocated for each block.

llvm-svn: 55219
2008-08-23 02:25:05 +00:00
Dan Gohman
46c93eebcd Add a few comments.
llvm-svn: 55157
2008-08-22 00:28:15 +00:00
Dan Gohman
a398d11527 Factor out the predicate check code from DAGISelEmitter.cpp
and use it in FastISelEmitter.cpp, and make FastISel
subtarget aware. Among other things, this lets it work
properly on x86 targets that don't have SSE, where it
successfully selects x87 instructions.

llvm-svn: 55156
2008-08-22 00:20:26 +00:00
Dan Gohman
a6e647dd7c Basic fast-isel support for instructions with constant int operands.
llvm-svn: 55099
2008-08-21 01:41:07 +00:00
Dan Gohman
e628777073 Remove the code that limited FastISel to certain fixed signatures.
llvm-svn: 55096
2008-08-21 00:35:26 +00:00
Dan Gohman
4ab3376173 Begin making more use of the FastISelEmitter class.
llvm-svn: 55093
2008-08-21 00:19:05 +00:00
Dan Gohman
d79f723519 Remove an obsolete todo comment.
llvm-svn: 55080
2008-08-20 21:47:28 +00:00
Dan Gohman
74bfad70e1 Factor the code for determining the target-specific instruction
namespace out of the isel emitters and into common code.

llvm-svn: 55079
2008-08-20 21:45:57 +00:00
Dan Gohman
ddebe95287 Simplify FastISel's constructor argument list, make the FastISel
class hold a MachineRegisterInfo member, and make the
MachineBasicBlock be passed in to SelectInstructions rather
than the FastISel constructor.

llvm-svn: 55076
2008-08-20 21:05:57 +00:00
Dan Gohman
ed5e30b819 Fix the string for MVT::isVoid.
llvm-svn: 55034
2008-08-20 01:44:30 +00:00
Dan Gohman
ebba5dd8be For now, restrict FastISel to instructions that only involve one
register class.

llvm-svn: 55008
2008-08-19 20:58:14 +00:00
Dan Gohman
69eb9fb38e Factor out the code to scan an instruction's operands into a
helper function.

llvm-svn: 55007
2008-08-19 20:56:30 +00:00
Dan Gohman
85448ceb8d Add more comments.
llvm-svn: 55004
2008-08-19 20:36:33 +00:00
Dan Gohman
b60099089a Fix indentation in FastISel tablegen-emitted code.
llvm-svn: 55003
2008-08-19 20:31:38 +00:00
Dan Gohman
a8dfd17e4e Add more checking to filter out more kinds of things that
FastISel doesn't support yet.

llvm-svn: 55002
2008-08-19 20:30:54 +00:00
Dan Gohman
1701d4ef7e 80 columns.
llvm-svn: 54998
2008-08-19 18:07:49 +00:00
Dan Gohman
3a57ef9668 Add a few doxygen comments.
llvm-svn: 54997
2008-08-19 18:06:12 +00:00
Dan Gohman
fbc4410ada Remove an unneeded #include.
llvm-svn: 54996
2008-08-19 17:53:16 +00:00
Devang Patel
84b8e5630e Compress manpages.
llvm-svn: 54971
2008-08-19 01:17:41 +00:00
Owen Anderson
169e5e5b99 Speed up addRegisterDead by adding more fast checks before performing the expensive
subregister query, and by increasing the size of the subregister hashtable so
that there are fewer collisions.

llvm-svn: 54781
2008-08-14 18:34:18 +00:00
Daniel Dunbar
4e592412d4 Update makellvm to return correct result code.
llvm-svn: 54756
2008-08-13 20:43:56 +00:00
Dan Gohman
4b1b033f89 Initial checkin of the new "fast" instruction selection support. See
the comments in FastISelEmitter.cpp for details on what this is.
This is currently experimental and unusable.

llvm-svn: 54751
2008-08-13 20:19:35 +00:00
Dan Gohman
502d2aebff Oops, check in these files too, for the FastISel -> Fast rename.
llvm-svn: 54750
2008-08-13 19:55:00 +00:00
Chris Lattner
fecb2b44a4 remove obsolete files
llvm-svn: 54630
2008-08-11 06:12:45 +00:00
Bill Wendling
cff4a97a86 Add ARM to the targets to build.
llvm-svn: 54386
2008-08-05 23:52:28 +00:00
Mon P Wang
fb483982f5 Added support for overloading intrinsics (atomics) based on pointers
to different address spaces.  This alters the naming scheme for those
intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32

llvm-svn: 54195
2008-07-30 04:36:53 +00:00
Bill Wendling
3a37809823 Don't build with 4.0.
llvm-svn: 54137
2008-07-28 18:45:36 +00:00
Dan Gohman
9742f7772d Rename SDOperand to SDValue.
llvm-svn: 54128
2008-07-27 21:46:04 +00:00
Chris Lattner
94281a5c22 'Previously, the emacs tablegen mode would highlight constants even if
they appear in words. This would cause things like the "128" in "VR128"
to be highlighted. This patch fixes the highlighting by only recognizing 
constants when they have word breaks around them.'

Patch by Stefanus Du Toit!

llvm-svn: 53944
2008-07-23 04:49:20 +00:00
Bill Wendling
172aebf7b0 Temporary hack to build with GCC 4.0 instead of 4.2.
llvm-svn: 53860
2008-07-21 18:33:09 +00:00
Dan Gohman
8981962672 Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.

Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.

This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.

These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.

llvm-svn: 53728
2008-07-17 19:10:17 +00:00
Bill Wendling
688b78adf1 Porting r53478 into mainline:
Update to build_llvm. Don't output a floating point number for the version.

llvm-svn: 53484
2008-07-11 22:42:10 +00:00
Evan Cheng
c8c4503279 TargetRegisterDesc::Name field is the same as the abstract register name. There is no need for targets to specify register names in addition to their AsmName's.
llvm-svn: 53207
2008-07-07 22:19:41 +00:00
Dan Gohman
6057cf766c Refactor the tablegen DAGISelEmitter code for outputing calls to
getTargetNode and SelectNodeTo to reduce duplication, and to
make some of the getTargetNode code available to SelectNodeTo.
Use SelectNodeTo instead of getTargetNode in several new
interesting cases, as it mutates nodes in place instead of
creating new ones.

This triggers some scheduling behavior differences due to nodes
being presented to the scheduler in a different order. Some of the
arbitrary scheduling decisions it makes are now arbitrarily made
differently. This is visible in CodeGen/PowerPC/LargeAbsoluteAddr.ll,
where a trivial scheduling difference led to a trivial register
allocation difference.

llvm-svn: 53203
2008-07-07 21:00:17 +00:00
Dan Gohman
955fdc7a4c Add explicit keywords.
llvm-svn: 53179
2008-07-07 18:00:37 +00:00
Evan Cheng
70026d3d13 isel load folding is disabled at -fast. Now hoist the check up to the top level to save some time.
llvm-svn: 53096
2008-07-03 08:39:51 +00:00
Dan Gohman
741cda0ac8 Replace a few uses of SelectionDAG::getTargetNode with
SelectionDAG::SelectNodeTo in the instruction selector. This
updates existing nodes in place instead of creating new ones.

Go back to selecting ISD::DBG_LABEL nodes into
TargetInstrInfo::DBG_LABEL nodes instead of leaving them
unselected, now that SelectNodeTo allows us to update them
in place.

llvm-svn: 53057
2008-07-02 23:23:19 +00:00
Owen Anderson
fe73cb09c8 Make the subregister hashtable output more readable by wrapping the lines,
and mark it const along with the associated changes to TargetRegisterInfo.

llvm-svn: 52966
2008-07-01 17:34:38 +00:00
Owen Anderson
b11f2e0fb1 Use delete[] instead of free on an array created with new[].
llvm-svn: 52960
2008-07-01 15:56:31 +00:00
Owen Anderson
9e88ac84bf Implement suggestions from Chris:
- Use a more accurate heuristic for the size of the hashtable.
  - Use bitwise and instead of modulo since the size is a power of two.
  - Use new[] instead of malloc().

llvm-svn: 52951
2008-07-01 07:02:30 +00:00
Owen Anderson
059d64938b Replace the dynamically computed std::set lookup method for subregisters with a hashtable-based
version that is computed by tblgen at the time LLVM is compiled.

llvm-svn: 52945
2008-07-01 00:18:52 +00:00
Dan Gohman
c8097f8c8c Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.

Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.

This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.

llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Evan Cheng
421919a049 Eliminate TargetRegisterDesc::ImmSubRegs. It's no longer in use.
llvm-svn: 52892
2008-06-30 07:32:56 +00:00
Chris Lattner
6a22216d7a check in anton's patch to make inlining happen in a determinstic order
and fix the bug that it uncovers: inlining a pattern fragment could bring
in other pattern fragments if the inlinee hadn't already been inlined.

llvm-svn: 52888
2008-06-30 03:02:03 +00:00
Dale Johannesen
f170e29cf5 Fixes the last x86-64 test failure in compat.exp:
<16 x float> is 64-byte aligned (for some reason),
which gets us into the stack realignment code.  The
computation changing FP-relative offsets to SP-relative
was broken, assiging a spill temp to a location
also used for parameter passing.  This
fixes it by rounding up the stack frame to a multiple
of the largest alignment (I concluded it wasn't fixable
without doing this, but I'm not very sure.)

llvm-svn: 52750
2008-06-26 01:51:13 +00:00
Mon P Wang
7d89d61387 Added MemOperands to Atomic operations since Atomics touches memory.
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub

llvm-svn: 52706
2008-06-25 08:15:39 +00:00
Chris Lattner
7fdc625548 Add support for building on solaris, working around namespace
polution problems from system headers.  Patch by Nathan Keynes!

llvm-svn: 52682
2008-06-24 17:44:42 +00:00
Bill Wendling
d71e7e4f8e Extract the x86_64 part for the executables.
llvm-svn: 52647
2008-06-23 22:08:30 +00:00
Evan Cheng
d27948e716 - Add "Commutative" property to intrinsics. This allows tblgen to generate the commuted variants for dagisel matching code.
- Mark lots of X86 intrinsics as "Commutative" to allow load folding.

llvm-svn: 52353
2008-06-16 20:29:38 +00:00