1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

651 Commits

Author SHA1 Message Date
Chris Lattner
b047a0d449 All callers of these methods actually wanted them to preserve the flags,
so get rid of the def/use parameters that were getting passed in.

**** This now changes the semantics of these methods to preserve the flags,
     not clobber them!

llvm-svn: 7602
2003-08-05 16:58:46 +00:00
Chris Lattner
297f7d2451 Fix bugs handling ESP in alloca references
llvm-svn: 7591
2003-08-05 04:13:58 +00:00
Chris Lattner
6fece1bf61 Revert previous change, and be really anal about what physical registers can do.
llvm-svn: 7588
2003-08-05 00:49:09 +00:00
Chris Lattner
0e8197ad06 Don't bother calculating info unless its needed. May reduce number of stack slots created.
llvm-svn: 7584
2003-08-04 23:42:37 +00:00
Chris Lattner
8934560bd3 * Fix spelling of 'necessary'
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx

llvm-svn: 7583
2003-08-04 23:36:39 +00:00
Chris Lattner
5dca2ea4bc Simplify code, eliminating the need for the X86 isVoid target instr flag
llvm-svn: 7534
2003-08-03 21:51:45 +00:00
Chris Lattner
77691b2c54 Set debug types
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner
eba995d624 Remove using decl
llvm-svn: 7531
2003-08-03 20:24:29 +00:00
Chris Lattner
a18bb98cf5 Wrap at 80 columns
llvm-svn: 7503
2003-08-03 13:49:03 +00:00
Chris Lattner
1baa706ab7 Move DEBUG to Debug.h
llvm-svn: 7497
2003-08-01 22:21:34 +00:00
Vikram S. Adve
1414fba288 All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().

llvm-svn: 7390
2003-07-29 19:50:12 +00:00
Vikram S. Adve
b58f52ab45 1. Bug fix: Don't use branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
   (which will eventually be moved before the branch).
2. Bug fix:  Delete the delay slot instr, not the branch instr, when
   moving delay slot instr. out!!!!
3. Move code to insert caller-saves moved here from SparcRegInfo:
   it is now machine-independent.

llvm-svn: 7389
2003-07-29 19:49:21 +00:00
Vikram S. Adve
42005e62b0 Add const version of getLiveRangeForValue().
llvm-svn: 7386
2003-07-29 19:38:22 +00:00
Vikram S. Adve
52859278d1 Code to insert caller-saves moved here from SparcRegInfo: it is now
machine-independent.
Fix problem with using branch operand reg. as temp. reg. when
spilling values used by an instruction in the delay slot of the branch
(which will eventually be moved before the branch).

llvm-svn: 7385
2003-07-29 19:37:41 +00:00
Chris Lattner
92dfc1ed32 Making this code const-correct would be a pain, so I'll hack it.
llvm-svn: 7350
2003-07-26 23:29:51 +00:00
Chris Lattner
2d6049baaf Const correctness fixes
llvm-svn: 7349
2003-07-26 23:24:56 +00:00
Chris Lattner
e39696972d Be const correct
llvm-svn: 7348
2003-07-26 23:23:41 +00:00
Chris Lattner
792286a084 Hrm, another necesary one :(
llvm-svn: 7347
2003-07-26 23:22:19 +00:00
Chris Lattner
ecc0501a97 Remove #include
llvm-svn: 7342
2003-07-26 23:01:04 +00:00
Chris Lattner
9224631d6b Remove extraneous #includes
llvm-svn: 7341
2003-07-26 23:00:29 +00:00
Vikram S. Adve
57eb4ab6bc (1) Change the way unused regs. are marked and found to consider regType
info (since multiple reg types may share the same reg class).
(2) Remove machine-specific regalloc. methods that are no longer needed.
    In particular, arguments and return value from a call do not need
    machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
    overloading when an include file is omitted.

llvm-svn: 7329
2003-07-25 21:06:09 +00:00
Vikram S. Adve
714fee31fd Remove unused field. Change the way unused regs. are marked and
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).

