1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
Evan Cheng
0c40be80aa Make UpdateValueMap, createResultReg, etc. protected instead of private so they can used by target hooks.
llvm-svn: 55691
2008-09-03 06:43:10 +00:00
Owen Anderson
6c8f04643e Fix an issue where a use might be selected before a def, and then we didn't respect the pre-chosen vreg
assignment when selecting the def.  This is the naive solution to the problem: insert a copy to the pre-chosen
vreg.  Other solutions might be preferable, such as:
  1) Passing the dest reg into FastEmit_.  However, this would require the higher level code to know about reg classes, which they don't currently.
  2) Selecting blocks in reverse postorder.  This has some compile time cost for computing the order, and we'd need to measure its impact.

llvm-svn: 55555
2008-08-30 00:38:46 +00:00
Dan Gohman
c7b8401b77 Add a target callback for FastISel.
llvm-svn: 55512
2008-08-28 23:21:34 +00:00
Owen Anderson
8c991b6f8a FastEmitInst_extractsubreg doesn't need to be passed the register class. It can get it from MachineRegisterInfo instead.
llvm-svn: 55476
2008-08-28 17:47:37 +00:00
Owen Anderson
bb32ae5803 Add a helper method that will be used to support EXTRACT_SUBREG for selecting trunc's in fast-isel.
llvm-svn: 55439
2008-08-27 22:30:02 +00:00
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
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
57b5f9b931 Refactor the bitcast code into its own function.
llvm-svn: 55387
2008-08-26 21:28:54 +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
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
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
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
1af9c028bc Improve the doxygen comment for SelectInstructions::SelectInstructions.
llvm-svn: 55094
2008-08-21 00:19:43 +00:00
Dan Gohman
4ab3376173 Begin making more use of the FastISelEmitter class.
llvm-svn: 55093
2008-08-21 00:19:05 +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
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
472f4b49b6 Fix a leak in the FastISel code that Chris pointed out.
llvm-svn: 55031
2008-08-20 00:56:17 +00:00
Dan Gohman
ce636764de Add FastISel support for several more binary operators.
llvm-svn: 55020
2008-08-20 00:11:48 +00:00
Dan Gohman
6fb94e9d02 Fix the FastISel class' doxygen comment.
llvm-svn: 54957
2008-08-18 23:41:46 +00:00
Dan Gohman
6b146d5ec3 Make FastISel's constructor protected, and give it a destructor.
llvm-svn: 54793
2008-08-14 21:51:29 +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