Commit Graph

978 Commits

Author SHA1 Message Date
Alkis Evlogimenos
7a40eaacee Do a separate pass to compute spill weights because doing it inline
with live intervals was missing registers that were used before they
were defined (in the arbitrary order live intervals numbers
instructions).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10603 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-24 15:44:53 +00:00
Alkis Evlogimenos
3bf564a95f Change the way free regusters are computed and perform better
allocation in the presence of preallocated intervals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 18:00:33 +00:00
Alkis Evlogimenos
056063e264 Fix crash when compiling twolf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10584 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-22 13:54:29 +00:00
Alkis Evlogimenos
4de1fefd7c Remove verifyIntervals() since it doesn't actually work right now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10570 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 20:41:26 +00:00
Alkis Evlogimenos
6b4edbaaf9 Change weight into a float so that we can take into account the
nesting level when computing it. Right now the allocator uses:

    w = sum_over_defs_uses( 10 ^ nesting level );


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10569 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 20:19:10 +00:00
Alkis Evlogimenos
169cfd0196 Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10566 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-21 05:43:40 +00:00
Chris Lattner
16c45e9de8 Add a new target-independent machine code freeing pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10560 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 10:20:58 +00:00
Chris Lattner
07f32d48f1 * Finegrainify namespacification
* Move sparc specific code out of generic code
* Eliminate the getOffset() method which made INVALID_FRAME_OFFSET
  necessary, which made pulling in MAX_INT as a sentinal necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-20 09:17:07 +00:00
Alkis Evlogimenos
4c080863de Remove TwoAddressInstruction from the public headers and add an ID
instead, since this pass doesn't expose any state to its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10520 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 22:40:24 +00:00
Chris Lattner
5e46b513f3 Prune some #includes
Add a statistic for # reloads


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10518 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 20:25:31 +00:00
Alkis Evlogimenos
a71e05acdd Modify linear scan register allocator to use the two-address
instruction pass. This also fixes all remaining bugs for this new
allocator to pass all tests under test/Programs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10515 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:15:02 +00:00
Alkis Evlogimenos
a3d0e5c2b2 Fix bug in reserved registers. DH actually aliases DX and EDX which
are not reserved registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10514 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:12:18 +00:00
Alkis Evlogimenos
9af9dbde7d Modify local register allocator to use the two-address instruction pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10513 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:08:52 +00:00
Alkis Evlogimenos
71499ded4d Add TwoAddressInstructionPass to handle instructions that have two or
more operands and the two first operands are constrained to be the
same. The pass takes an instruction of the form:

        a = b op c

and transforms it into:

        a = b
        a = a op c

and also preserves live variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10512 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 13:06:04 +00:00
Alkis Evlogimenos
485ec3c21e Rename LiveIntervals::expired() to LiveIntervals::expiredAt().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10511 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:56:11 +00:00
Alkis Evlogimenos
43f692f90f When a variable is killed and redifined in a basic block only one
killing instruction is tracked. This causes the LiveIntervals to
create bogus intervals. The workaound is to add a range to the
interval from the redefinition to the end of the basic block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10510 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:53:43 +00:00
Alkis Evlogimenos
dd2cc65f34 Handle multiple virtual register definitions gracefully.
Move some of the longer LiveIntervals::Interval method out of the
header and add debug information to them. Fix bug and simplify range
merging code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10509 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:48:48 +00:00
Alkis Evlogimenos
f6f91bf668 Change preserve all claim to just preserve live variables and phielimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-15 04:55:38 +00:00
Alkis Evlogimenos
4d7af65903 Change interface of MachineOperand as follows:
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
    b) add isUse(), isDef()
    c) rename opHiBits32() to isHiBits32(),
              opLoBits32() to isLoBits32(),
              opHiBits64() to isHiBits64(),
              opLoBits64() to isLoBits64().

