Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								b6cf8dbb96 
								
							 
						 
						
							
							
								
								If killed register is defined by implicit_def, do not clear it since it's live range may overlap another def of same register.  
							
							 
							
							... 
							
							
							
							llvm-svn: 73255 
							
						 
						
							2009-06-12 21:34:26 +00:00  
						
					 
				
					
						
							
							
								 
								Bob Wilson
							
						 
						
							 
							
							
							
							
								
							
							
								51856173c8 
								
							 
						 
						
							
							
								
								Fix pr3954.  The register scavenger asserts for inline assembly with  
							
							 
							
							... 
							
							
							
							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 
							
						 
						
							2009-04-09 17:16:43 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								906152a20f 
								
							 
						 
						
							
							
								
								Tidy up #includes, deleting a bunch of unnecessary #includes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 61715 
							
						 
						
							2009-01-05 17:59:02 +00:00  
						
					 
				
					
						
							
							
								 
								Devang Patel
							
						 
						
							 
							
							
							
							
								
							
							
								323dbe57a6 
								
							 
						 
						
							
							
								
								Silience unused warnings.  
							
							 
							
							... 
							
							
							
							llvm-svn: 61390 
							
						 
						
							2008-12-23 21:55:04 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								8c82a8a984 
								
							 
						 
						
							
							
								
								Initialize the ImplicitDefed member, to avoid getting stale  
							
							 
							
							... 
							
							
							
							data from a previous block.
llvm-svn: 61237 
							
						 
						
							2008-12-19 00:46:20 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								7e9daef644 
								
							 
						 
						
							
							
								
								Fix a typo in a comment.  
							
							 
							
							... 
							
							
							
							llvm-svn: 60434 
							
						 
						
							2008-12-02 19:27:20 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								c22215a090 
								
							 
						 
						
							
							
								
								- Register scavenger should use MachineRegisterInfo and internal map to find 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 
							
						 
						
							2008-11-20 02:32:35 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								cdbbc00a4f 
								
							 
						 
						
							
							
								
								Make the same change to RegScavenger::backward.  
							
							 
							
							... 
							
							
							
							llvm-svn: 59566 
							
						 
						
							2008-11-18 23:54:01 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								6cea453271 
								
							 
						 
						
							
							
								
								We also need to keep the operand index for two address check.  
							
							 
							
							... 
							
							
							
							llvm-svn: 59562 
							
						 
						
							2008-11-18 22:56:19 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								3095c32c89 
								
							 
						 
						
							
							
								
								Register scavenger should process early clobber defs first. A dead early clobber def should not interfere with a normal def which happens one slot later.  
							
							 
							
							... 
							
							
							
							llvm-svn: 59559 
							
						 
						
							2008-11-18 22:28:38 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								0d1e9a8e04 
								
							 
						 
						
							
							
								
								Switch the MachineOperand accessors back to the short names like  
							
							 
							
							... 
							
							
							
							isReg, etc., from isRegister, etc.
llvm-svn: 57006 
							
						 
						
							2008-10-03 15:45:36 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								c7fc432b19 
								
							 
						 
						
							
							
								
								Minor const-correctness fixes.  
							
							 
							
							... 
							
							
							
							llvm-svn: 53196 
							
						 
						
							2008-07-07 20:06:06 +00:00  
						
					 
				
					
						
							
							
								 
								Duncan Sands
							
						 
						
							 
							
							
							
							
								
							
							
								698348dfac 
								
							 
						 
						
							
							
								
								Fix some constructs that gcc-4.4 warns about.  
							
							 
							
							... 
							
							
							
							llvm-svn: 51591 
							
						 
						
							2008-05-27 11:50:51 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								2cb98eb4bb 
								
							 
						 
						
							
							
								
								Allow registers defined by implicit_def to be clobbered.  
							
							 
							
							... 
							
							
							
							llvm-svn: 49512 
							
						 
						
							2008-04-10 23:47:53 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								b5fdc923d3 
								
							 
						 
						
							
							
								
								1. IMPLICIT_DEF can *re-define* any register.  
							
							 
							
							... 
							
							
							
							2. Coalescer can now create an interesting situation where a register def can
   reaches itself without being killed.
