Commit Graph

364 Commits

Author SHA1 Message Date
Ruchira Sasanka
22ccb1b905 Added interference for args in pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1300 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 15:33:58 +00:00
Chris Lattner
65ea171409 Remove much cruft from the MemAccessInst instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1298 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 11:27:58 +00:00
Ruchira Sasanka
84dce16fb1 commented out lines printing code after scheduling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1295 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-13 23:12:53 +00:00
Ruchira Sasanka
f221a2e0a8 Fixed a bug concering LR spilling. Earlier, added spilled code was not inserted
into the instruction stream correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1294 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-13 23:09:30 +00:00
Ruchira Sasanka
5f98aca57c Changed checking for invalid register number - earlier it was uisng a contant
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1293 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-13 23:08:19 +00:00
Vikram S. Adve
e85f2332db Do the same for allocating spills to get their alignment right too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1285 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 23:40:22 +00:00
Vikram S. Adve
00521d79bf When allocating space on stack for writing a register,
use the size of the register, not the size of the Value type,
to get the right alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1284 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 23:26:35 +00:00
Ruchira Sasanka
9d47866497 Fixed a bug with pervious ColorCallArg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1278 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 20:54:19 +00:00
Ruchira Sasanka
91014f6b0c Canged ColorCallArg so that when a call arg is directly pushed on to stack
for argument passing, that instruction is directly added to the InstructionsBefore
set of the called machine instruction - i.e., it is not reordered.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1277 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 20:31:47 +00:00
Ruchira Sasanka
7130938f94 For phi elimination, now we are generating only one instruction
using cpValue2Value instead of
passing vector to createCopyInstructionByType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1272 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 19:42:27 +00:00
Vikram S. Adve
3438b21ebd Disable use of the Phi machine instruction which is no longer needed
for register allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1270 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 18:54:11 +00:00
Vikram S. Adve
200a435966 Eliminate most uses of the machine instruction vector for each LLVM instr,
since some m. instr. may be generated by LLVM instrs. in other blocks.
Handle non-SSA (anti and output) edges and true edges uniformly by
working with machine instructions alone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1269 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 18:53:43 +00:00
Ruchira Sasanka
67a463ac04 Added phi elimination code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1265 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 14:45:33 +00:00
Ruchira Sasanka
b2490fc4fb Added phi elimination code - not final
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1264 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 14:44:50 +00:00
Vikram S. Adve
af00d485a4 Major improvement to how nodes are built for a BB.
LLVM instruction is no longer recorded in each node, but BB is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1262 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 14:18:01 +00:00
Vikram S. Adve
fd9b7dcbf5 Fix dumb bug in alignment adjustment code!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1260 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 05:16:39 +00:00
Vikram S. Adve
998cf0d25f Fix bogus code that was eliminating needed args.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1259 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-11 23:11:36 +00:00
Ruchira Sasanka
c56e5c1485 Fixed FP and SP usage. SP for outgoing args - for everything else FP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1258 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-11 22:37:51 +00:00
Ruchira Sasanka
6beb013c37 cahnged StackPointer accesses to FramePointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1257 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-11 21:49:37 +00:00
Vikram S. Adve
5a81692f47 Down-growing offsets from FP should start at 0, not -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1255 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-11 21:22:11 +00:00
Vikram S. Adve
5b43af962b Only add true dep. edges from an earlier to a later instruction.
This wasn't a problem until we started putting copies for Phi values
that produced cycles in the SchedGraph!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1254 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-11 01:23:27 +00:00
Ruchira Sasanka
65480b75af Changed code to ignore Phi Nodes in PhyRegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1253 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 21:21:36 +00:00
Ruchira Sasanka
ae4bcd7566 Corrected reodering code for instructions inserted before calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1252 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 21:20:43 +00:00
Vikram S. Adve
2144722389 Several bug fixes in printing constants, particularly with unsized
arrays and multi-dimensional arrays.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1239 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 02:03:06 +00:00
Vikram S. Adve
671b16d055 Must generate an instruction for GetElementPtr if single user is not
a memory instruction!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1238 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 01:05:26 +00:00
Ruchira Sasanka
aa12a78a36 Disabled some debuggin messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1237 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 00:26:55 +00:00
Ruchira Sasanka
efaf9be8a4 Coalesing bug fix - now checks for the same regType instead of the same
regClass since FP class has two reg Types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1236 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-10 00:20:24 +00:00
Ruchira Sasanka
ad1400924d No major change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1235 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 23:49:42 +00:00
Ruchira Sasanka
868cf82c68 Added code for correct reordering of call arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1234 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 23:49:14 +00:00
Vikram S. Adve
4a48c339d6 Added class MachineCacheInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1229 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:20:18 +00:00
Vikram S. Adve
915b58d2ed Add support to print constant arrays and structures.
Align data larger than an L1 cache line on L1 cache line boundary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1228 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:19:29 +00:00
Vikram S. Adve
6ad7c553fd Do the same for float->int that we did for int->float earlier.
Also check IsPointerType() in addition to IsIntegral() in several places.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1227 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:18:16 +00:00
Vikram S. Adve
5b6082eccf Added function UltraSparcInstrInfo::CreateCodeToCopyFloatToInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1226 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:16:40 +00:00
Vikram S. Adve
b7048409ae Added class UltraSparcCacheInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1225 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:16:04 +00:00
Vikram S. Adve
5afff3b917 Bug fix: Need to include the stack offset "bias" in assembly code itself.
Added class UltraSparcCacheInfo.
Added function to convert float to int by copying via memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1224 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:15:52 +00:00
Vikram S. Adve
fb1a6c87d6 Use node->getOpCode() instead of node->getMachineInstr()->getOpCode().
Much nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1223 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-09 02:14:20 +00:00
Chris Lattner
00d91c6cd8 Add method decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1217 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 20:55:05 +00:00
Ruchira Sasanka
226f1f0b22 corrected insertCode4Spilled ... bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1212 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 19:11:30 +00:00
Ruchira Sasanka
5a61d85f97 Uncommented LR spill code insertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1207 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 16:43:25 +00:00
Vikram S. Adve
ffbba0f325 Bug fix: need to use .reserve for uninitialized data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1205 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 14:29:57 +00:00
Vikram S. Adve
e64574ce71 Major change to how defs are found when adding dependences (they
are now found as part of the initial walk of the machine code).
Also memory load/store instructions can be generated for non-memory
LLVM instructions, which wasn't handled before.  It is now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1199 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:20:23 +00:00
Vikram S. Adve
af1d2c80e0 MachineCodeForMethod is now an annotation on class Method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1198 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:18:18 +00:00
Vikram S. Adve
7a2f1e7c5d Add handle to TargetMachine object in all Machine...Info classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1197 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:15:08 +00:00
Vikram S. Adve
3e95814685 Added support for bitwise logical operators. Use different labels for
for these than for boolean logicals to avoid making Burg diverge.
See Burg manual for more information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1196 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:14:02 +00:00
Vikram S. Adve
29ff873c6c Fixed function getEscapedString to follow the Sparc assembly rules
for symbol names!  (And renamed it to getValidSymbolName).
Fixed format for float and other constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1195 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:12:37 +00:00
Vikram S. Adve
ff5a09ee44 Fix bugs in FITOS/D instruction generation.
The space for optional args in the stack frame is now being computed,
so finish the code generation for the variable `alloca'.
Finally, made a major overhaul of how stack frame is managed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1194 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 05:04:09 +00:00
Vikram S. Adve
b9c3863e08 Added new function UltraSparcInstrInfo::CreateCodeToCopyIntToFloat.
Also major overhaul of how stack frame is managed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1193 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:57:53 +00:00
Vikram S. Adve
1c0fba6e9c Removed class RegStackOffsets and used class MachineCodeForMethod
directly to manage stack frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1192 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:56:41 +00:00
Vikram S. Adve
7f37fe5187 Use MachineFrameInfo as base class of UltraSparcFrameInfo, and made
a major overhaul of this class and how stack frames are managed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1191 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:55:13 +00:00
Vikram S. Adve
38f5d46aff Added two minor methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1187 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:49:52 +00:00
Vikram S. Adve
12af164c87 Removed class RegStackOffsets and used class MachineCodeForMethod
directly to manage stack frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1186 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:48:50 +00:00
Vikram S. Adve
be49526193 Major overhaul of stack frame management.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1185 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-08 04:47:06 +00:00
Chris Lattner
8e5c0b473a Killing warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1175 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 14:01:59 +00:00
Chris Lattner
6dad506d81 Squelch warnings about not returning a value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1173 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 13:49:12 +00:00
Ruchira Sasanka
d1565abd68 Fixed bug - added code in pushUnconstrainedIGNodes() to check whether a node
is already pushed to stack by a previous call to the same method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1154 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 15:25:38 +00:00
Vikram S. Adve
04cc49be65 Bug fix: uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1147 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 05:11:05 +00:00
Vikram S. Adve
9576b15fcd Bug fix: Printing AdIBef and AdIAft outside the scope where they
were declared, and in some cases when they were unintialized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1146 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 05:01:54 +00:00
Vikram S. Adve
c352d2c530 Modified graph construction to use one pass to find all defs.
Avoids having to handle some special cases that cause complex interactions
with instr. selection.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1138 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 04:04:23 +00:00
Vikram S. Adve
510eec7c89 Generate code for Rem instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1124 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 21:59:14 +00:00
Vikram S. Adve
b7f06f46a1 Fixed instruction information for RDCCR and WRCCR.
Fixed selection to create a TmpInstruction for each integer CC register
(since it is an implicit side-effect, unlike FP CC registers which are
explicit operands).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1120 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 19:34:49 +00:00
Chris Lattner
8e7f409169 Minor method rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1119 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 08:08:34 +00:00
Ruchira Sasanka
a9e45c8d66 Added an assertion since it seems like AdjList returns an errornous size in method
IGNode::pushOnStack().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1116 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 22:01:09 +00:00
Ruchira Sasanka
80b1a1a26a Added support for correct spilling of %ccr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1112 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 20:41:22 +00:00
Ruchira Sasanka
3839e6e309 Added code to support correct saving of %ccr across calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1111 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 19:59:59 +00:00
Ruchira Sasanka
51bc0e7994 Arranged stack frame - needs furhter organization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1108 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 17:14:44 +00:00
Ruchira Sasanka
ef1b0cb9a5 Arranged stack frame - needs furhter organization
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1106 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 17:13:27 +00:00
Chris Lattner
24d3a8b58d Check in to use moved stringizing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1024 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-29 13:39:38 +00:00
Vikram S. Adve
53b44e1c32 Minor fix I omitted to check in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1012 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 22:19:06 +00:00
Vikram S. Adve
94e40ef064 Record constants that need to be emitted in the assembly code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1010 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:46:23 +00:00
Vikram S. Adve
d0d79c01b4 Allow combinations of True/Anti/Output flags for each edge to
support, e.g., dependences on Call instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1009 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:45:02 +00:00
Vikram S. Adve
a93bbac606 Add edges between call instructions and (a) load/store instructions, and
(b) any instructions that use or set CC registers.  Whether or not the
latter are needed really should be machine-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1008 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:43:33 +00:00
Vikram S. Adve
a2a7094662 Generate SETX for 64-bit integers!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1007 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:41:46 +00:00
Vikram S. Adve
c7b2e5c81e Add SETX instruction for 64-bit constants.
Add M_CC_FLAG for many instructions that use int or fp CC registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1006 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:41:01 +00:00
Vikram S. Adve
0589b2c63f Need to subtract, not add, stack size in SAVE instruction!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1005 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:39:47 +00:00
Vikram S. Adve
953c83e1ee Major overhaul to print globals and constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1004 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 21:38:52 +00:00
Ruchira Sasanka
20c82b12c9 Added support for spilling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@992 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 18:15:12 +00:00
Ruchira Sasanka
174bded6ce Added spill code support; moved insertCallerSaving to SparRegInfo since
we need to handle %ccr reg in a special way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@990 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-28 18:12:02 +00:00
Ruchira Sasanka
7dcd61209a Fixed load syntax in EmitAssembly
Fixed cpReg2Mem (store) operand oreder in SparcRegInfo.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@984 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 22:05:34 +00:00
Ruchira Sasanka
c74a720204 Fixed logic for checking whether a LR received the correct color.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@976 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-24 15:56:58 +00:00
Ruchira Sasanka
88dedc1544 Corrected a bug in SparcRegInfo.cpp - to add inserted instructions before a return
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@969 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 21:40:39 +00:00
Ruchira Sasanka
f7434f0e1d added support to move "added instructions" after the delay slot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@968 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 21:38:42 +00:00
Ruchira Sasanka
251d8db133 Added support to move "added instructions" after the delay slot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@967 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 21:38:00 +00:00
Vikram S. Adve
c023be29a4 Use class MachineCodeForMethod to print machine code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@948 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:52:03 +00:00
Vikram S. Adve
7ad1046065 Cosmetic changes only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@946 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:51:09 +00:00
Vikram S. Adve
fb8c0533b4 Modify code that processes delay slots so that it preserves any
useful instructions already inserted into delay slots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@945 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:49:27 +00:00
Vikram S. Adve
c5d0322d98 UNUSED.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@944 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:46:38 +00:00
Vikram S. Adve
578f99c74d Split JMPL into JMPLCALL and JMPLRET.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@943 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:44:53 +00:00
Vikram S. Adve
9db43184ca Added a frame layout class, and code to insert prolog/epilog code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@942 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:44:23 +00:00
Vikram S. Adve
a1ca7b9d79 Reordered registers slightly to simplify a new check.
Added a function to map between the caller's and callee's register windows.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@941 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:43:08 +00:00
Vikram S. Adve
53fec86ffd Split JMPL into JMPLCALL and JMPLRET so that IsCall and IsReturn can
be used to distinguish those uses of the `jmpl' instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@940 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:41:12 +00:00
Vikram S. Adve
fb36112c8d Added functions to generate prolog and epilog code.
Use JMPLRET instead of RETURN for method returns so that


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@939 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:36:31 +00:00
Vikram S. Adve
1d86cc06dc Added SAVE and RESTORE. Duplicated JMPL into JMPLCALL and JMPLRET,
which have the same opcode and operands but different flags.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@938 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:32:55 +00:00
Vikram S. Adve
c152163eb4 Reordered a couple of registers to simplify some new checks.
Added code to map between caller's and callee's register windows.
Added frame layout class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@937 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 13:31:53 +00:00
Ruchira Sasanka
b3b6f5338c Added support for both call/jmpl instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@930 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-21 16:43:41 +00:00
Vikram S. Adve
2827d52868 Fixed printing of offset operand for RETURN instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@928 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-20 21:33:50 +00:00
Vikram S. Adve
ea21a6c82a Use CALL for direct function calls; JMPL for indirect ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@927 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-20 20:57:06 +00:00
Vikram S. Adve
43534443ff Minor bug fix in printing operands of JMPL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@926 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-20 20:56:40 +00:00
Ruchira Sasanka
44d2b947cb Added code to support unusable Suggested Colors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@922 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 21:42:06 +00:00
Ruchira Sasanka
b49865fa02 Added code so that colorIGNode does not unnecessarily reserve unusable
Suggested colors for neighbors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@921 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 21:41:16 +00:00
Ruchira Sasanka
0e62aa6d14 Added code to PhyRegAlloc to mark unusable suggested regs
Added initialization to AdjList to IGNode constructor - major bug fix


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@920 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 21:39:31 +00:00
Ruchira Sasanka
0f5e98854b Corrected call interference bug - suggested color not allocated if
volatile and there are call interferences


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@918 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 17:23:43 +00:00
Ruchira Sasanka
36f7707d2a Changed Call interference info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@917 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 17:21:59 +00:00
Ruchira Sasanka
958faf3f5a Corrected call interference bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@916 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-19 17:21:03 +00:00
Ruchira Sasanka
0fd8dc8099 no major change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@914 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 23:58:08 +00:00
Ruchira Sasanka
735d6e3ee2 Added support for condition code loading/stroing in methods cpReg2Reg etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@911 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 22:38:52 +00:00
Ruchira Sasanka
97b8b4410a removed some debug messages
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@910 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 22:36:26 +00:00
Chris Lattner
e001059e0a Change Sources specifier to ExtraSources
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@874 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 01:48:09 +00:00
Vikram S. Adve
7fe27874be 1. Move most of the constant-fixup code into machine-independent file
InstrSelectionSupport.cpp.  It now happens in a bottom-up pass on
   each BURG tree after the original top-down selection pass on the tree.
