summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Some platforms use the same name for 32-bit and 64-bit registers (likeBill Wendling2008-02-241-4/+4
| | | | | | | | | %r3 on PPC) in their ASM files. However, it's hard for humans to read during debugging. Adding a new field to the register data that lets you specify a different name to be printed than the one that goes into the ASM file -- %x3 instead of %r3, for instance. llvm-svn: 47534
* Support a new type of MachineOperand, MO_FPImmediate, used for holdingNate Begeman2008-02-141-0/+10
| | | | | | FP Immediates, crazily enough llvm-svn: 47117
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-10/+10
| | | | llvm-svn: 46930
* Also print alignment.Evan Cheng2008-02-081-1/+1
| | | | llvm-svn: 46895
* Don't abort if a MemOperand is missing a SourceValue; just print itDan Gohman2008-02-071-9/+13
| | | | | | | as <unknown>. And make some minor adjustments to the MemOperand dump format. llvm-svn: 46853
* Re-apply the memory operand changes, with a fix for the staticDan Gohman2008-02-061-0/+31
| | | | | | | | initializer problem, a minor tweak to the way the DAGISelEmitter finds load/store nodes, and a renaming of the new PseudoSourceValue objects. llvm-svn: 46827
* Revert 46556 and 46585. Dan please fix the PseudoSourceValue problem and ↵Evan Cheng2008-01-311-31/+0
| | | | | | re-commit. llvm-svn: 46623
* Add an extra operand to LABEL nodes which distinguishes between debug, EH, ↵Evan Cheng2008-01-311-0/+7
| | | | | | or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution. llvm-svn: 46609
* Create a new class, MemOperand, for describing memory referencesDan Gohman2008-01-311-0/+31
| | | | | | | | | | | | | | | | in the backend. Introduce a new SDNode type, MemOperandSDNode, for holding a MemOperand in the SelectionDAG IR, and add a MemOperand list to MachineInstr, and code to manage them. Remove the offset field from SrcValueSDNode; uses of SrcValueSDNode that were using it are all all using MemOperandSDNode now. Also, begin updating some getLoad and getStore calls to use the PseudoSourceValue objects. Most of this was written by Florian Brander, some reorganization and updating to TOT by me. llvm-svn: 46585
* Move some functionality for adding flags to MachineInstr's into methods on ↵Owen Anderson2008-01-241-0/+90
| | | | | | MachineInstr rather than LiveVariables. llvm-svn: 46295
* remove #includageChris Lattner2008-01-071-1/+1
| | | | llvm-svn: 45697
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-13/+13
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* rename hasVariableOperands() -> isVariadic(). Add some comments.Chris Lattner2008-01-071-3/+2
| | | | | | | Evan, please review the comments I added to getNumDefs to make sure that they are accurate, thx. llvm-svn: 45687
* Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptorChris Lattner2008-01-071-12/+12
| | | | llvm-svn: 45680
* Add predicates methods to TargetOperandInfo, and switch all clients Chris Lattner2008-01-071-2/+2
| | | | | | | over to using them, instead of diddling Flags directly. Change the various flags from const variables to enums. llvm-svn: 45677
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-7/+7
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* Make MachineRegisterInfo::getVRegDef more efficient by aiming the keep the ↵Chris Lattner2008-01-011-4/+10
| | | | | | def of the vreg at the start of the list, so the list doesn't need to be traversed. llvm-svn: 45483
* switch the register iterator to act more like hte LLVM value iterator: ↵Chris Lattner2008-01-011-1/+1
| | | | | | | | | | | dereferencing it now returns the machineinstr of the use. To get the operand, use I.getOperand(). Add a new MachineRegisterInfo::replaceRegWith, which is basically like Value::replaceAllUsesWith. llvm-svn: 45482
* Implement automatically updated def/use lists for all MachineInstr register Chris Lattner2008-01-011-3/+249
| | | | | | | operands. The lists are currently kept in MachineRegisterInfo, but it does not yet provide an iterator interface to them. llvm-svn: 45477
* properly encapsulate the parent field of MBB and MI with get/set accessors.Chris Lattner2007-12-311-6/+6
| | | | llvm-svn: 45469
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-311-0/+1
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-9/+8
| | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
* More cleanups for MachineOperand:Chris Lattner2007-12-301-110/+114
| | | | | | | | | | - Eliminate the static "print" method for operands, moving it into MachineOperand::print. - Change various set* methods for register flags to take a bool for the value to set it to. Remove unset* methods. - Group methods more logically by operand flavor in MachineOperand.h llvm-svn: 45461
* MachineOperand:Chris Lattner2007-12-301-57/+38
| | | | | | | | | | | | | | | | | - Add getParent() accessors. - Move SubReg out of the AuxInfo union, to make way for future changes. - Remove the getImmedValue/setImmedValue methods. - in some MachineOperand::Create* methods, stop initializing fields that are dead. MachineInstr: - Delete one copy of the MachineInstr printing code, now there is only one dump format and one copy of the code. - Make MachineOperand use the parent field to get info about preg register names if no target info is otherwise available. - Move def/use/kill/dead flag printing to the machineoperand printer, so they are always printed for an operand. llvm-svn: 45460
* simpilfy some register printing code.Chris Lattner2007-12-301-16/+6
| | | | llvm-svn: 45458
* eliminate a copy of the machineoperand printing stuff. Keep the copy thatChris Lattner2007-12-301-34/+4
| | | | | | knows how to print offsets. llvm-svn: 45457
* Simplify and clean up some machine operand/instr printing/dumping stuff.Chris Lattner2007-12-301-9/+9
| | | | llvm-svn: 45456
* two register machineoperands are not identical unless their subregs match.Chris Lattner2007-12-301-1/+2
| | | | llvm-svn: 45455
* MachineOperand::getImmedValue -> MachineOperand::getImmChris Lattner2007-12-301-2/+2
| | | | llvm-svn: 45454
* make machine operands fatter: give each one an up-pointer to the Chris Lattner2007-12-301-1/+7
| | | | | | machineinstr that owns it. llvm-svn: 45449
* Start using the simplified methods for adding operands.Chris Lattner2007-12-301-8/+3
| | | | llvm-svn: 45432
* simplify some code by factoring operand construction better.Chris Lattner2007-12-301-22/+4
| | | | llvm-svn: 45428
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Clean up sub-register implementation by moving subReg information back toEvan Cheng2007-11-141-0/+2
| | | | | | | | | | | MachineOperand auxInfo. Previous clunky implementation uses an external map to track sub-register uses. That works because register allocator uses a new virtual register for each spilled use. With interval splitting (coming soon), we may have multiple uses of the same register some of which are of using different sub-registers from others. It's too fragile to constantly update the information. llvm-svn: 44104
* Optionally create a MachineInstr without default implicit operands.Evan Cheng2007-10-131-4/+5
| | | | llvm-svn: 42945
* EXTRACT_SUBREG coalescing support. The coalescer now treats EXTRACT_SUBREG likeEvan Cheng2007-10-121-0/+18
| | | | | | | | | (almost) a register copy. However, it always coalesced to the register of the RHS (the super-register). All uses of the result of a EXTRACT_SUBREG are sub- register uses which adds subtle complications to load folding, spiller rewrite, etc. llvm-svn: 42899
* Remove isReg, isImm, and isMBB, and change all their users to use Dan Gohman2007-09-141-7/+7
| | | | | | | isRegister, isImmediate, and isMachineBasicBlock, which are equivalent, and more popular. llvm-svn: 41958
* Remove spurious consts. This fixes warnings with compilers thatDan Gohman2007-09-141-1/+1
| | | | | | are strict about such things. llvm-svn: 41956
* Remove subreg index from MachineInstr's and also keep vregs as unsigned when ↵Christopher Lamb2007-07-261-2/+0
| | | | | | adding operands. llvm-svn: 40514
* MachineInstr::isPredicable() is no longer needed.Evan Cheng2007-06-151-4/+0
| | | | llvm-svn: 37599
* Add missing const qualifiers.Evan Cheng2007-05-291-7/+8
| | | | llvm-svn: 37341
* Rename M_PREDICATED to M_PREDICABLE; Moved isPredicable() to MachineInstr.Evan Cheng2007-05-161-2/+6
| | | | llvm-svn: 37121
* Added getNumExplicitOperands and findFirstPredOperand.Evan Cheng2007-05-151-0/+46
| | | | llvm-svn: 37064
* llvm bug #1350, parts 1, 2, and 3.Nate Begeman2007-05-011-2/+2
| | | | llvm-svn: 36618
* Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.Evan Cheng2007-04-261-2/+2
| | | | llvm-svn: 36483
* Change findRegisterUseOperand() to return operand index instead.Evan Cheng2007-03-261-4/+4
| | | | llvm-svn: 35363
* Use findRegisterUseOperand to find a kill of particular register.Evan Cheng2007-02-231-3/+5
| | | | llvm-svn: 34512
* Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.Evan Cheng2007-02-191-0/+11
| | | | llvm-svn: 34428
* For PR1207:Reid Spencer2007-02-191-11/+0
| | | | | | | Revert patches that caused the problem. Evan, please investigate and reapply when you've discovered the problem. llvm-svn: 34399
* Added findRegisterDefOperand().Evan Cheng2007-02-171-0/+11
| | | | llvm-svn: 34380
OpenPOWER on IntegriCloud