llvm-svn: 49246 
							
						 
						
							2008-04-05 01:27:09 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								d6951455e4 
								
							 
						 
						
							
							
								
								Something that kills a super-register also  
							
							 
							
							... 
							
							
							
							kills the sub-register.
llvm-svn: 48038 
							
						 
						
							2008-03-07 23:45:15 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								39a3221e27 
								
							 
						 
						
							
							
								
								Fixed a register scavenger bug. If a def is re-defining part of a super register, there must be an implicit def of the super-register on the MI.  
							
							 
							
							... 
							
							
							
							llvm-svn: 48024 
							
						 
						
							2008-03-07 20:12:54 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								55bfd8c3f7 
								
							 
						 
						
							
							
								
								When setting the "unused" info, take into account something like this:  
							
							 
							
							... 
							
							
							
							%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 
							
						 
						
							2008-03-06 23:22:43 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								6325446666 
								
							 
						 
						
							
							
								
								Refactor code. Remove duplicated functions that basically do the same thing as  
							
							 
							
							... 
							
							
							
							findRegisterUseOperandIdx, findRegisterDefOperandIndx. Fix some naming inconsistencies.
llvm-svn: 47927 
							
						 
						
							2008-03-05 00:59:57 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								528083bc28 
								
							 
						 
						
							
							
								
								Make the register scavenger update the bookkeeping values for sub/super  
							
							 
							
							... 
							
							
							
							registers.
llvm-svn: 47861 
							
						 
						
							2008-03-03 22:12:25 +00:00  
						
					 
				
					
						
							
							
								 
								Bill Wendling
							
						 
						
							 
							
							
							
							
								
							
							
								f861fbaae8 
								
							 
						 
						
							
							
								
								Fix typos.  
							
							 
							
							... 
							
							
							
							llvm-svn: 47200 
							
						 
						
							2008-02-16 01:09:25 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								3a4be0fdef 
								
							 
						 
						
							
							
								
								Rename MRegisterInfo to TargetRegisterInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 46930 
							
						 
						
							2008-02-10 18:45:23 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								03ad885039 
								
							 
						 
						
							
							
								
								rename TargetInstrDescriptor -> TargetInstrDesc.  
							
							 
							
							... 
							
							
							
							Make MachineInstr::getDesc return a reference instead
of a pointer, since it can never be null.
llvm-svn: 45695 
							
						 
						
							2008-01-07 07:27:27 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								a98c679de0 
								
							 
						 
						
							
							
								
								Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflects  
							
							 
							
							... 
							
							
							
							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 
							
						 
						
							2008-01-07 01:56:04 +00:00  
						
					 
				
					
						
							
							
								 
								Owen Anderson
							
						 
						
							 
							
							
							
							
								
							
							
								eee14601b1 
								
							 
						 
						
							
							
								
								Move some more instruction creation methods from RegisterInfo into InstrInfo.  
							
							 
							
							... 
							
							
							
							llvm-svn: 45484 
							
						 
						
							2008-01-01 21:11:32 +00:00  
						
					 
				
					
						
							
							
								 
								Chris Lattner
							
						 
						
							 
							
							
							
							
								
							
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							 
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								bb26301864 
								
							 
						 
						
							
							
								
								Add a argument to storeRegToStackSlot and storeRegToAddr to specify whether  
							
							 
							
							... 
							
							
							
							the stored register is killed.
llvm-svn: 44600 
							
						 
						
							2007-12-05 03:14:33 +00:00  
						
					 
				
					
						
							
							
								 
								Dan Gohman
							
						 
						
							 
							
							
							
							
								
							
							
								9da02f5ee2 
								
							 
						 
						
							
							
								
								Remove isReg, isImm, and isMBB, and change all their users to use  
							
							 
							
							... 
							
							
							
							isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