2. Handle global values as constants (viz., constant addresses).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@868 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 00:26:20 +00:00
Vikram S. Adve
fee93865d6 Sparc-specific code shared between local files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@864 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 00:03:20 +00:00
Vikram S. Adve
4df35a2ce3 Moved implementation of class UltraSparcInstrInfo to SparcInstrInfo.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@863 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 00:02:32 +00:00
Vikram S. Adve
5684c4e2b4 Added virtual function to generate an instruction sequence to
load a constant into a register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@862 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 00:02:06 +00:00
Vikram S. Adve
30764b8366 Moved implementation of class UltraSparcInstrInfo here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@861 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-18 00:01:48 +00:00
Vikram S. Adve
6d35326cd5 1. Add a bottom-up pass on BURG trees that is used to fix constant operands.
Needs to be bottom up because constant values may be forward-substituted
   to their uses (i.e., into the parent in the BURG tree).
2. Move most of the constant-fixup code into machine-indepedent file
   InstrSelectionSupport.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@859 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-17 23:57:50 +00:00
Vikram S. Adve
f43e3366ef Separate VM instruction that generates the instructions that compute a value
from the value itself (the one causing an edge) because the latter may be
a temporary used within the instruction sequence for the VM instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@858 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-17 23:55:16 +00:00
Vikram S. Adve
85b46d6c6d *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@857 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-17 23:53:16 +00:00
Vikram S. Adve
c811c2ec0b Only list automatically generated .cpp files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@854 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-17 12:34:26 +00:00
Ruchira Sasanka
1b732fd0d6 changed debugg message printing - no change to useful code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@850 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-16 16:34:44 +00:00
Ruchira Sasanka
47c1372e09 No major change - commented some debug code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@849 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-16 01:33:55 +00:00
Ruchira Sasanka
92e251cc29 No major change - added some comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@848 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-16 01:25:05 +00:00
Ruchira Sasanka
c4d4b76efb Added support for caller saving
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@847 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-16 01:23:19 +00:00
Chris Lattner
f927bb482e Emit the proper .type declarations to tell the debugger what a function is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@845 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 19:34:17 +00:00
Chris Lattner
c28f6d6258 Handle abnormal jmpl syntax correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@844 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 19:21:31 +00:00
Chris Lattner
634b352fa6 Print Debug Code to stderr instead of stdout so that it doesn't mess up the assembly output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@841 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 18:30:06 +00:00
Chris Lattner
1e23ed7c65 Output to cerr rather than cout so that debug info doesn't mess up assembly generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@840 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 18:15:27 +00:00
Ruchira Sasanka
b8354a8e4f --added support for implicit operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@832 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 16:58:50 +00:00
Ruchira Sasanka
a90e77061d updated suggesting/coloring of call & return args & implicit operands.
Changed added instr to a deque (from a vector)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@831 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 16:26:38 +00:00
Ruchira Sasanka
cc3ccac238 updated suggesting/coloring of call & return args & implicit operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@830 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 16:25:28 +00:00
Ruchira Sasanka
21721b63c3 fixed a coalscing bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@828 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 16:22:44 +00:00
Chris Lattner
ec0a95f4e4 Be const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@826 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 15:54:43 +00:00
Vikram S. Adve
c025fc1083 Forward operands into implicit uses as well as explicit ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@808 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 23:28:43 +00:00
Vikram S. Adve
137b62ccc8 Two bug fixes that were suppressing some "load-constant-into-register" instrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@795 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 18:10:33 +00:00
Chris Lattner
aa703203c3 Move the burg file to here. Add .in suffix to indicate that it gets
preprocessed before burg gets to it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@794 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 17:26:21 +00:00
Chris Lattner
0714e3bc44 Make the sparc.burg file be a little more flexible and rubust in the fact of
renumbering of instructions.  It is still horribly broken and grossly dependant on the number of instructions, but now it is a least a little better.

