summaryrefslogtreecommitdiff
path: root/lib/Target/TargetInstrInfo.cpp
Commit message (Collapse)AuthorAge
* rename TAI -> MAI, being careful not to make MAILJMP instructions :)Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79777 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetAsmInfo (and its subclasses) to MCAsmInfo.Chris Lattner2009-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79763 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the getInlineAsmLength virtual method from TAI to TII, whereChris Lattner2009-08-02
| | | | | | | | | | | the only real caller (GetFunctionSizeInBytes) uses it. The custom ARM implementation of this is basically reimplementing an assembler poorly for negligible gain. It should be removed IMNSHO, but I'll leave that to ARMish folks to decide. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77877 91177308-0d34-0410-b5e6-96231b3b80d8
* move a virtual method body to its .cpp file to avoid a #include Chris Lattner2009-08-02
| | | | | | | in a header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77874 91177308-0d34-0410-b5e6-96231b3b80d8
* inline the global 'getInstrOperandRegClass' function into its callersChris Lattner2009-07-29
| | | | | | | now that TargetOperandInfo does the heavy lifting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77508 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Introduce a new TargetOperandInfo::getRegClass() helper methodChris Lattner2009-07-29
| | | | | | | | | | | | | | | and convert code to using it, instead of having lots of things poke the isLookupPtrRegClass() method directly. 2. Make PointerLikeRegClass contain a 'kind' int, and store it in the existing regclass field of TargetOperandInfo when the isLookupPtrRegClass() predicate is set. Make getRegClass pass this into TargetRegisterInfo::getPointerRegClass(), allowing targets to have multiple ptr_rc things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77504 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getInstrOperandRegClass from the scheduler to TargetInstrInfo.Evan Cheng2009-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70950 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr3954. The register scavenger asserts for inline assembly withBob Wilson2009-04-09
| | | | | | | | | | | | | register destinations that are tied to source operands. The TargetInstrDescr::findTiedToSrcOperand method silently fails for inline assembly. The existing MachineInstr::isRegReDefinedByTwoAddr was very close to doing what is needed, so this revision makes a few changes to that method and also renames it to isRegTiedToUseOperand (for consistency with the very similar isRegTiedToDefOperand and because it handles both two-address instructions and inline assembly with tied registers). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68714 91177308-0d34-0410-b5e6-96231b3b80d8
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-07
| | | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45695 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptorChris Lattner2008-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45680 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-07
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45674 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a problem where lib/Target/TargetInstrInfo.h would include and useChris Lattner2008-01-01
| | | | | | | | | | | a header file from libcodegen. This violates a layering order: codegen depends on target, not the other way around. The fix to this is to split TII into two classes, TII and TargetInstrInfoImpl, which defines stuff that depends on libcodegen. It is defined in libcodegen, where the base is not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45475 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-30
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45464 91177308-0d34-0410-b5e6-96231b3b80d8
* More cleanups for MachineOperand:Chris Lattner2007-12-30
| | | | | | | | | | | - 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45461 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MachineOperand::getImm instead of MachineOperand::getImmedValue. ↵Chris Lattner2007-12-30
| | | | | | Likewise setImmedValue -> setImm git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45453 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove isReg, isImm, and isMBB, and change all their users to use Dan Gohman2007-09-14
| | | | | | | | isRegister, isImmediate, and isMachineBasicBlock, which are equivalent, and more popular. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41958 91177308-0d34-0410-b5e6-96231b3b80d8
* isUnpredicatedTerminator should treat conditional branches as unpredicated ↵Evan Cheng2007-07-06
| | | | | | terminator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37960 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not check isPredicated() on non-predicable instructions.Evan Cheng2007-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37891 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a utility routine to check for unpredicated terminator instruction.Evan Cheng2007-06-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37528 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing const qualifiers.Evan Cheng2007-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37341 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename a parameter.Evan Cheng2007-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37307 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove. Not needed.Evan Cheng2007-05-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37139 91177308-0d34-0410-b5e6-96231b3b80d8
* Default implementation of TargetInstrInfo::getBlockSize().Evan Cheng2007-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37138 91177308-0d34-0410-b5e6-96231b3b80d8
* PredicateInstruction returns true if the operation was successful.Evan Cheng2007-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37124 91177308-0d34-0410-b5e6-96231b3b80d8
* Add default implementation of PredicateInstruction().Evan Cheng2007-05-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37123 91177308-0d34-0410-b5e6-96231b3b80d8
* Move findTiedToSrcOperand to TargetInstrDescriptor.Evan Cheng2006-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32366 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MI's TargetInstrDescriptor.Evan Cheng2006-12-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32352 91177308-0d34-0410-b5e6-96231b3b80d8
* Match TargetInstrInfo changes.Evan Cheng2006-12-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32098 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the ugly SPARCV9 TargetInstrDescriptors hack.Evan Cheng2006-11-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32033 91177308-0d34-0410-b5e6-96231b3b80d8
* commuteInstruction should propagate kill / dead info.Evan Cheng2006-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31763 91177308-0d34-0410-b5e6-96231b3b80d8
* RenameEvan Cheng2006-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31364 91177308-0d34-0410-b5e6-96231b3b80d8
* Added getTiedToSrcOperand() to check for two-address'ness.Evan Cheng2006-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31360 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo! How did we commute nodes before?!Evan Cheng2006-05-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28229 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some methods out of MachineInstr into MachineOperandChris Lattner2006-05-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28102 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some v9 specific codeChris Lattner2006-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27900 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spacesMisha Brukman2005-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21452 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2005-01-19
| | | | | | | | Add default impl of commuteInstruction Add notes about ugly V9 code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19684 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantTypeMustBeLoaded has been incorporated into SparcV9PreSelection, itsBrian Gaeke2004-07-27
| | | | | | | only user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15294 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to change in TII ctor argumentsChris Lattner2004-02-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11987 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this assertion more self-explanatory.Brian Gaeke2004-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10879 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | 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-20
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Nice tasty llc fixes. These should fix LLC for x86 for everything inBrian Gaeke2003-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SingleSource except oopack and Oscar. (Sorry, Oscar.) include/llvm/Target/TargetInstrInfo.h: Remove virtual print method. Add accessors for ImplicitUses/Defs. lib/Target/TargetInstrInfo.cpp: Remove virtual print method. If you really wanted this, just use MI->print(O, TM); instead... lib/Target/X86: FloatingPoint.cpp: ...like this. X86InstrInfo.h: Remove virtual print method. Define the PrintImplUses target-specific flag bit. X86InstrInfo.def: Add the PrintImplUses flag to all the instructions which implicitly use CL, because the assembler needs to see the CL in order to generate the right instruction. Printer.cpp: Ditch fnIndex at Chris's request. Now we use CurrentFnName to name constants in the constant pool for each function instead. This avoids keeping state between runOnMachineFunction() invocations, which is a no-no. Having MangledGlobals be global is a bogon I'd like to get rid of too, but making it a static member of Printer causes link errors (why???). Make NumberForBB into a member of Printer instead of a global, too. Make printOp and printMemReference into methods of Printer. X86InstrInfo::print is now Printer::printMachineInstruction, because TargetInstrInfo::print is history. (Because of this, we have to qualify the names of some TargetInstrInfo methods we call.) Print out the ImplicitUses field of any instruction we print that has the PrintImplUses bit set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6924 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MachineInstrInfo -> TargetInstrInfoChris Lattner2003-01-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5272 91177308-0d34-0410-b5e6-96231b3b80d8
* Start renaming MachineInstrInfo -> TargetInstrInfoChris Lattner2003-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5221 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass on a targetmachineChris Lattner2002-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4736 91177308-0d34-0410-b5e6-96231b3b80d8
* Add default implementation of printing interfaceChris Lattner2002-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4727 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetInstrDescriptors to MachineInstrInfo.cppChris Lattner2002-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4391 91177308-0d34-0410-b5e6-96231b3b80d8