1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-28 06:22:51 +01:00
Commit Graph

2756 Commits

Author SHA1 Message Date
Vikram S. Adve
b2fc122acd Changed interface to insertCallerSavingCode().
llvm-svn: 2859
2002-07-10 21:42:42 +00:00
Vikram S. Adve
56ae7788d7 Stop using pseudo-instructions (SETX, SETUW, SETSW)
and generate actual machine instruction sequences directly.

llvm-svn: 2858
2002-07-10 21:42:13 +00:00
Vikram S. Adve
268137274b Add support to print %hh, %hm, %lm, or %lo in an operand field.
llvm-svn: 2857
2002-07-10 21:41:21 +00:00
Vikram S. Adve
3df324e6e8 Major overhaul to stop using pseudo-instructions (SETX, SETUW, SETSW)
and generate actual machine instruction sequences directly.

Also a couple of bug fixes in code for putting constants into registers:
-- Do *not* sign-extend unsigned constant that is shorter than int reg size
-- Fix handling of address constant (a GlobalValue) vs. constant that
   must be loaded.

llvm-svn: 2856
2002-07-10 21:39:50 +00:00
Vikram S. Adve
9d7346bbf9 More important fixes:
-- FP argument to a function with no prototype going on stack
   was not being copied to the stack in colorCallArgs().
-- Put caller-saving code *before* argument copying code so that
   we don't trash a register before saving it!
-- Two other minor fixes.

llvm-svn: 2855
2002-07-10 21:36:00 +00:00
Vikram S. Adve
47a8810964 Put caller-saving code *before* argument copying code!
(This file has a minor change required for this fix.)

llvm-svn: 2854
2002-07-10 21:30:17 +00:00
Vikram S. Adve
4543e3c252 Minor change in comments.
llvm-svn: 2853
2002-07-10 21:29:22 +00:00
Chris Lattner
c27a459095 *** empty log message ***
llvm-svn: 2852
2002-07-10 16:48:17 +00:00
Chris Lattner
23cfaec9ce Allow specifying a module for context instead of a slot calculator directly
llvm-svn: 2851
2002-07-10 16:48:14 +00:00
Chris Lattner
0f86d605e1 Add a new testcase. It actually is not infinite looping. It just takes
FOREVER to run.  That's the bug.  :)

llvm-svn: 2850
2002-07-09 19:58:06 +00:00
Vikram S. Adve
391040c398 Disabling reassociate pass until it is fixed.
llvm-svn: 2849
2002-07-09 19:53:09 +00:00
Chris Lattner
617103c154 New testcase for problem effecting mst
llvm-svn: 2848
2002-07-09 19:41:21 +00:00
Anand Shukla
33b491bba2 changed mem_fun to std::mem_fun
llvm-svn: 2847
2002-07-09 19:18:56 +00:00
Anand Shukla
b9a34f17ff added std:: to hash_set
llvm-svn: 2846
2002-07-09 19:18:16 +00:00
Anand Shukla
e2179159e5 Added std:: to mem_fun for 64-bit gcc
llvm-svn: 2845
2002-07-09 19:16:59 +00:00
Chris Lattner
128410dd4c Implementing shift left & shift right on pointers
llvm-svn: 2844
2002-07-09 18:42:36 +00:00
Chris Lattner
bc68100d59 Include header in the compiler-neutral location
llvm-svn: 2843
2002-07-09 16:50:24 +00:00
Vikram S. Adve
f5760a424d Added support for printing constant global references to
assembly.

llvm-svn: 2842
2002-07-09 12:30:29 +00:00
Vikram S. Adve
b06eb93a26 Add makefile-mode flag for emacs.
llvm-svn: 2841
2002-07-09 12:04:21 +00:00
Vikram S. Adve
c98bc8cd5e Fix iteration and InsertPos bugs introduced when Chris changed over to ilist.
llvm-svn: 2840
2002-07-08 23:37:07 +00:00
Vikram S. Adve
901578090d Numerous changes in interface to class SparcRegInfo corresponding to
changes in class MachineRegInfo (see MachineRegInfo.h for details).

Added {LD,ST}[X]FSR instructions.

llvm-svn: 2839
2002-07-08 23:34:10 +00:00
Vikram S. Adve
35bc4cb020 class MachineCodeForBasicBlock is now an annotation on BasicBlock.
llvm-svn: 2838
2002-07-08 23:31:24 +00:00
Vikram S. Adve
8b06b38495 BA no longer has the unused CC operand.
llvm-svn: 2837
2002-07-08 23:30:59 +00:00
Vikram S. Adve
a771830ea1 Have to save a boolean (setCC) value whenever use is outside the current
basic block.

Mark setCCInstr used as dest. of conditional-move as both a def and a use.

BA instruction no longer has the unused CC argument.

llvm-svn: 2836
2002-07-08 23:30:14 +00:00
Vikram S. Adve
30cc745aec BA has only one argument.
Added LDFSR, LDXFSR, STFSR and STXFSR.
Fixed operands info for RDCCR, WRCCR.

llvm-svn: 2835
2002-07-08 23:25:17 +00:00
Vikram S. Adve
b94ede185c Significant changes to correctly spill CC registers and to correctly
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
   Also, cpMem<->Reg functions now return a vector of machine instructions.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
   needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
   since regs used to save values *across* an instruction are not obvious
   either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
   This is needed for conditional move operations.
   So an operand may need spill code both before and after the instruction.

Other changes:
-- Added several get{Class,Type} functions.
-- Added unified-to-local register number conversion.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.
-- Suggest/Color methods may modify the MachineInstr (and always did),
   so don't make that argument const!
