Commit Graph

72 Commits

Author SHA1 Message Date
Jim Laskey 29e635d3c9 Final polish on machine pass registries.
llvm-svn: 29471
2006-08-02 12:30:23 +00:00
Jim Laskey 95eda5b1f3 Introducing plugable register allocators and instruction schedulers.
llvm-svn: 29434
2006-08-01 14:21:23 +00:00
Jim Laskey 4b49c23571 Eliminate data relocations by using NULL instead of global empty list.
llvm-svn: 29250
2006-07-21 21:15:20 +00:00
Andrew Lenharth c496b418b5 Reduce number of exported symbols
llvm-svn: 29220
2006-07-20 17:28:38 +00:00
Chris Lattner e097e6f7c7 Shave another 27K off libllvmgcc.dylib with visibility hidden
llvm-svn: 28973
2006-06-28 22:17:39 +00:00
Chris Lattner 10d6341618 Move some methods out of MachineInstr into MachineOperand
llvm-svn: 28102
2006-05-04 17:52:23 +00:00
Chris Lattner de02d7727f Add explicit #includes of <iostream>
llvm-svn: 25515
2006-01-22 23:41:00 +00:00
Chris Lattner 5a6199f387 Change this code ot pass register classes into the stack slot spiller/reloader
code.  PrologEpilogInserter hasn't been updated yet though, so targets cannot
use this info.

llvm-svn: 23536
2005-09-30 01:29:00 +00:00
Misha Brukman 774511633d Convert tabs to spaces
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman 835702a094 Remove trailing whitespace
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Chris Lattner 3d527f7b61 Update physregsused info.
llvm-svn: 19793
2005-01-23 22:55:45 +00:00
Reid Spencer 7c16caa336 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +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
Brian Gaeke 902dcf0729 These files don't need to include <iostream> since they include "Support/Debug.h".
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Tanya Lattner 23dbc8170c Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function.
llvm-svn: 14389
2004-06-25 00:13:11 +00:00
Chris Lattner 2150542af9 Adjust to new TargetMachine interface
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Chris Lattner e0b49952f6 Fix PR294
llvm-svn: 12425
2004-03-16 01:45:55 +00:00
Alkis Evlogimenos c31ff795d5 Simplify iterator usage now that we have next(). Also don't pass iterators by reference now that MachineInstr* are in an ilist
llvm-svn: 11732
2004-02-23 04:12:30 +00:00
Alkis Evlogimenos d0a60b71fc Rename reloads/spills to loads/stores.
llvm-svn: 11619
2004-02-19 06:19:09 +00:00
Chris Lattner a8d97e4e74 Finegrainify namespacification
Remove one of the operands of a two operand instruction

llvm-svn: 11478
2004-02-15 21:38:28 +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
Alkis Evlogimenos 8cdd0215bf Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +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
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
Misha Brukman 7eb05a170a Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Brian Gaeke 89207943a1 Factory methods for FunctionPasses now return type FunctionPass *.
llvm-svn: 7823
2003-08-13 18:18:15 +00:00
Chris Lattner 74e4e9b44f Set debug types
llvm-svn: 7533
2003-08-03 21:47:31 +00:00
Chris Lattner 1007f033d4 Move DEBUG to Debug.h
llvm-svn: 7497
2003-08-01 22:21:34 +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 b4d58d7f9e Rename MachineInstrInfo -> TargetInstrInfo
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner cbedb8b400 * Use the PHI Elimination pass
llvm-svn: 5220
2003-01-13 00:26:08 +00:00
Chris Lattner ca4362fee7 Rename FunctionFrameInfo to MachineFrameInfo
llvm-svn: 5200
2002-12-28 21:08:26 +00:00
Chris Lattner bf9d12ac8b * Convert to be a MachineFunctionPass instance
* Use new FunctionFrameInfo object to manage stack slots instead of doing
  it directly
* Adjust to new MRegisterInfo API
* Don't take a TM as a ctor argument
* Don't keep track of which callee saved registers are modified
* Don't emit prolog/epilog code or spill/restore code for callee saved regs
* Use new allocation_order_begin/end iterators to simplify dramatically the
  logic for picking registers to allocate
* Machine PHI nodes can no longer contain constant arguments

* Use a bitvector to keep track of registers used instead of a set
* Fix problem where explicitly referenced registers would be added to
  regsused set and never removed

llvm-svn: 5196
2002-12-28 20:42:14 +00:00
Chris Lattner ee73450749 Adjustments to work with the simpler spill interface
llvm-svn: 5144
2002-12-25 05:04:20 +00:00
Chris Lattner 095eac8109 Fix compilation on GCC 2.96
llvm-svn: 5113
2002-12-23 23:44:04 +00:00
Chris Lattner dc451c6d27 Implicit defs/uses list may be empty.
llvm-svn: 5103
2002-12-18 01:11:14 +00:00
Chris Lattner ac5f3b3ed3 Use new reginfo interface
llvm-svn: 5099
2002-12-17 04:19:40 +00:00
Chris Lattner 1d84f0a461 Keep the stack frame aligned.
llvm-svn: 5081
2002-12-16 17:42:40 +00:00
Chris Lattner c63d63a7c7 Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator.
Remvoe some dead code

llvm-svn: 5070
2002-12-16 14:37:00 +00:00
Chris Lattner bc1e6700eb Some simpliciations to the spill/reload interface
llvm-svn: 5067
2002-12-15 23:01:26 +00:00
Chris Lattner 4e560ee65b Simplify PHI node elimination significantly by doing it as a prepass to
register allocation

llvm-svn: 5066
2002-12-15 22:39:53 +00:00
Chris Lattner 292083aaf5 Variety of small or trivial simplifications to the code, completely eliminated
the dependence on PhysRegClassMap

llvm-svn: 5064
2002-12-15 22:19:19 +00:00
Chris Lattner 2af545d034 Remove unused savePhysRegToStack method
llvm-svn: 5061
2002-12-15 21:33:51 +00:00
Chris Lattner ed594b6b20 Localize a map, remove another
llvm-svn: 5060
2002-12-15 21:24:30 +00:00
Chris Lattner 1499e5a92c Give simple reg allocator a nice Pass Name
llvm-svn: 5058
2002-12-15 21:13:12 +00:00