summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Let each target determines whether a machine instruction is dead. If true, ↵Evan Cheng2009-07-221-0/+21
| | | | | | | | that allows late codeine passes to delete it. This is considered a workaround. The problem is some targets are not modeling side effects correctly. PPC is apparently one of those. This patch allows ppc llvm-gcc to bootstrap on Darwin. Once we find out which instruction definitions are wrong, we can remove the PPCInstrInfo workaround. llvm-svn: 76703
* Let callers decide the sub-register index on the def operand of ↵Evan Cheng2009-07-161-1/+4
| | | | | | | | rematerialized instructions. Avoid remat'ing instructions whose def have sub-register indices for now. It's just really really hard to get all the cases right. llvm-svn: 75900
* Use findCommutedOpIndices to find the operands to commute.Evan Cheng2009-07-101-3/+13
| | | | llvm-svn: 75312
* Remove TargetInstrInfo::CommuteChangesDestination and added ↵Evan Cheng2009-07-101-18/+16
| | | | | | findCommutedOpIndices which returns the operand indices which are swapped (when applicable). This allows for some code clean up and future enhancements. llvm-svn: 75264
* CommuteChangesDestination() should check if to-be-commuted instruction ↵Evan Cheng2009-07-011-16/+30
| | | | | | defines any register. Also teaches the default commuteInstruction() to commute instruction without definitions (e.g. X86::test / ARM::tsp). llvm-svn: 74602
* Change MachineInstrBuilder::addReg() to take a flag instead of a list ofBill Wendling2009-05-131-3/+3
| | | | | | | | | | | | booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). llvm-svn: 71722
* Explicitly pass in debug location information to BuildMI.Bill Wendling2009-02-031-1/+1
| | | | llvm-svn: 63599
* Split foldMemoryOperand into public non-virtual and protected virtualDan Gohman2008-12-031-0/+68
| | | | | | | parts, and add target-independent code to add/preserve MachineMemOperands. llvm-svn: 60488
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-5/+5
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Remove isImm(), isReg(), and friends, in favor of Dan Gohman2008-09-131-3/+3
| | | | | | | | | isImmediate(), isRegister(), and friends, to avoid confusion about having two different names with the same meaning. I'm not attached to the longer names, and would be ok with changing to the shorter names if others prefer it. llvm-svn: 56189
* Fix a 80 column violation.Evan Cheng2008-09-111-1/+2
| | | | llvm-svn: 56097
* Convert uses of std::vector in TargetInstrInfo to SmallVector. This change ↵Owen Anderson2008-08-141-1/+2
| | | | | | had to be propoagated down into all the targets and up into all clients of this API. llvm-svn: 54802
* Pool-allocation for MachineInstrs, MachineBasicBlocks, andDan Gohman2008-07-071-2/+4
| | | | | | | | | | | MachineMemOperands. The pools are owned by MachineFunctions. This drastically reduces the number of calls to malloc/free made during the "Emit" phase of scheduling, as well as later phases in CodeGen. Combined with other changes, this speeds up the "instruction selection" phase of CodeGen by 10% in some cases. llvm-svn: 53212
* Add option to commuteInstruction() which forces it to create a new ↵Evan Cheng2008-06-161-2/+17
| | | | | | (commuted) instruction. llvm-svn: 52308
* Infrastructure for getting the machine code size of a function and an ↵Nicolas Geoffray2008-04-161-0/+11
| | | | | | instruction. X86, PowerPC and ARM are implemented llvm-svn: 49809
* Move reMaterialize() from TargetRegisterInfo to TargetInstrInfo.Evan Cheng2008-03-311-0/+10
| | | | llvm-svn: 48995
* Added CommuteChangesDestination(). This returns true if commuting the specifiedEvan Cheng2008-02-151-1/+21
| | | | | | machine instr will change its definition register. llvm-svn: 47166
* Simplify.Evan Cheng2008-02-131-3/+1
| | | | llvm-svn: 47058
* commuteInstr() can now commute non-ssa machine instrs.Evan Cheng2008-02-131-0/+9
| | | | llvm-svn: 47043
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-16/+17
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* Add predicates methods to TargetOperandInfo, and switch all clients Chris Lattner2008-01-071-1/+1
| | | | | | | 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-2/+2
| | | | | | | | | | | | | | | 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
* Fix a problem where lib/Target/TargetInstrInfo.h would include and useChris Lattner2008-01-011-0/+58
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. llvm-svn: 45475
OpenPOWER on IntegriCloud