This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos
94743e4915 When reserving a preallocated register spill the aliases of this
register too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10450 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 11:58:10 +00:00
Alkis Evlogimenos
4c214d2bf0 Ignore non-allocatable physical registers in live interval analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 11:11:02 +00:00
Alkis Evlogimenos
7d65a12fe6 Expire any active intervals left when register allocation is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10448 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 05:50:19 +00:00
Alkis Evlogimenos
f6e610c27d Add instruction numbers to debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10447 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 05:48:57 +00:00
Alkis Evlogimenos
9435eda699 Handle explicit physical register defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10445 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 05:26:39 +00:00
Alkis Evlogimenos
efe995a406 Remove unecessary if statements when looping on ImplicitDefs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10444 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-13 01:20:58 +00:00
John Criswell
f5ba89df1f This appears to fix Bug 172 and does not break any other feature tests or
regression tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-10 22:51:41 +00:00
Alkis Evlogimenos
a327e7fea9 Make assertion stricter. Since the source operands are allocated at
this point, the second operand must be a physical register (it cannot
be a virtual one).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10292 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-05 11:31:39 +00:00
Alkis Evlogimenos
49787e35c3 Fix bug in register spilling when a preallocated live range overlaps a
potential register assignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-05 11:17:55 +00:00
Alkis Evlogimenos
b27ef248f5 Move operator<<(std::ostream&, const LiveInterval&) out of the header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-05 10:38:28 +00:00
Alkis Evlogimenos
91ceae6d20 Sort live intervals by increasing start point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10289 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-05 10:32:01 +00:00
Alkis Evlogimenos
69546d5f84 Improve debugging output and clean up some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-04 03:57:28 +00:00
Alkis Evlogimenos
585870759b Print instructions before register allocation is performed. Also fix
bug where spill instructions were added to the next basic block
instead of the end of the current one if the instruction that required
the spill was the last in the block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 23:40:39 +00:00
Alkis Evlogimenos
99d1a8f048 Remove "numReloaded" statistic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10268 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-30 05:15:36 +00:00
Alkis Evlogimenos
ff0cbe175d Merging the linear scan register allocator in trunk. It currently passes most tests under test/Programs/SingleSource/Benchmarks/Shootout so development will continue on trunk. The allocator is not enabled by default. You will need to pass -regallo=linearscan to lli or llc to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10103 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 03:32:25 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
e9414cab00 Fix problems linking against the reoptimizer; _llvm_regAllocState must have
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9858 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 07:12:01 +00:00
Brian Gaeke
213904133d Operand numbers are now ints. Save the register allocation of the value
each instruction produces as "operand" -1, and the other operands as 0
.. n, as before. PhyRegAlloc::saveState() is refactored into
PhyRegAlloc::saveStateForValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-10 00:05:26 +00:00
Misha Brukman
e2bf0a2c36 Let's not forget about our friends -- Constant Pool indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9750 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 00:04:11 +00:00
Chris Lattner
414d9d2707 Do not use a class before it is defined.
Be gcc 3.4 clean


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:25:06 +00:00
Brian Gaeke
55766e139a Update verifySavedState()'s comment, so that it reflects its current
status.  In doFinalization(), skip over external functions, just like
Anand's mapping info does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9703 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 22:42:41 +00:00
Brian Gaeke
cce4e7a1b1 Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9697 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-04 18:25:56 +00:00
Brian Gaeke
3ceac85296 Include llvm/CodeGen/MachineCodeForInstruction.h. Use it to start
implementing verifySavedState().

