Commit Graph

41 Commits

Author SHA1 Message Date
Chris Lattner fb5614506e Simplify/speedup the PEI by not having to scan for uses of the callee saved
registers.  This information is computed directly by the register allocator
now.

llvm-svn: 19795
2005-01-23 23:13:12 +00:00
Chris Lattner ef2de322c6 Speed this up a bit by making ModifiedRegs a vector<char> not vector<bool>
llvm-svn: 19787
2005-01-23 21:45:01 +00:00
Chris Lattner 52c97fbea9 Implicitly defined registers can clobber callee saved registers too!
This fixes the return-address-not-being-saved problem in the Alpha backend.

llvm-svn: 19741
2005-01-22 00:49:16 +00:00
Chris Lattner f840289291 Add an assertion that would have made more sense to duraid
llvm-svn: 19704
2005-01-19 21:32:07 +00:00
Nate Begeman c9dec3ae70 Put this change back in after testing from Reid proved its innocence. getSpillSize now returns value in bits
llvm-svn: 16102
2004-08-29 22:00:24 +00:00
Nate Begeman c561fc3731 Back out change to divide getSpillSize by 8 until I figure out why it breaks x86, which has register sizes in bits.
llvm-svn: 16073
2004-08-27 16:48:24 +00:00
Nate Begeman fa2bf42539 Register sizes are in bits, not bytes
llvm-svn: 16070
2004-08-27 04:28:10 +00:00
Chris Lattner 36ba4bb042 Register info alignment is in bits, frame object alignment is (currently) in
bytes.

llvm-svn: 15970
2004-08-21 20:04:59 +00:00
Chris Lattner f76ccd43b8 Now that we have per-register spill size/alignment info, remove more uses
of getRegClass

llvm-svn: 15967
2004-08-21 19:45:10 +00:00
Chris Lattner c66f27fd29 Stop using CreateStackObject(RegClass*)
llvm-svn: 15775
2004-08-15 22:02:22 +00:00
Chris Lattner 98de1d7795 These methods no longer take a TargetRegisterClass* operand.
llvm-svn: 15774
2004-08-15 21:56:44 +00:00
Alkis Evlogimenos 4922e2e8ef Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed).

llvm-svn: 15766
2004-08-15 09:18:55 +00:00
Nate Begeman 386d940f5c Elminiate MachineFunction& argument from eliminateFrameIndex
llvm-svn: 15736
2004-08-14 22:00:10 +00:00
Chris Lattner 8885c4e2a5 Split saveCallerSavedRegisters into two methods for clarity, and add comments.
Add support for targets that must spill certain physregs at certain locations.

Patch contributed by Nate Begeman, slightly hacked by me.

llvm-svn: 15701
2004-08-12 19:01:14 +00:00
Chris Lattner 57cafee576 Ok get rid of the REST of the tabs
llvm-svn: 15564
2004-08-07 07:18:41 +00:00
Chris Lattner 0ee8279979 Death to tabs
llvm-svn: 15563
2004-08-07 07:07:57 +00:00
Chris Lattner 5888b5d4b1 Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions
on X86.

llvm-svn: 14152
2004-06-11 06:37:11 +00:00
Chris Lattner 175532bb1e Fix the prolog epilog code inserter to match the documentation and support
targets whose stack grows up.

Patch contributed by Vladimir Prus

llvm-svn: 14111
2004-06-10 06:23:35 +00:00
Chris Lattner 2150542af9 Adjust to new TargetMachine interface
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Alkis Evlogimenos bbf53937a4 Make dense maps keyed on physical registers smallerusing
MRegisterInfo::getNumRegs() instead of
MRegisterInfo::FirstVirtualRegister.

Also use MRegisterInfo::is{Physical,Virtual}Register where
appropriate.

llvm-svn: 11477
2004-02-15 21:37:17 +00:00
Chris Lattner 1dfa97034d Allow for fixed objects to reside in the local area, and if they don't to not
clobber them by allocating other objects in the same space!

llvm-svn: 11454
2004-02-15 00:14:20 +00:00
Chris Lattner 612ce0c47c There is no reason to align the stack pointer if there are no callees of this function!
llvm-svn: 11449
2004-02-14 20:10:59 +00:00
Alkis Evlogimenos 80da865f77 Change MachineBasicBlock's vector of MachineInstr pointers into an
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.

llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Chris Lattner 5dd5be3ec3 Do not use MachineOperand::isVirtualRegister either!
llvm-svn: 11283
2004-02-10 21:12:22 +00:00
Chris Lattner 373fba5c1d Eliminate users of MachineOperand::isPhysicalRegister
llvm-svn: 11278
2004-02-10 20:41:10 +00:00
Alkis Evlogimenos aaba4639f8 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.

llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell 482202a601 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Alkis Evlogimenos 5f1f337d95 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
}

llvm-svn: 8960
2003-10-08 05:20:08 +00:00
Brian Gaeke 89207943a1 Factory methods for FunctionPasses now return type FunctionPass *.
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Vikram S. Adve 7366fa1aa6 (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".

llvm-svn: 6341
2003-05-27 00:05:23 +00:00
Chris Lattner f22d1f5912 Fix a bug which occurred with empty basic blocks
llvm-svn: 5982
2003-05-02 18:44:42 +00:00
Chris Lattner 176866caed Fix problems with empty basic blocks
llvm-svn: 5326
2003-01-16 18:06:43 +00:00
Chris Lattner c52c791806 Arg, fix bugs in previous checkin...
llvm-svn: 5322
2003-01-16 02:24:20 +00:00
Chris Lattner 910ee768d0 Add assertion
llvm-svn: 5321
2003-01-16 02:22:08 +00:00
Chris Lattner 86ee825bce * Insert prolog/epilog code before rewriting indexes
* Fix calculation of frame offsets when there is an offset.

llvm-svn: 5318
2003-01-15 22:52:34 +00:00
Chris Lattner b4d58d7f9e Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner 8d2a07ab2f Convert to MachineFunctionPass
llvm-svn: 5218
2003-01-13 00:23:41 +00:00
Chris Lattner ca4362fee7 Rename FunctionFrameInfo to MachineFrameInfo
llvm-svn: 5200
2002-12-28 21:08:26 +00:00
Chris Lattner 871e591e34 Rename MachineFrameInfo to TargetFrameInfo.h
llvm-svn: 5199
2002-12-28 21:00:25 +00:00
Chris Lattner c8b36e6362 Initial checkin of Prolog/Epilog code inserter, which is an important part
of the abstract frame representation

llvm-svn: 5198
2002-12-28 20:43:30 +00:00