llvm-svn: 7327
2003-07-25 21:00:13 +00:00
Chris Lattner
9c569f48a0 Remove unnecessary casts
llvm-svn: 7250
2003-07-23 15:17:51 +00:00
Chris Lattner
c1049acba1 Random cleanups
llvm-svn: 7247
2003-07-23 14:59:40 +00:00
Chris Lattner
67138b2c59 Remove using decl
llvm-svn: 7246
2003-07-23 14:55:59 +00:00
Vikram S. Adve
d8b600cb85 Values stored in CallArgsDescriptor cannot be const.
llvm-svn: 7156
2003-07-10 19:46:15 +00:00
Vikram S. Adve
b1496585b6 isMarkedForSpill() should be const.
llvm-svn: 7155
2003-07-10 19:45:28 +00:00
Vikram S. Adve
6aa3abf7fa Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.

llvm-svn: 7154
2003-07-10 19:45:07 +00:00
Vikram S. Adve
0b23c58179 Print out all neighbors in interference graph, not just higher-numbered ones.
llvm-svn: 7153
2003-07-10 19:43:33 +00:00
Vikram S. Adve
00f3778923 Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same
register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7152
2003-07-10 19:42:55 +00:00
Vikram S. Adve
d7b18ee501 Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
llvm-svn: 7112
2003-07-06 20:33:21 +00:00
Vikram S. Adve
293af7edb6 Minor beautification: fold a couple of lines of code.
llvm-svn: 7054
2003-07-02 01:24:00 +00:00
Vikram S. Adve
daa346c89a A def. operand of a machine instruction may be an ordinary Value*,
not just an Instruction*, at least in one unfortunate case:
the first operand to the va_arg instruction.
Modify ValueToDefVecMap to map from Value*, not Instruction*.

llvm-svn: 7052
2003-07-02 01:16:01 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
Chris Lattner
493103ea3b Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca

llvm-svn: 6727
2003-06-16 22:29:09 +00:00
Chris Lattner
c32989e03a Remove two using decls
Remove usage of alloca

llvm-svn: 6725
2003-06-16 22:18:28 +00:00
Brian Gaeke
4681b27a92 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.

llvm-svn: 6723
2003-06-16 21:54:01 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Guochun Shi
77b04a417a add some comments
add a function ModuloScheduling::dumpFinalSchedule() to print out final schedule

llvm-svn: 6677
2003-06-10 20:04:30 +00:00
Guochun Shi
36a4257c48 add an brief instruction what this pass is
llvm-svn: 6676
2003-06-10 20:03:39 +00:00
Guochun Shi
385c1556a9 a simple introduction to this pass
llvm-svn: 6675
2003-06-10 20:02:16 +00:00
Guochun Shi
8783d79b8b cleaned code
add some comments

llvm-svn: 6674
2003-06-10 19:09:00 +00:00
Guochun Shi
7868d0f43e delete useless functions
add comment

llvm-svn: 6673
2003-06-08 23:16:07 +00:00
Guochun Shi
24ac61d239 change DEBUG to DEBUG_PRINT
llvm-svn: 6672
2003-06-08 20:40:47 +00:00
Misha Brukman
ba5c703619 Do not hastily change the Opcode from 'r' to 'i' type if we're not actually
SETTING the operand to be an immediate or have verified that one of the operands
is really a SignExtended or Unextended immediate value already, which warrants
an 'i' opcode.

llvm-svn: 6662
2003-06-07 02:34:43 +00:00
Chris Lattner
060e5e326b Fix bug: Jello/2003-06-04-bzip2-bug.ll
llvm-svn: 6624
2003-06-05 17:15:04 +00:00
Misha Brukman
b126ea43eb I have finally seen the light. The code to change the opcode must live higher in
the loop, and in both cases. In the first case, it is a VReg that is a constant
so it may be actually converted to a constant. In the second case, it is already
a constant, but then if it doesn't change its type (e.g. to become a register
and have the value loaded from memory if it is too large to live in its
instruction field), we must change the opcode BEFORE the 'continue', otherwise
we miss the opportunity.

llvm-svn: 6602
2003-06-04 04:54:06 +00:00
Misha Brukman
a69a008010 Pass through the emitConstantPool() call to the real emitter.
llvm-svn: 6590
2003-06-03 20:00:49 +00:00
Misha Brukman
7a5eac8485 Moved code to modify the opcode from 'reg' to 'imm' form to a more logical place.
llvm-svn: 6563
2003-06-03 03:18:20 +00:00