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
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
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
Evan Cheng
45e24233c7
Unbreak build.
...
llvm-svn: 55342
2008-08-25 22:20:39 +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
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
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
19c915aa0e
Print PseudoSourceValue.
...
llvm-svn: 55291
2008-08-24 18:51:20 +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
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
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
Dan Gohman
a5ce6c1747
Make MBBMap a DenseMap instead of a std::map.
...
llvm-svn: 55220
2008-08-23 02:44:46 +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
27de898e15
Avoid creating shift-by-zero SDNodes in the common case of
...
i8* getelementptr. DAGCombine eliminates these, but this is
a fairly common case.
llvm-svn: 55214
2008-08-23 01:06:51 +00:00
Dan Gohman
6847bc50b9
Move SelectionDAG's constructor out of line.
...
llvm-svn: 55212
2008-08-23 00:50:30 +00:00
Dan Gohman
071122d2a3
Reapply r55191 and r55192.
...
llvm-svn: 55205
2008-08-22 21:28:19 +00:00
Bill Wendling
60e176391d
Reverting r55190, r55191, and r55192. They broke the build with this error message:
...
{standard input}:17:bad register name `%sil'
make[4]: *** [libgcc/./_addvsi3.o] Error 1
make[4]: *** Waiting for unfinished jobs....
{standard input}:23:bad register name `%dil'
{standard input}:28:bad register name `%dil'
make[4]: *** [libgcc/./_addvdi3.o] Error 1
{standard input}:18:bad register name `%sil'
make[4]: *** [libgcc/./_subvsi3.o] Error 1
llvm-svn: 55200
2008-08-22 20:51:05 +00:00
Dan Gohman
557a7db2eb
Fix the InsertBranch call.
...
llvm-svn: 55192
2008-08-22 19:26:10 +00:00
Dan Gohman
3b161cdce8
Support non-fallthrough unconditional branches in FastISel.
...
llvm-svn: 55191
2008-08-22 19:21:41 +00:00
Dan Gohman
92921499ae
Add FastISel support for PHINodes. Machine PHI nodes
...
are not yet updated properly, but that's a separate
task.
llvm-svn: 55187
2008-08-22 17:37:48 +00:00
Dan Gohman
3b4af81381
Fix SmallVector's size calculation so that a size of 0 is
...
handled correctly, and change a few SmallVector uses to use
size 0 to more clearly reflect their intent.
llvm-svn: 55181
2008-08-22 16:07:55 +00:00
Chris Lattner
fd64cbf22d
consolidate DenseMapInfo implementations, and add one for std::pair.
...
Patch contributed by m-s.
llvm-svn: 55167
2008-08-22 05:08:25 +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
Bill Wendling
c4c6053233
Remove tabs.
...
llvm-svn: 55154
2008-08-22 00:04:26 +00:00
Owen Anderson
2e728c44d5
Remove unneeded #include.
...
llvm-svn: 55134
2008-08-21 19:51:25 +00:00
Dan Gohman
07ec8e6f4a
Add libcalls for the new rounding opcodes.
...
llvm-svn: 55133
2008-08-21 18:38:14 +00:00
Dan Gohman
b5635a2c51
Add libm-oriented ISD opcodes for rounding operations.
...
llvm-svn: 55130
2008-08-21 17:55:02 +00:00
Dan Gohman
7c434de476
Have FastISel skip the multiply by 1 for getelementptr on i8*.
...
llvm-svn: 55129
2008-08-21 17:37:05 +00:00
Dan Gohman
f4269f7bea
MVT::getMVT uses iPTR for pointer types, while we need the actual
...
intptr_t type in this case. FastISel can now select simple
getelementptr instructions.
llvm-svn: 55125
2008-08-21 17:25:26 +00:00
Dan Gohman
512af985d7
Elements in DeadNodeSet are checked for use_empty() before they
...
are actually deleted, so it's not necessary to remove re-used
nodes from the set.
llvm-svn: 55123
2008-08-21 16:24:54 +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
Evan Cheng
45c46520da
Type of first GEP operand is always the same as the target pointer type.
...
llvm-svn: 55097
2008-08-21 01:19:11 +00:00
Owen Anderson
2c1d54952b
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Dan Gohman
71aa272ac4
Fix unused variable warnings.
...
llvm-svn: 55089
2008-08-20 23:53:10 +00:00
Evan Cheng
c55f07023a
First cut, un-optimized (and untested) fast isel lowering of GetElementPtrInst.
...
llvm-svn: 55085
2008-08-20 22:45:34 +00:00
Dan Gohman
50af19179b
Simplify the BuildMI calls even more.
...
llvm-svn: 55077
2008-08-20 21:10:53 +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
d8324c4066
Dump the instruction that foiled ISel even when -debug is not used.
...
llvm-svn: 55075
2008-08-20 20:47:32 +00:00
Bill Wendling
42a2073ed4
Don't hoist instructions that define a physical register.
...
llvm-svn: 55074
2008-08-20 20:32:05 +00:00
Dan Gohman
96efa9606f
Make more use of the BuildMI API.
...
llvm-svn: 55072
2008-08-20 18:16:32 +00:00
Dan Gohman
3606d17592
Minor code reorganization.
...
llvm-svn: 55071
2008-08-20 18:10:48 +00:00
Dan Gohman
44da988220
Minor whitespace cleanup.
...
llvm-svn: 55070
2008-08-20 18:09:38 +00:00
Dan Gohman
9e5e42e0d5
Fix 80 column violation.
...
llvm-svn: 55069
2008-08-20 18:09:02 +00:00
Evan Cheng
5ff34fa3b4
Kill off SimpleBBISel, it's replaced by FastISel.
...
llvm-svn: 55067
2008-08-20 17:50:32 +00:00
Dan Gohman
00ddda96c9
Disable DAGCombine's alignment inference in "fast" codegen mode.
...
llvm-svn: 55059
2008-08-20 16:30:28 +00:00
Dan Gohman
e1a5bc775e
Change the FoldingSetNodeID usage for objects which carry
...
alignment and volatility information, such as loads and
stores, to reduce the number of integer values added to
the FoldingSetNodeID.
llvm-svn: 55058
2008-08-20 15:58:01 +00:00
Dan Gohman
22c225c022
Use BitVector instead of std::vector<unsigned char>.
...
llvm-svn: 55054
2008-08-20 14:58:41 +00:00
Dan Gohman
7f2b41c9e2
Avoid an empty-if-body warning in release builds.
...
llvm-svn: 55050
2008-08-20 14:00:56 +00:00
Dan Gohman
2555c4a2ca
Fix indentation.
...
llvm-svn: 55049
2008-08-20 13:50:12 +00:00