aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/RegAllocSimple.cpp
Commit message (Collapse)AuthorAgeFilesLines
* RenameEvan Cheng2006-11-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31364 91177308-0d34-0410-b5e6-96231b3b80d8
* Two-address instructions no longer have to be A := A op C. Now any pair of ↵Evan Cheng2006-11-011-7/+10
| | | | | | dest / src operands can be tied together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31363 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a long-standing wart in the code generator: two-address instruction loweringChris Lattner2006-09-051-5/+1
| | | | | | | | | | | | | | | | actually *removes* one of the operands, instead of just assigning both operands the same register. This make reasoning about instructions unnecessarily complex, because you need to know if you are before or after register allocation to match up operand #'s with the target description file. Changing this also gets rid of a bunch of hacky code in various places. This patch also includes changes to fold loads into cmp/test instructions in the X86 backend, along with a significant simplification to the X86 spill folding code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30108 91177308-0d34-0410-b5e6-96231b3b80d8
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
* Final polish on machine pass registries.Jim Laskey2006-08-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29471 91177308-0d34-0410-b5e6-96231b3b80d8
* Introducing plugable register allocators and instruction schedulers.Jim Laskey2006-08-011-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29434 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate data relocations by using NULL instead of global empty list.Jim Laskey2006-07-211-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29250 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce number of exported symbolsAndrew Lenharth2006-07-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29220 91177308-0d34-0410-b5e6-96231b3b80d8
* Shave another 27K off libllvmgcc.dylib with visibility hiddenChris Lattner2006-06-281-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28973 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some methods out of MachineInstr into MachineOperandChris Lattner2006-05-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28102 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit #includes of <iostream>Chris Lattner2006-01-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25515 91177308-0d34-0410-b5e6-96231b3b80d8
* Change this code ot pass register classes into the stack slot spiller/reloaderChris Lattner2005-09-301-2/+2
| | | | | | | | code. PrologEpilogInserter hasn't been updated yet though, so targets cannot use this info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23536 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spacesMisha Brukman2005-04-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21439 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 91177308-0d34-0410-b5e6-96231b3b80d8
* Update physregsused info.Chris Lattner2005-01-231-10/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19793 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-011-3/+3
| | | | | | | | | 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/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop using CreateStackObject(RegClass*)Chris Lattner2004-08-151-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15775 91177308-0d34-0410-b5e6-96231b3b80d8
* These methods no longer take a TargetRegisterClass* operand.Chris Lattner2004-08-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15774 91177308-0d34-0410-b5e6-96231b3b80d8
* These files don't need to include <iostream> since they include ↵Brian Gaeke2004-07-211-1/+0
| | | | | | "Support/Debug.h". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15089 91177308-0d34-0410-b5e6-96231b3b80d8
* Made a fix so that you can print out MachineInstrs that belong to a ↵Tanya Lattner2004-06-251-1/+1
| | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14389 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to new TargetMachine interfaceChris Lattner2004-06-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13956 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR294Chris Lattner2004-03-161-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12425 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify iterator usage now that we have next(). Also don't pass iterators ↵Alkis Evlogimenos2004-02-231-11/+7
| | | | | | by reference now that MachineInstr* are in an ilist git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11732 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename reloads/spills to loads/stores.Alkis Evlogimenos2004-02-191-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11619 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-02-151-8/+12
| | | | | | | Remove one of the operands of a two operand instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11478 91177308-0d34-0410-b5e6-96231b3b80d8
* Make dense maps keyed on physical registers smallerusingAlkis Evlogimenos2004-02-151-1/+1
| | | | | | | | | | | MRegisterInfo::getNumRegs() instead of MRegisterInfo::FirstVirtualRegister. Also use MRegisterInfo::is{Physical,Virtual}Register where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11477 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove getAllocatedRegNum(). Use getReg() instead.Alkis Evlogimenos2004-02-131-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11393 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-7/+5
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use MachineOperand::isVirtualRegister either!Chris Lattner2004-02-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11283 91177308-0d34-0410-b5e6-96231b3b80d8
* Change interface of MachineOperand as follows:Alkis Evlogimenos2003-12-141-2/+2
| | | | | | | | | | | | | | | | 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
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefsAlkis Evlogimenos2003-10-081-6/+6
| | | | | | | | | | | | | | | | | | | | | | 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
* Spell `necessary' correctly.Misha Brukman2003-08-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
* Factory methods for FunctionPasses now return type FunctionPass *.Brian Gaeke2003-08-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7823 91177308-0d34-0410-b5e6-96231b3b80d8
* Set debug typesChris Lattner2003-08-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7533 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DEBUG to Debug.hChris Lattner2003-08-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7497 91177308-0d34-0410-b5e6-96231b3b80d8
* (1) Added special register class containing (for now) %fsr.Vikram S. Adve2003-05-271-1/+1
| | | | | | | | | | | | | | 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
* Rename MachineInstrInfo -> TargetInstrInfoChris Lattner2003-01-141-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5272 91177308-0d34-0410-b5e6-96231b3b80d8
* * Use the PHI Elimination passChris Lattner2003-01-131-80/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5220 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename FunctionFrameInfo to MachineFrameInfoChris Lattner2002-12-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5200 91177308-0d34-0410-b5e6-96231b3b80d8
* * Convert to be a MachineFunctionPass instanceChris Lattner2002-12-281-174/+67
| | | | | | | | | | | | | | | | | | | * 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5196 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjustments to work with the simpler spill interfaceChris Lattner2002-12-251-22/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5144 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compilation on GCC 2.96Chris Lattner2002-12-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5113 91177308-0d34-0410-b5e6-96231b3b80d8
* Implicit defs/uses list may be empty.Chris Lattner2002-12-181-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5103 91177308-0d34-0410-b5e6-96231b3b80d8
* Use new reginfo interfaceChris Lattner2002-12-171-3/+59
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5099 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep the stack frame aligned.Chris Lattner2002-12-161-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5081 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename createSimpleX86RegisterAllocator to createSimpleRegisterAllocator.Chris Lattner2002-12-161-28/+2
| | | | | | | Remvoe some dead code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5070 91177308-0d34-0410-b5e6-96231b3b80d8
* Some simpliciations to the spill/reload interfaceChris Lattner2002-12-151-25/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5067 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify PHI node elimination significantly by doing it as a prepass toChris Lattner2002-12-151-30/+13
| | | | | | | register allocation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5066 91177308-0d34-0410-b5e6-96231b3b80d8