Dan Gohman
5e5f1c9e8f
Basic FastISel support for floating-point constants.
...
llvm-svn: 55401
2008-08-27 01:09:54 +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
Gabor Greif
4b86114f92
disallow direct access to SDValue::ResNo, provide a getter instead
...
llvm-svn: 55394
2008-08-26 22:36:50 +00:00
Dan Gohman
57b5f9b931
Refactor the bitcast code into its own function.
...
llvm-svn: 55387
2008-08-26 21:28:54 +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
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
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
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
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
af40013b25
we should use 'class' for non-pod types instead of 'struct' to
...
make it easier to deal with the VC++ struct/class bug.
llvm-svn: 55290
2008-08-24 18:38:56 +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
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
110702773f
remove dead method.
...
llvm-svn: 55266
2008-08-23 22:43:21 +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
719fad27a8
Split format() out to its own file, add support for formatting
...
up to three values in one call.
llvm-svn: 55251
2008-08-23 19:48:00 +00:00
Chris Lattner
9ef2c187a0
conditionalize this to work on windows, untested but it should work
...
according to the intarnetz
llvm-svn: 55248
2008-08-23 19:27:03 +00:00
Chris Lattner
b7914ec04e
add a simple mechanism for formatted output. This gives raw_ostream's
...
all the power and risk of fprintf format strings. Use them like this:
OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n';
llvm-svn: 55246
2008-08-23 19:23:10 +00:00
Chris Lattner
2f629c4b80
Add a new trivial -inst-namer pass which makes it possible to diff the
...
before/after effects of a pass, crazy!
llvm-svn: 55230
2008-08-23 06:07:02 +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
6847bc50b9
Move SelectionDAG's constructor out of line.
...
llvm-svn: 55212
2008-08-23 00:50:30 +00:00
Dan Gohman
b6827db2c0
Add a clear() method to FoldingSet.
...
llvm-svn: 55210
2008-08-23 00:42:16 +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
3b161cdce8
Support non-fallthrough unconditional branches in FastISel.
...
llvm-svn: 55191
2008-08-22 19:21:41 +00:00
Owen Anderson
4ad6252b70
Fix typo.
...
llvm-svn: 55189
2008-08-22 18:26:07 +00:00
Dale Johannesen
95a40e3045
Implement __sync_synchronize on ppc32. Patch by Gary Benson.
...
llvm-svn: 55186
2008-08-22 17:20:54 +00:00
Dan Gohman
abc71f026a
Add an empty() member to FoldingSet.
...
llvm-svn: 55182
2008-08-22 16:14:23 +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
Nicolas Geoffray
00aced70f5
Also overload for char, since the "char" type depends on the host.
...
llvm-svn: 55173
2008-08-22 08:44:47 +00:00
Owen Anderson
e17306778c
Overload for both signed and unsigned char.
...
llvm-svn: 55171
2008-08-22 07:42:25 +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
Owen Anderson
5a542e7eda
Move non-trivial methods out of line to avoid code-size bloat.
...
llvm-svn: 55138
2008-08-21 20:58:52 +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
3ccc1c2aaf
Fix a typo that Dale noticed.
...
llvm-svn: 55132
2008-08-21 18:13:12 +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
4b801d38a1
Simplify SelectRoot's interface, and factor out some common code
...
from all targets.
llvm-svn: 55124
2008-08-21 16:36:34 +00:00
Dan Gohman
e8fc6c5a30
SelectionDAGISel::SelectRootInit does not need to be virtual.
...
llvm-svn: 55122
2008-08-21 16:06:51 +00:00
Dan Gohman
5af74620dc
Make HandleSDNode::getValue return an SDValue instead of
...
the full SDUse, which isn't needed.
llvm-svn: 55121
2008-08-21 16:02:46 +00:00
Chris Lattner
bb8a53802b
remove redundant include
...
llvm-svn: 55116
2008-08-21 06:41:07 +00:00
Chris Lattner
16121a7f73
Fix the build with gcc 4.3 as the host, patch by Zhongxing Xu!
...
llvm-svn: 55115
2008-08-21 06:25:28 +00:00
Owen Anderson
902453c302
Implement operator<< in terms of basic types rather than [u]int*_t, which is better for portability. There might be some way to factor this all with metaprogramming magic, but I'm not sure how offhand.
...
llvm-svn: 55114
2008-08-21 06:20:47 +00:00
Nick Lewycky
d9012655db
Fix build on GCC 4.3.
...
llvm-svn: 55110
2008-08-21 05:36:03 +00:00