In saveState(), use the new AllocInfo::AllocStateTy enum, and increment
Insn each time through the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:21:33 +00:00
Brian Gaeke
82c5eb7bc8 Make AllocState an enum.
Move the stringifying method for that enum into class AllocInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 21:21:22 +00:00
Brian Gaeke
8fc493430c Publicize the type of FnAllocState.
Prototype option to save state in a global instead of as a Constant in
 the Module. (Turned off, for now, with the on/off switch welded in the off
 position. You get the idea.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9500 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 21:21:58 +00:00
Chris Lattner
3e43026095 standardize command line option names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9496 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 20:05:58 +00:00
Brian Gaeke
232db6e8d6 Move the implementations of ==, != on AllocInfos here, from UnpackTraceFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:39:18 +00:00
Brian Gaeke
537132bf12 Move AllocInfo structure to a private AllocInfo.h header file.
Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
Give doFinalization a method comment, and let it do the work of converting
 AllocInfos to LLVM Constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:32:55 +00:00
Brian Gaeke
b8dbbcee25 Make FnAllocState contain vectors of AllocInfo, instead of LLVM Constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9450 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:32:02 +00:00
Brian Gaeke
3d7125cd66 New file, containing AllocInfo structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 20:31:51 +00:00
Misha Brukman
f54c437714 * Eliminate `using' directive
* Fix order of #includes
* Make code layout more consistent
* Eliminate extraneous whitespace and comment-lines


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9433 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:10:02 +00:00
Misha Brukman
396c8c34ed * Fix order of #include files
* Doxygen-ify method comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9432 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:06:27 +00:00
Misha Brukman
0d82a54bb9 * Order #includes as per style guide
* Doxygen-ify comments
* Make code layout more consistent


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:03:50 +00:00
Misha Brukman
a1f64355d7 * Use C++ style comments instead of C-style
* Make file description more readable
* Make code layout more consistent, include comment in assert so it's visible
  during execution if it hits


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9430 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:02:47 +00:00
Misha Brukman
0849f5ace9 * Eliminate `using' directive
* Make code layout more consistent


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9427 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 17:43:17 +00:00
Misha Brukman
5e152593e0 Make code layout more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9426 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 17:39:37 +00:00
Brian Gaeke
3692fd97a6 Change the type of FnAllocState.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 20:44:29 +00:00
Brian Gaeke
60a3c55c4f Don't worry about converting each function's reg. alloc. state into One Big
Constant early on, because we can do it in doFinalization.

Tighten up a comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9387 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 20:44:23 +00:00
Brian Gaeke
b8dc21e1e2 Add prototype for verifySavedState().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9386 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 20:23:13 +00:00
Brian Gaeke
af84370908 Doxygenify method comments.
Try to improve method comments a little.
Get rid of some excess whitespace; put braces on previous line when possible.
Add stub for method to verify the work of saveState().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 20:22:53 +00:00
John Criswell
aefb666d07 Added LLVM copyright notice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9324 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 15:29:18 +00:00
John Criswell
856ba76200 Added LLVM copyright header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 15:17:13 +00:00
John Criswell
e488e9360b Added LLVM copyright notice to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:26:57 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Chris Lattner
3b237fcd38 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 21:34:28 +00:00
Chris Lattner
60fa583545 #include vector which we will need here soon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9144 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 22:09:32 +00:00
Chris Lattner
fd05924946 Decrease usage of use_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9135 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 16:48:29 +00:00
Chris Lattner
cf3056db0f Regularize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9071 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 03:32:08 +00:00
Misha Brukman
aa41c3ca20 * Doxygenified comments
* Wrap code at 80 columns
* Ordered includes according to LLVM style guide


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9020 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:41:32 +00:00
Alkis Evlogimenos
73ff5120eb Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs
and TargetInstrDescriptor::ImplicitUses to always point to a null
terminated array and never be null. So there is no need to check for
pointer validity when iterating over those sets. Code that looked
like:

if (const unsigned* AS = TID.ImplicitDefs) {
  for (int i = 0; AS[i]; ++i) {
    // use AS[i]
  }
}

was changed to:

for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
  // use *AS
}


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8960 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-08 05:20:08 +00:00
Alkis Evlogimenos
7237ecef13 Moved enum and command-line option in separate file. Also added function that returns the user selected register allocator to the caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8819 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-02 16:57:49 +00:00
Chris Lattner
797c136607 include passes.h which defines the interface this file exposes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 20:13:59 +00:00
Brian Gaeke
222bd53c2c Update head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8699 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 18:16:23 +00:00
Brian Gaeke
6a256cc37c Untabify tabs in stuff I've recently added.
Check in my register allocator state-saving code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8698 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 18:08:54 +00:00
Brian Gaeke
59b1c566c9 Use getRegClassID() instead of getRegClass()->getID(), since it's there.
Shorten the markSuggestedColorUsable method.
Add a switch for saving reg. alloc. state (coming soon).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8697 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 17:50:28 +00:00
Brian Gaeke
eefaeb84f1 Remove some unused methods of class IGNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8696 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 04:29:52 +00:00
Chris Lattner
8474f6fcda Move getAnalysisUsage method from header to .cpp file. Add a normal file
header comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8679 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 15:13:04 +00:00
Brian Gaeke
bd353fb662 Use C++ math header instead of C version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8648 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 03:57:37 +00:00
Brian Gaeke
37bc4cce9b Erase now-unused prototypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:51:00 +00:00
Brian Gaeke
874f423f54 Rearrange #includes ... since there are fewer now I guess it's a win.
(I also zapped printMachineCode() and printLabel() at the previous checkin,
but forgot to mention it.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:50:21 +00:00
Brian Gaeke
5779ef2ce0 Standardize the names of include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8645 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:37 +00:00
Brian Gaeke
fdb2596c77 Standardize the names of include guards.
Remove more excess whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8644 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:25 +00:00
Brian Gaeke
6264fb70c1 Standardize the names of include guards.
Fix typos in file header comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8643 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:31:15 +00:00
Brian Gaeke
43ce8fe477 I tried to standardize the formatting and tidy up the huge amount of
excess whitespace a little. Also improved some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 02:24:09 +00:00
Brian Gaeke
4efe342424 Convert PhyRegAlloc into a proper pass.
PhyRegAlloc.cpp:
 Don't include TargetMachine.h or TargetRegInfo.h, because these are provided
  by PhyRegAlloc.h.
 Merge class RegisterAllocator into class PhyRegAlloc.
 Simplify & move ctor, dtor to PhyRegAlloc.h.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 MarkAllocatedRegs() becomes a member method, with fewer args.

PhyRegAlloc.h:
 Include Pass.h, TargetMachine.h and TargetRegInfo.h. Don't declare
  TargetRegInfo forward.
 Give AddedInstrns the obvious clear() method.
 Make some of PhyRegAlloc's reference members into pointer members,
  so they can be more easily messed with.
 Add prototype for markAllocatedRegs().
 Remove unused inline void constructLiveRanges().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8641 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 01:23:46 +00:00
Misha Brukman
6eba07a6a3 Fixed spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 21:34:23 +00:00
Brian Gaeke
305f02dd64 Fix typo in comment. Take out some random whitespace.
(Partial merge from my working file)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8564 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:38:05 +00:00
Brian Gaeke
d0534a863a Edit comment for accuracy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:36:50 +00:00
Vikram S. Adve
bed4effb84 Add flag to control whether or not delay slots are filled during
instruction scheduling (this is off by default).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 05:55:15 +00:00
Brian Gaeke
41de073b04 Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8523 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 05:28:42 +00:00
Misha Brukman
37f92e2568 Fixed spelling and grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8489 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 22:34:13 +00:00
Chris Lattner
be4063babd Don't build dead directories
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:34:15 +00:00
Chris Lattner
79a4e8e2d6 Remove dead library makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:29:43 +00:00
Chris Lattner
02b81351f9 Remove makefile for dead library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8303 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:26:52 +00:00
Chris Lattner
84681f1184 LiveRange.h is now in lib/CodeGen/RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8299 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:17:13 +00:00
Chris Lattner
893f9541dc LiveRangeInfo got moved into the lib/CodeGen/RegAlloc directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8297 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:12:17 +00:00
Chris Lattner
70b2f56e76 PhyRegAlloc.h got moved to lib/CodeGen/RegAlloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8296 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:09:04 +00:00
Chris Lattner
c083dcccbf Move IGNode from public include directory to here. Minor cleanups like adding std:: namespace qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8295 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:05:47 +00:00
John Criswell
c9afb499f6 Fixed two double free bugs that caused llc to segfault or run forever.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8191 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:43:17 +00:00
Tanya Lattner
3b6b6ba4be Removing README
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8180 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 17:17:59 +00:00
Tanya Lattner
4f839ccf49 Putting my revised version of ModuloScheduling in cvs. This is not complete...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8179 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 17:12:14 +00:00
Tanya Lattner
8dc9982e2e Moved index into BB to common graph class because its needed by ModuloSchedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8174 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 15:30:40 +00:00
Tanya Lattner
d6d863392f Added/removed header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8160 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 15:12:24 +00:00
Tanya Lattner
c50ee556e5 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8153 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-27 02:42:58 +00:00
Tanya Lattner
b6489f3153 First version of SchedGraph common class and refactoring of SchedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8148 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-25 22:42:20 +00:00
Chris Lattner
41822c790f Fix bug: Jello/2003-08-23-RegisterAllocatePhysReg.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8095 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 23:49:42 +00:00
Misha Brukman
ef6a6a69ff The word dependent' has no a'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8030 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:14:26 +00:00
Chris Lattner
e287cfdfd0 Fix spello
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8029 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:05:57 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
128c2aa493 Fix bug: Jello/2003-08-15-AllocaAssertion.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7916 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-17 18:01:15 +00:00
Brian Gaeke
53b99a0fe7 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7906 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 21:19:25 +00:00
Chris Lattner
e3561c23c2 Remove uses of the NonCopyable class, to make the doxygen output look better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7880 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 05:20:06 +00:00
Chris Lattner
79ba7c1aee rename selection directory and library to SelectionDAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7877 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:55:22 +00:00
Chris Lattner
7dc97ff180 Add a bunch of new node types, etc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7875 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:53:16 +00:00
Brian Gaeke
bf3c4cfaad Factory methods for function passes now return type FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:09:32 +00:00
Brian Gaeke
277aad2655 Factory methods for function passes now return type FunctionPass *.
Get rid of RegisterLLC, which can't handle FunctionPasses anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7836 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 06:04:49 +00:00
Brian Gaeke
19df3876e6 Factory methods for FunctionPasses now return type FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7823 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 18:18:15 +00:00
Chris Lattner
7f2438f170 Mapping directory no longer exists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7801 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:37:24 +00:00
Chris Lattner
c09f429499 Obsolete file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7799 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:27:13 +00:00
Vikram S. Adve
feb3298fca For instructions in a delay slot of another instruction,
we no longer need to find the live-before set of the delayed
branch since that set is now included the live-before/after
set of the instructions in each delay slot.  Just assert that instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:22:24 +00:00
Chris Lattner
fa7ed53f32 Build the SelectionDAG library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7718 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:57:48 +00:00
Chris Lattner
78ec311bd5 Initial checkin of SelectionDAG implementation. This is still rough and
unfinished


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7717 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:57:33 +00:00
Vikram S. Adve
2010f7baec Fix assertion in MachineInstr::substituteValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7675 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 15:01:48 +00:00
Chris Lattner
3fd1f5bb6a Use a new local data structure instead of the MachineInstr::regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:11:13 +00:00
Chris Lattner
c393c57afc Add a map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:09:31 +00:00
Chris Lattner
6ae3117582 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 22:03:27 +00:00
Chris Lattner
3bed95b628 Physical registers no longer live in the regsUsed set for each machine instr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:58 +00:00
Chris Lattner
610234d5c9 Do not insert physical regsiters into the regsUsed set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7617 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 21:55:20 +00:00
Chris Lattner
a2dd745613 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 16:58:46 +00:00
Chris Lattner
8c8194500d Fix bugs handling ESP in alloca references
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7591 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 04:13:58 +00:00
Chris Lattner
d9ac6a7d3b Revert previous change, and be really anal about what physical registers can do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7588 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 00:49:09 +00:00
Chris Lattner
27615d7f21 Don't bother calculating info unless its needed. May reduce number of stack slots created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7584 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:42:37 +00:00
Chris Lattner
b8822ad224 * Fix spelling of 'necessary'
* Add a lot more DEBUG output, which is better structured than before
* Fix bug: Jello/2003-08-04-PhysRegLiveFailure.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 23:36:39 +00:00
Chris Lattner
e109de3166 Simplify code, eliminating the need for the X86 isVoid target instr flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7534 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:51:45 +00:00
Chris Lattner
4cc662b0ef Set debug types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7533 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 21:47:31 +00:00
Chris Lattner
925b771dc3 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 20:24:29 +00:00
Chris Lattner
d3fd79f699 Wrap at 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7503 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 13:49:03 +00:00
Chris Lattner
a11136b16c Move DEBUG to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7497 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:21:34 +00:00
Vikram S. Adve
b5161b60c2 All constant-evaluation code now unified into
TargetInstrInfo::ConvertConstantToIntType().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7390 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:50:12 +00:00
Vikram S. Adve
814030a0c5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7389 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:49:21 +00:00
Vikram S. Adve
b403b2c019 Add const version of getLiveRangeForValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7386 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:38:22 +00:00
Vikram S. Adve
102f295114 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:37:41 +00:00
Chris Lattner
8d3f8e226d Making this code const-correct would be a pain, so I'll hack it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7350 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:29:51 +00:00
Chris Lattner
9e2dd8f8d7 Const correctness fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:24:56 +00:00
Chris Lattner
9cdaa63f57 Be const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7348 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:23:41 +00:00
Chris Lattner
e5a61ccdc5 Hrm, another necesary one :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7347 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:22:19 +00:00
Chris Lattner
1d598fa25a Remove #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7342 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:01:04 +00:00
Chris Lattner
bae47e5691 Remove extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:00:29 +00:00
Vikram S. Adve
bc001b24a1 (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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:06:09 +00:00
Vikram S. Adve
34a856749f 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 21:00:13 +00:00
Chris Lattner
c8bf87af3e Remove unnecessary casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:17:51 +00:00
Chris Lattner
9daa8a12d3 Random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:59:40 +00:00
Chris Lattner
1815383276 Remove using decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7246 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 14:55:59 +00:00
Vikram S. Adve
4d2faf6307 Values stored in CallArgsDescriptor cannot be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7156 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:46:15 +00:00
Vikram S. Adve
24d0410db0 isMarkedForSpill() should be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7155 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:45:28 +00:00
Vikram S. Adve
627eb31cd7 Change interface to MachineInstr::substituteValue to specify more precisely
which args can be substituted: defsOnly, defsAndUses or usesOnly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7154 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:45:07 +00:00
Vikram S. Adve
51bda6fccb Print out all neighbors in interference graph, not just higher-numbered ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7153 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:43:33 +00:00
Vikram S. Adve
3bf089227b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7152 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 19:42:55 +00:00
Vikram S. Adve
97539fc4b6 Choose register instead of immediate for ConstantExpr in ChooseRegOrImmed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7112 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-06 20:33:21 +00:00
Vikram S. Adve
65b2f401af Minor beautification: fold a couple of lines of code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:24:00 +00:00
Vikram S. Adve
74d15d36f5 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*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7052 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 01:16:01 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
Chris Lattner
2eb9a257c8 Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:29:09 +00:00
Chris Lattner
0bf9476701 Remove two using decls
Remove usage of alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6725 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:18:28 +00:00
Brian Gaeke
ad95d9ef50 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 21:54:01 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Guochun Shi
0e93687cca add some comments
add a function ModuloScheduling::dumpFinalSchedule() to print out final schedule


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:04:30 +00:00
Guochun Shi
e95b827db2 add an brief instruction what this pass is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6676 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:03:39 +00:00
Guochun Shi
0b970dad72 a simple introduction to this pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6675 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 20:02:16 +00:00
Guochun Shi
f325261856 cleaned code
add some comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6674 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-10 19:09:00 +00:00
Guochun Shi
8f1d4ab409 delete useless functions
add comment


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6673 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-08 23:16:07 +00:00
Guochun Shi
33280524f4 change DEBUG to DEBUG_PRINT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6672 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-08 20:40:47 +00:00
Misha Brukman
6fe6905df2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6662 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-07 02:34:43 +00:00
Chris Lattner
08d2e4e09a Fix bug: Jello/2003-06-04-bzip2-bug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6624 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 17:15:04 +00:00
Misha Brukman
d15cd2752f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6602 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 04:54:06 +00:00
Misha Brukman
d720da23db Pass through the emitConstantPool() call to the real emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6590 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 20:00:49 +00:00
Misha Brukman
c740aae220 Moved code to modify the opcode from 'reg' to 'imm' form to a more logical place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:18:20 +00:00
Misha Brukman
0ee48d24fe Moved FInfo.cpp to lib/Target/Sparc as it is Sparc-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 23:27:09 +00:00
Chris Lattner
78ddcd7b03 Minor cleanups.
This pass should be moved to lib/Target/Sparc since it's sparc specific
It also needs a file comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:57:41 +00:00
Chris Lattner
9efc4d6aaa Remove usage of noncopyable classes to clean up doxygen output.
In particular these classes are the last that link the noncopyable classes
with the hash_map, vector, and list classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:45:07 +00:00
Chris Lattner
747a044550 Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6550 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:05:13 +00:00
Misha Brukman
e6aa9e30b1 Removed a useless ofstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 20:49:09 +00:00
Guochun Shi
099b064a46 compiled with the new SchedGraphCommon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6545 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 17:48:56 +00:00
Misha Brukman
53a7ba851d Remove spurious assert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:10:41 +00:00
Chris Lattner
efc84a4082 Changes to be compatible with MachineCodeEmitter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6515 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:22:11 +00:00
Vikram S. Adve
5cdb12f958 Minor changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6470 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:41:54 +00:00
Vikram S. Adve
f3d3ca18b5 Added MachineCodeForInstruction object as an argument to
TmpInstruction constructors because every TmpInstruction object has
to be registered with a MachineCodeForInstruction to prevent leaks.
This simplifies the user's code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:41:24 +00:00
Vikram S. Adve
3497782f38 Allow explicit physical registers for implicit operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6468 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:39:06 +00:00
Vikram S. Adve
7952d6088e Changes to allow explicit physical register arguments that have been
preallocated.  While reg-to-reg dependences were already handled, this
change required new code for adding edges to/from call instructions.
This was part of the extensive changes to the way code generation occurs
for function call arguments and return values.
See log for CodeGen/PhyRegAlloc.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6467 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:37:05 +00:00
Vikram S. Adve
d0d06ad4f3 Extensive changes to the way code generation occurs for function
call arguments and return values:
Now all copy operations before and after a call are generated during
selection instead of during register allocation.
The values are copied to virtual registers (or to the stack), but
in the former case these operands are marked with the correct physical
registers according to the calling convention.
Although this complicates scheduling and does not work well with
live range analysis, it simplifies the machine-dependent part of
register allocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6465 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 07:32:01 +00:00
Misha Brukman
88ba25444c When converting virtual registers to immediate constants, change the opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6452 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 20:36:27 +00:00
Misha Brukman
da3a8b19ce Added saveBBreferences() for BasicBlock resolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 20:32:45 +00:00
Guochun Shi
139f0c279d so far everything compiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6423 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 00:17:09 +00:00
Misha Brukman
eae77de869 Correctly write out binary data as chars, before they're cast to ints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6385 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-28 18:27:19 +00:00
Misha Brukman
3432d1d1d5 Added a debugging code emitter that prints code to a file, debug to std::cerr,
and passes the real code to a memory-outputting code emitter. This may be
removed at a later point in development.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6379 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:43:19 +00:00
Vikram S. Adve
5f2180c533 (1) Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.

(2) Moved some machine-independent reg-class code to class TargetRegInfo
    from SparcReg{Class,}Info.

(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
    and related functions and flags.  Fixed several bugs where only
    "isDef" was being checked, not "isDefAndUse".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 00:05:23 +00:00
Misha Brukman
6b77ec4156 Cleaned up code layout. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:49:18 +00:00
Misha Brukman
c2312df45c Kill `using' directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 21:24:35 +00:00
Chris Lattner
b52e0241c0 Use a kill, not a dead definition, update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 17:37:30 +00:00
Chris Lattner
572c770668 * Keep LiveVariable information more up-to-date and consistent
* *** Finally mark values that are inputs to PHIs as killed when appropriate.
   This should make the generated code quite a bit better.  For example, the
   local-ra will not have to spill PHI inputs at the end of predecessor BB's
   anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6117 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:28:28 +00:00
Chris Lattner
a13f0d3f41 Fix bug where we could iterate off the end of a basic block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6116 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:26:38 +00:00
Chris Lattner
fb2cb69dc5 * Keep the BBMap around as long as the pass is live
* Change getVarInfo to take real virtual register numbers and offset them
  itself.  This has caused me so much grief, it's not even funny.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6115 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:24:00 +00:00
Chris Lattner
98719d7cdc Fix N^2 algorithm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6112 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 04:08:54 +00:00
Chris Lattner
927ce5dfae * Fix several comments
* Update LiveVar info better, fixing bug: Jello/2003-05-11-PHIRegAllocBug.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6110 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 03:55:21 +00:00
Chris Lattner
d5725631c5 Fix tab infestation!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6109 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 03:54:14 +00:00
Chris Lattner
e0e72177c0 Allow const functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6056 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-09 03:27:41 +00:00
Chris Lattner
fd33fb8726 Add methods for stub function generation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6054 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-08 21:54:18 +00:00
Chris Lattner
5cdfbad72d Add a vector to keep track of which registers are allocatable. Remove FIXMEs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6015 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-07 20:08:36 +00:00
Chris Lattner
dff780f046 Re-add gross hack, it's still necessary. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6012 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:44:54 +00:00
Chris Lattner
82a4d207aa Remove hideously nasty hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6011 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-06 21:32:39 +00:00
Misha Brukman
15b55e20cc Debug output should go to cerr, not cout, because that's where bytecode goes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-04 22:51:30 +00:00
Chris Lattner
b589bf7d77 Fix a bug which occurred with empty basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5982 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 18:44:42 +00:00
Chris Lattner
f98358efc7 Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5976 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-01 21:18:47 +00:00
Chris Lattner
2ee82e05e3 Remove unneccesary &*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5871 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:36:11 +00:00
Misha Brukman
63e04f3ccb Just some code beautification changes I had sitting around in my tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5859 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 23:00:08 +00:00
Misha Brukman
2c821cc06e Fixed compilation errors, command-line argument declarations, cleaned up code to
look nicer and removed useless stuff.

Also renamed a few variables, moved them into namespaces, converted outputting
to a file into a print to std::cerr with a DEBUG() guard, as all passes should
do anyway.

No functional changes have been made. However, this code now compiles.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-10 19:19:23 +00:00
Misha Brukman
8baa01c1d7 Made the code readable:
* Lines must be wrapped at 80 chars. This is a hard limit.
* Consistent style on functions, braces, if, for, etc. Code must be readable.

No functional changes have been made, even though I added a new typedef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-09 21:51:34 +00:00
Guochun Shi
6fbe5fbce1 change the include file names and some class names to make it compile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5764 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-06 23:56:19 +00:00
Guochun Shi
f1c154f5e6 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5755 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-27 17:57:44 +00:00
Chris Lattner
9085d8a9a9 Print machine frame objects with the frame offset intrinsic to the machine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 18:35:57 +00:00
Chris Lattner
0416d2a70a Fix problems with empty basic blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5326 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 18:06:43 +00:00
Chris Lattner
f85249ca73 Arg, fix bugs in previous checkin...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5322 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 02:24:20 +00:00
Chris Lattner
78d6db5627 Add assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-16 02:22:08 +00:00
Chris Lattner
4ac7d7302b * Insert prolog/epilog code before rewriting indexes
* Fix calculation of frame offsets when there is an offset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5318 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 22:52:34 +00:00
Chris Lattner
795ba6cabd Move sparc specific code into the Sparc backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5317 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:36:50 +00:00
Chris Lattner
9d4ed15c9e Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:14:01 +00:00
Chris Lattner
af3cdcf9b0 Move headers around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:02:16 +00:00
Chris Lattner
4cfd622252 Header is moved into local directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5311 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 21:00:02 +00:00
Chris Lattner
c7c7b7ab75 Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 20:32:15 +00:00
Chris Lattner
c520feb6f0 Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5309 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 20:28:36 +00:00
Chris Lattner
4309e736c1 #include RegClass.h explicitly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:57:07 +00:00
Chris Lattner
abb9c08a05 Remvoe dependency on RegClass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:56:21 +00:00
Chris Lattner
a9b19b9002 Prune #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5303 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:48:13 +00:00
Chris Lattner
0412077faf Minor changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:47:53 +00:00
Chris Lattner
b66fdc2934 Remove obsolete ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5301 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:47:02 +00:00
Chris Lattner
1531b63421 Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 19:22:38 +00:00
Chris Lattner
f6ee49fcf0 Use buildmi not MI ctor directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5293 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-15 18:08:07 +00:00
Chris Lattner
92ba2aaa58 Rename llvm/Analysis/LiveVar/FunctionLiveVarInfo.h -> llvm/CodeGen/FunctionLiveVarInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 23:05:08 +00:00
Chris Lattner
8143d8f91a Move llvm/Analysis/LiveVar/ValueSet.h to CodeGen/ValueSet.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5282 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:56:37 +00:00
Chris Lattner
3501feab81 Rename MachineInstrInfo -> TargetInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:00:31 +00:00
Chris Lattner
bc40e898e1 New files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 20:01:16 +00:00
Chris Lattner
80a0478bbb * Use the PHI Elimination pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5220 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:26:08 +00:00
Chris Lattner
91a452b382 * Convert to use LiveVariable analysis
* Convert to use PHIElimination pass
* Don't spill values which have just been reloaded (big win reducing spills)
* Add experimental support for eliminating spills before TwoAddress
  instructions.  It currently is broken so it is #ifdef'd out.
* Use new "is terminator" flag on instructions instead of looking for
  branches and returns explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5219 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:25:40 +00:00
Chris Lattner
f00a3f905e Convert to MachineFunctionPass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5218 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:23:41 +00:00
Chris Lattner
8d95ef4973 Add support for 3 new forms of MachineOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5217 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:23:24 +00:00
Chris Lattner
4d149cdae1 Add support for constant pool
Add helper methods for MachineFrameInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5216 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:23:03 +00:00
Chris Lattner
7775df1a6c Add support for global address by string and constant pool values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5215 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-13 00:22:37 +00:00
Chris Lattner
d0f166a486 More renamings of Target/Machine*Info to Target/Target*Info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5204 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-29 03:13:05 +00:00
Chris Lattner
f27eeea54f Rename MachineOptInfo to TargetoptInfo
Rename MachineCacheInfo to TargetCacheInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-29 02:50:35 +00:00
Chris Lattner
eb24db9727 Rename FunctionFrameInfo to MachineFrameInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5200 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-28 21:08:26 +00:00