Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add a bit IsUndef to MachineOperand. This indicates the def / use register ↵ | Evan Cheng | 2009-06-30 | 1 | -26/+8 | |
| | | | | | | | | | | operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them. The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing. This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def. llvm-svn: 74518 | |||||
* | If killed register is defined by implicit_def, do not clear it since it's ↵ | Evan Cheng | 2009-06-12 | 1 | -5/+12 | |
| | | | | | | live range may overlap another def of same register. llvm-svn: 73255 | |||||
* | Fix pr3954. The register scavenger asserts for inline assembly with | Bob Wilson | 2009-04-09 | 1 | -4/+2 | |
| | | | | | | | | | | | | 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). llvm-svn: 68714 | |||||
* | Tidy up #includes, deleting a bunch of unnecessary #includes. | Dan Gohman | 2009-01-05 | 1 | -0/+1 | |
| | | | | llvm-svn: 61715 | |||||
* | Silience unused warnings. | Devang Patel | 2008-12-23 | 1 | -0/+2 | |
| | | | | llvm-svn: 61390 | |||||
* | Initialize the ImplicitDefed member, to avoid getting stale | Dan Gohman | 2008-12-19 | 1 | -0/+1 | |
| | | | | | | data from a previous block. llvm-svn: 61237 | |||||
* | Fix a typo in a comment. | Dan Gohman | 2008-12-02 | 1 | -1/+1 | |
| | | | | llvm-svn: 60434 | |||||
* | - Register scavenger should use MachineRegisterInfo and internal map to find ↵ | Evan Cheng | 2008-11-20 | 1 | -32/+62 | |
| | | | | | | | | | the first use of a register after a given machine instruction. - When scavenging a register, in addition to the spill, insert a restore before the first use. - Abort if client is looking to scavenge a register even when a previously scavenged register is still live. llvm-svn: 59697 | |||||
* | Make the same change to RegScavenger::backward. | Evan Cheng | 2008-11-18 | 1 | -9/+28 | |
| | | | | llvm-svn: 59566 | |||||
* | We also need to keep the operand index for two address check. | Evan Cheng | 2008-11-18 | 1 | -9/+11 | |
| | | | | llvm-svn: 59562 | |||||
* | Register scavenger should process early clobber defs first. A dead early ↵ | Evan Cheng | 2008-11-18 | 1 | -23/+37 | |
| | | | | | | clobber def should not interfere with a normal def which happens one slot later. llvm-svn: 59559 | |||||
* | Switch the MachineOperand accessors back to the short names like | Dan Gohman | 2008-10-03 | 1 | -7/+7 | |
| | | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006 | |||||
* | Minor const-correctness fixes. | Dan Gohman | 2008-07-07 | 1 | -1/+1 | |
| | | | | llvm-svn: 53196 | |||||
* | Fix some constructs that gcc-4.4 warns about. | Duncan Sands | 2008-05-27 | 1 | -1/+2 | |
| | | | | llvm-svn: 51591 | |||||
* | Allow registers defined by implicit_def to be clobbered. | Evan Cheng | 2008-04-10 | 1 | -6/+15 | |
| | | | | llvm-svn: 49512 | |||||
* | 1. IMPLICIT_DEF can *re-define* any register. | Evan Cheng | 2008-04-05 | 1 | -2/+42 | |
| | | | | | | | 2. Coalescer can now create an interesting situation where a register def can reaches itself without being killed. llvm-svn: 49246 | |||||
* | Something that kills a super-register also | Bill Wendling | 2008-03-07 | 1 | -2/+1 | |
| | | | | | | kills the sub-register. llvm-svn: 48038 | |||||
* | Fixed a register scavenger bug. If a def is re-defining part of a super ↵ | Evan Cheng | 2008-03-07 | 1 | -3/+8 | |
| | | | | | | register, there must be an implicit def of the super-register on the MI. llvm-svn: 48024 | |||||
* | When setting the "unused" info, take into account something like this: | Bill Wendling | 2008-03-06 | 1 | -8/+38 | |
| | | | | | | | | %r3<def> = OR %x3<kill>, %x3 We don't want to mark the %r3 as unused even though it's a sub-register of %x3. llvm-svn: 48003 | |||||
* | Refactor code. Remove duplicated functions that basically do the same thing as | Evan Cheng | 2008-03-05 | 1 | -15/+16 | |
| | | | | | | findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies. llvm-svn: 47927 | |||||
* | Make the register scavenger update the bookkeeping values for sub/super | Bill Wendling | 2008-03-03 | 1 | -3/+39 | |
| | | | | | | registers. llvm-svn: 47861 | |||||
* | Fix typos. | Bill Wendling | 2008-02-16 | 1 | -2/+2 | |
| | | | | llvm-svn: 47200 | |||||
* | Rename MRegisterInfo to TargetRegisterInfo. | Dan Gohman | 2008-02-10 | 1 | -1/+1 | |
| | | | | llvm-svn: 46930 | |||||
* | rename TargetInstrDescriptor -> TargetInstrDesc. | Chris Lattner | 2008-01-07 | 1 | -5/+5 | |
| | | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695 | |||||
* | Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects | Chris Lattner | 2008-01-07 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | | 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 | |||||
* | Move some more instruction creation methods from RegisterInfo into InstrInfo. | Owen Anderson | 2008-01-01 | 1 | -3/+3 | |
| | | | | llvm-svn: 45484 | |||||
* | Remove attribution from file headers, per discussion on llvmdev. | Chris Lattner | 2007-12-29 | 1 | -2/+2 | |
| | | | | llvm-svn: 45418 | |||||
* | Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether | Evan Cheng | 2007-12-05 | 1 | -1/+1 | |
| | | | | | | the stored register is killed. llvm-svn: 44600 | |||||
* | Remove isReg, isImm, and isMBB, and change all their users to use | Dan Gohman | 2007-09-14 | 1 | -5/+5 | |
| | | | | | | | isRegister, isImmediate, and isMachineBasicBlock, which are equivalent, and more popular. llvm-svn: 41958 | |||||
* | Better assertion messages. | Evan Cheng | 2007-07-05 | 1 | -3/+4 | |
| | | | | llvm-svn: 37890 | |||||
* | If call frame is not part of stack frame and no dynamic alloc, ↵ | Evan Cheng | 2007-05-01 | 1 | -4/+5 | |
| | | | | | | eliminateFrameIndex() must adjust SP offset with size of call frames. llvm-svn: 36625 | |||||
* | Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion. | Evan Cheng | 2007-04-26 | 1 | -1/+1 | |
| | | | | llvm-svn: 36483 | |||||
* | Bad bad bug. findRegisterUseOperand() returns -1 if a use if not found. | Evan Cheng | 2007-04-03 | 1 | -1/+1 | |
| | | | | llvm-svn: 35618 | |||||
* | Fix reversed logic in getRegsUsed. Rename RegStates to RegsAvailable to | Dale Johannesen | 2007-03-26 | 1 | -15/+15 | |
| | | | | | | hopefully forestall similar errors. llvm-svn: 35362 | |||||
* | maintain LiveIn when splitting blocks (register scavenging needs it) | Dale Johannesen | 2007-03-20 | 1 | -0/+7 | |
| | | | | llvm-svn: 35226 | |||||
* | Minor bug fix. | Evan Cheng | 2007-03-06 | 1 | -0/+2 | |
| | | | | llvm-svn: 34985 | |||||
* | Register scavenger is now capable of scavenging. It spills a register whose ↵ | Evan Cheng | 2007-03-06 | 1 | -2/+90 | |
| | | | | | | use of furthest away to make it available. llvm-svn: 34964 | |||||
* | Mark dead def as unused. | Evan Cheng | 2007-03-02 | 1 | -2/+6 | |
| | | | | llvm-svn: 34844 | |||||
* | Add a version of FindUnusedReg that restrict search to a specific set of ↵ | Evan Cheng | 2007-03-01 | 1 | -0/+15 | |
| | | | | | | registers. llvm-svn: 34784 | |||||
* | Interface clean up. | Evan Cheng | 2007-03-01 | 1 | -13/+7 | |
| | | | | llvm-svn: 34770 | |||||
* | Some more code clean up. | Evan Cheng | 2007-02-27 | 1 | -23/+29 | |
| | | | | llvm-svn: 34700 | |||||
* | Oops. | Evan Cheng | 2007-02-27 | 1 | -1/+4 | |
| | | | | llvm-svn: 34698 | |||||
* | RegScavenger interface change to make it more flexible. | Evan Cheng | 2007-02-27 | 1 | -16/+18 | |
| | | | | llvm-svn: 34690 | |||||
* | forward() should not increment internal iterator. Its client may insert ↵ | Evan Cheng | 2007-02-27 | 1 | -4/+25 | |
| | | | | | | instruction between now and next forward() call. llvm-svn: 34649 | |||||
* | Add an assertion. | Evan Cheng | 2007-02-25 | 1 | -2/+4 | |
| | | | | llvm-svn: 34596 | |||||
* | Mark livein registers as being in used. | Evan Cheng | 2007-02-23 | 1 | -0/+6 | |
| | | | | llvm-svn: 34525 | |||||
* | Initial check in of register scavenger. Its only current functionality is ↵ | Evan Cheng | 2007-02-23 | 1 | -0/+140 | |
tracking live registers per MBB. llvm-svn: 34511 |