-- Caller-saving code doesn't need its special purpose code for
   handling CC registers since cpMem<->Reg handle those correctly now.

llvm-svn: 2834
2002-07-08 23:23:12 +00:00
Vikram S. Adve
0b32273208 Significant changes to correctly spill CC registers and to correctly
handle conditional move instructions:
-- cpMem<->Reg functions now support CC registers (int and FP) correctly.
-- Scratch registers must be explicitly provided to cpMem<->Reg when
   needed, since CC regs need one to be copied to/from memory.
-- CC regs are saved to a scratch register instead of stack.
-- All regs used by a instruction are now recorded in MachineInstr::regsUsed,
   since regs used to save values *across* an instruction are not obvious
   either from the operands or from the LiveVar sets.
-- An (explicit or implicit) operand may now be both a def and a use.
   This is needed for conditional move operations.
   So an operand may need spill code both before and after the instruction.
-- class MachineCodeForBasicBlock is now an annotation on BasicBlock.

llvm-svn: 2833
2002-07-08 23:15:32 +00:00
Vikram S. Adve
a8c7633d5b MachineInstr* in vector are not const (and never really were)
because operands may be modified directly to set register.
Also, class MachineCodeForBasicBlock is now an annotation on BasicBlock.

llvm-svn: 2832
2002-07-08 23:07:26 +00:00
Vikram S. Adve
3e8b72f0e3 Rename static struct Initializer to avoid name conflict with BB.
llvm-svn: 2831
2002-07-08 23:04:31 +00:00
Vikram S. Adve
25d81936d2 Fix printing of BB in dump.
llvm-svn: 2830
2002-07-08 23:03:54 +00:00
Vikram S. Adve
f6d73e9711 Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.h.
This class is now an annotation on BasicBlock.

llvm-svn: 2829
2002-07-08 23:03:10 +00:00
Vikram S. Adve
5b4c4a9326 MachineInstr::dump() now takes no arguments.
llvm-svn: 2828
2002-07-08 23:01:46 +00:00
Vikram S. Adve
a2381d3998 Implementation of class MachineCodeForBasicBlock.
Moved here from MachineInstr.cpp to make it an annotation on BasicBlock.

llvm-svn: 2827
2002-07-08 23:01:11 +00:00
Vikram S. Adve
4efbb9c931 A single MachineInstr operand may now be both a def and a use,
so additional dep. edges have to be added.
This was needed to correctly handle conditional move instructions!
MachineCodeForBasicBlock is now an annotation on BasicBlock.
Renamed "earliestForNode" to "earliestReadyTimeForNode".

llvm-svn: 2826
2002-07-08 22:59:23 +00:00
Vikram S. Adve
daf9b38ed9 A single MachineInstr operand may now be both a def and a use.
llvm-svn: 2825
2002-07-08 22:56:34 +00:00
Vikram S. Adve
bfd03d50ce cpMem<->Reg functions now support CC registers (int and FP) correctly.
A scratch register has to be provided when needed to do the copy.
Also, cpMem<->Reg functions now return a vector of machine instructions.

Added several get{Class,Type} functions.

Suggest/Color methods may modify the MachineInstr (and always did),
so don't make that argument const!

llvm-svn: 2824
2002-07-08 22:44:14 +00:00
Vikram S. Adve
bacbe6b240 Interface to class MachineCodeForBasicBlock.
Moved here from MachineInstr.h to make it an annotation on BasicBlock.

llvm-svn: 2823
2002-07-08 22:40:34 +00:00
Vikram S. Adve
58b597078f getUsableUniRegAtMI interface simplified slightly.
llvm-svn: 2822
2002-07-08 22:39:36 +00:00
Vikram S. Adve
a110ccca19 Moved class MachineCodeForBasicBlock to MachineCodeForBasicBlock.{cpp,h}.
An (explicit or implicit) operand may now be both a def and a use.
Also add a set of regs used by each instruction.
dump() no longer takes an optional argument, which doesn't work in gdb.

llvm-svn: 2821
2002-07-08 22:38:45 +00:00
Vikram S. Adve
d82933c6c8 MachineInstr* in vector are not const (and never really were)
because operands may be modified directly to set register.

llvm-svn: 2820
2002-07-08 22:34:40 +00:00
Vikram S. Adve
4d696efa99 Added two more helper functions for instruction creation.
llvm-svn: 2819
2002-07-08 22:33:45 +00:00
Vikram S. Adve
da5e272403 Moved MachineCodeForBB to be an annotation on BasicBlock.
llvm-svn: 2818
2002-07-08 22:31:11 +00:00
Anand Shukla
43bbde3f76 changes BBsorting and oredering
llvm-svn: 2817
2002-07-08 19:37:06 +00:00
Anand Shukla
9d38b4b511 small corrections
llvm-svn: 2816
2002-07-08 19:36:39 +00:00
Anand Shukla
a5c08b7973 changed function numbering
llvm-svn: 2815
2002-07-08 19:36:01 +00:00
Anand Shukla
ffc5389151 Add new << to allow printing modules by reference.
llvm-svn: 2814
2002-07-03 16:52:15 +00:00
Chris Lattner
a590093513 *** empty log message ***
llvm-svn: 2813
2002-06-30 16:25:25 +00:00
Chris Lattner
63f4011a0c Clean up anands patch
llvm-svn: 2812
2002-06-30 16:25:21 +00:00
Chris Lattner
858f3734a1 Strip the symbols out of the bytecode to inflate generated executables less.
llvm-svn: 2811
2002-06-30 16:25:07 +00:00
Chris Lattner
a5eae315e5 YEs, we really do want to sort.
llvm-svn: 2810
2002-06-30 16:20:02 +00:00