Oh yeah it also works now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@793 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-14 17:25:31 +00:00
Chris Lattner
e369fcbe35 Fix broken #endif
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@768 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:54:54 +00:00
Chris Lattner
749655ff8e * Add #include
* Fix #endif problems
* Change to getCalledValue instead of getCalledMethod


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@767 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:54:30 +00:00
Chris Lattner
80c685ff15 * Fix privacy issues on RegToRefVecMap
* Fix initialization order problems...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@762 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:51:01 +00:00
Ruchira Sasanka
d33238bb7b --corrected coalescing test: coalsed only if two are of the same reg class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@729 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-12 17:48:18 +00:00
Ruchira Sasanka
c1daae895d added support for implict operands in machine instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@728 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-12 17:47:23 +00:00
Ruchira Sasanka
598641b4ca --added support for implicit operands in machine instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@727 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-12 17:46:27 +00:00
Vikram S. Adve
a995e6086d Record implicitRefs for each machine instruction instead of
each VM instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@725 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-11 04:23:19 +00:00
Vikram S. Adve
8d0ffa553f Add graph edges due to implicit refs in each machine instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@724 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-11 04:22:45 +00:00
Vikram S. Adve
6db77c55ff Don't insert useful instructions in delay slot of a RETURN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@721 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:58:11 +00:00
Vikram S. Adve
8557b226f3 Insert code to load constants used as Call or Return arguments.
Also, note return value of a Call as an "implicitUse".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@720 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:56:33 +00:00
Vikram S. Adve
a1d14f3555 Machine-independent code generation routines used in instruction
selection.  These used to live in several different places before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@719 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:50:43 +00:00
Vikram S. Adve
9aba1d3307 Moved code generation support routines to InstrSelectionSupport.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@717 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-10 20:49:07 +00:00
Ruchira Sasanka
0e986d7d28 --removed %g regs being allocated - fix later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@714 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-09 23:36:13 +00:00
Chris Lattner
ef9c23f281 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@703 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 14:53:21 +00:00
Chris Lattner
b00c582b6d Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-02 03:41:24 +00:00
Chris Lattner
1d87bcf490 Convert more code to use new style casts
Eliminate old style casts from value.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@696 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 20:11:19 +00:00
Chris Lattner
cfe26c930a Add more support for new style casts
Convert more code to use them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 18:26:53 +00:00