llvm-svn: 41958 
							
						 
						
							2007-09-14 20:33:02 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								bb6ecf0067 
								
							 
						 
						
							
							
								
								Better assertion messages.  
							
							 
							
							... 
							
							
							
							llvm-svn: 37890 
							
						 
						
							2007-07-05 07:05:38 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								8cd28f0fb1 
								
							 
						 
						
							
							
								
								If call frame is not part of stack frame and no dynamic alloc, eliminateFrameIndex() must adjust SP offset with size of call frames.  
							
							 
							
							... 
							
							
							
							llvm-svn: 36625 
							
						 
						
							2007-05-01 09:01:42 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								910c80851e 
								
							 
						 
						
							
							
								
								Rename findRegisterUseOperand to findRegisterUseOperandIdx to avoid confusion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 36483 
							
						 
						
							2007-04-26 19:00:32 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								06a7041ff9 
								
							 
						 
						
							
							
								
								Bad bad bug. findRegisterUseOperand() returns -1 if a use if not found.  
							
							 
							
							... 
							
							
							
							llvm-svn: 35618 
							
						 
						
							2007-04-03 06:43:29 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								fd18a0cdf4 
								
							 
						 
						
							
							
								
								Fix reversed logic in getRegsUsed.  Rename RegStates to RegsAvailable to  
							
							 
							
							... 
							
							
							
							hopefully forestall similar errors.
llvm-svn: 35362 
							
						 
						
							2007-03-26 22:23:54 +00:00  
						
					 
				
					
						
							
							
								 
								Dale Johannesen
							
						 
						
							 
							
							
							
							
								
							
							
								d05a1a2ade 
								
							 
						 
						
							
							
								
								maintain LiveIn when splitting blocks (register scavenging needs it)  
							
							 
							
							... 
							
							
							
							llvm-svn: 35226 
							
						 
						
							2007-03-20 21:35:06 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								24f65cc91e 
								
							 
						 
						
							
							
								
								Minor bug fix.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34985 
							
						 
						
							2007-03-06 21:58:15 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								372c2c69f8 
								
							 
						 
						
							
							
								
								Register scavenger is now capable of scavenging. It spills a register whose use of furthest away to make it available.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34964 
							
						 
						
							2007-03-06 10:01:25 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								155ede21e0 
								
							 
						 
						
							
							
								
								Mark dead def as unused.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34844 
							
						 
						
							2007-03-02 10:43:16 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								27bc565497 
								
							 
						 
						
							
							
								
								Add a version of FindUnusedReg that restrict search to a specific set of registers.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34784 
							
						 
						
							2007-03-01 08:56:24 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								428eaa0059 
								
							 
						 
						
							
							
								
								Interface clean up.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34770 
							
						 
						
							2007-03-01 02:19:39 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								a7e4b60b85 
								
							 
						 
						
							
							
								
								Some more code clean up.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34700 
							
						 
						
							2007-02-27 22:58:43 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								8a8dc04e7e 
								
							 
						 
						
							
							
								
								Oops.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34698 
							
						 
						
							2007-02-27 22:10:52 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								51f54640de 
								
							 
						 
						
							
							
								
								RegScavenger interface change to make it more flexible.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34690 
							
						 
						
							2007-02-27 21:09:48 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								ca25c0ee0d 
								
							 
						 
						
							
							
								
								forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34649 
							
						 
						
							2007-02-27 01:58:48 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								fb2333a333 
								
							 
						 
						
							
							
								
								Add an assertion.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34596 
							
						 
						
							2007-02-25 09:47:31 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								584e051c28 
								
							 
						 
						
							
							
								
								Mark livein registers as being in used.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34525 
							
						 
						
							2007-02-23 08:41:19 +00:00  
						
					 
				
					
						
							
							
								 
								Evan Cheng
							
						 
						
							 
							
							
							
							
								
							
							
								956fdeb694 
								
							 
						 
						
							
							
								
								Initial check in of register scavenger. Its only current functionality is tracking live registers per MBB.  
							
							 
							
							... 
							
							
							
							llvm-svn: 34511 
							
						 
						
							2007-02-23 01:01:19 +00:00