Commit Graph

236 Commits

Author SHA1 Message Date
Chris Lattner
fb3b1ec982 * Switch over to cleaner TmpInstruction model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1648 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:39:06 +00:00
Chris Lattner
06cb1b7382 * Straighten out #includes
* Switch to MAchineCodeForInstruction model instead of MachineCodeForVMInstr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1647 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:33:46 +00:00
Chris Lattner
a8bbb6bced * Swich to annotation model for MachineCodeForInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1646 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:31:41 +00:00
Chris Lattner
de6dbabaee Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1645 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:30:08 +00:00
Chris Lattner
0861b0c3e6 * Straighten out #includes
* Switch from MachineCodeForVMInstr to MachineCodeForInstruction model


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1644 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:29:45 +00:00
Chris Lattner
3462cae44f * Get machine instrs from Instructin's by using MachineCodeForInstruction::get
* Convert a few (*X). to X->


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1643 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:28:30 +00:00
Chris Lattner
29f4c06b7f Add a class forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1637 91177308-0d34-0410-b5e6-96231b3b80d8
2002-02-03 07:13:04 +00:00
Chris Lattner
92a12d5c6b LoopDepth calculation is now in CFG namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1601 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-31 00:41:13 +00:00
Chris Lattner
a16c3efb9f Make it build with 2.95.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1554 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-23 05:47:57 +00:00
Chris Lattner
dbe5304f77 Oops lost a parenthesis somehow :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1504 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-21 01:33:12 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Ruchira Sasanka
ce773da223 Fixed a bug in spill cost estimation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1500 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-08 16:29:23 +00:00
Ruchira Sasanka
6a3db8c117 PhyRegAlloc.cpp: Added temp area resetting before every call
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1499 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 21:09:06 +00:00
Ruchira Sasanka
4f3eb22e1f Added destructors and comments.
Added correct spill candidate selection logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1493 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:19:18 +00:00
Ruchira Sasanka
42bd177eae Added comments, destructors where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1491 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-07 19:16:26 +00:00
Vikram S. Adve
fa24897f9f Eliminate all uses of memInst->getIndicesBROKEN().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1485 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-15 00:36:32 +00:00
Chris Lattner
7a17675206 Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 00:03:30 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
7061dc50b2 Split the PHINode class out from the iOther.h file into the iPHINode.h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1405 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 18:02:31 +00:00
Chris Lattner
cee8f9ae67 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-27 00:03:19 +00:00
Chris Lattner
4ed17bad69 Stuff after a #endif is not valid CPP input and breaks some compilers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1375 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:56:52 +00:00
Chris Lattner
69a86e4e23 The old getIndices has been deprecated, because it no longer works. It now
is named getIndicesBROKEN() and shall be removed when the codebase is updated
to not call it


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1338 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:56:19 +00:00
Ruchira Sasanka
f90870f622 Commented some popTempArg.. since it leads to a bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1326 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 22:02:06 +00:00
Ruchira Sasanka
07c7086bd2 Added naming to inserted phi copy values - for easy debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1325 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 20:46:40 +00:00
Ruchira Sasanka
ba9d5dba25 Fixed a bug in setReLRegsUsedByMI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1323 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 20:23:19 +00:00
Ruchira Sasanka
825dd55429 Changed some names of methods, added const etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1322 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 20:22:37 +00:00
Vikram S. Adve
7c47c7201d Modify AllocateLocalVar method to take a size argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1318 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 15:22:26 +00:00
Ruchira Sasanka
f6dfca1395 fixed setUsedRegAtMI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1317 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 15:00:53 +00:00
Ruchira Sasanka
20ac79e329 Changed phi elimination code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1311 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 00:27:14 +00:00
Ruchira Sasanka
8d24337eea Small changed to printing a machine operand - It the operand is a def, it prints
a star after it - only for debugging


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1309 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 20:05:23 +00:00
Vikram S. Adve
ecd5813639 Don't assume constant operand can only be in position 1!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1308 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 18:49:45 +00:00
Vikram S. Adve
9e29f78029 Idiotic error in last fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1306 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 17:55:02 +00:00
Vikram S. Adve
c811745156 Don't need to load a NULL pointer constant from memory!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1305 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 17:24:49 +00:00
Ruchira Sasanka
cbddf49665 Added support method for setting interference for pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1303 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-14 15:37:13 +00:00
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
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
Vikram S. Adve
e492c9d4d1 Bug fix in offset alignment computations: don't subtract the padding
value from size *before* subtracting size from offset!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1283 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 23:26:23 +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
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
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
d9beb975f2 Improved printing routines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1263 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 14:19:47 +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
5567e942c0 Adjust all stack variable offsets to be aligned by size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1261 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-12 05:17:23 +00:00
Vikram S. Adve
f1a0a10813 Fix errors in computing downgrowing offsets, and in
computing size of extra outgoing args.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1256 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-11 21:23:33 +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