94579dbd2e 
								
							 
						 
						
							
							
								
								Didn't mean the last commit. Revert.  
							
							... 
							
							
							
							llvm-svn: 38515 
							
						 
						
							2007-07-10 22:00:16 +00:00  
				
					
						
							
							
								 
						
							
								effa7467b6 
								
							 
						 
						
							
							
								
								Update.  
							
							... 
							
							
							
							llvm-svn: 38513 
							
						 
						
							2007-07-10 21:49:47 +00:00  
				
					
						
							
							
								 
						
							
								94f04c6fc9 
								
							 
						 
						
							
							
								
								Reflects the chanegs made to PredicateOperand.  
							
							... 
							
							
							
							llvm-svn: 37898 
							
						 
						
							2007-07-05 07:18:20 +00:00  
				
					
						
							
							
								 
						
							
								c95f95b6da 
								
							 
						 
						
							
							
								
								Fix comment.  
							
							... 
							
							
							
							llvm-svn: 37098 
							
						 
						
							2007-05-16 05:14:06 +00:00  
				
					
						
							
							
								 
						
							
								0f7cbe8370 
								
							 
						 
						
							
							
								
								Add PredicateOperand to all ARM instructions that have the condition field.  
							
							... 
							
							
							
							llvm-svn: 37066 
							
						 
						
							2007-05-15 01:29:07 +00:00  
				
					
						
							
							
								 
						
							
								8c78a0bff0 
								
							 
						 
						
							
							
								
								Drop 'const'  
							
							... 
							
							
							
							llvm-svn: 36662 
							
						 
						
							2007-05-03 01:11:54 +00:00  
				
					
						
							
							
								 
						
							
								e95c6ad802 
								
							 
						 
						
							
							
								
								Use 'static const char' instead of 'static const int'.  
							
							... 
							
							
							
							Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652 
							
						 
						
							2007-05-02 21:39:20 +00:00  
				
					
						
							
							
								 
						
							
								09f162ca6a 
								
							 
						 
						
							
							
								
								Do not use typeinfo to identify pass in pass manager.  
							
							... 
							
							
							
							llvm-svn: 36632 
							
						 
						
							2007-05-01 21:15:47 +00:00  
				
					
						
							
							
								 
						
							
								4a00cf3fc4 
								
							 
						 
						
							
							
								
								Rewrite of Thumb constant islands handling (exact allowance for padding  
							
							... 
							
							
							
							around islands and jump tables).
llvm-svn: 36573 
							
						 
						
							2007-04-29 19:19:30 +00:00  
				
					
						
							
							
								 
						
							
								559c546453 
								
							 
						 
						
							
							
								
								Doh. ARM::LEApcrel is a single instruction MI.  
							
							... 
							
							
							
							llvm-svn: 36513 
							
						 
						
							2007-04-27 18:27:13 +00:00  
				
					
						
							
							
								 
						
							
								d9990f061f 
								
							 
						 
						
							
							
								
								Special handling of LEApcrel and tLEApcrel.  
							
							... 
							
							
							
							llvm-svn: 36504 
							
						 
						
							2007-04-27 08:14:15 +00:00  
				
					
						
							
							
								 
						
							
								fdfb757682 
								
							 
						 
						
							
							
								
								Make Thumb funcs containing islands 4-byte aligned.  Fix bugs maintaining  
							
							... 
							
							
							
							BBOffsets and BBSizes when adjusting conditional branches.
llvm-svn: 36372 
							
						 
						
							2007-04-23 20:09:04 +00:00  
				
					
						
							
							
								 
						
							
								3c68d4e8ba 
								
							 
						 
						
							
							
								
								Remove unused constant pool entries.  
							
							... 
							
							
							
							llvm-svn: 35635 
							
						 
						
							2007-04-03 23:39:48 +00:00  
				
					
						
							
							
								 
						
							
								d13786dd82 
								
							 
						 
						
							
							
								
								fix off by 1 error in displacement computation  
							
							... 
							
							
							
							llvm-svn: 35602 
							
						 
						
							2007-04-02 20:31:06 +00:00  
				
					
						
							
							
								 
						
							
								6f059e3e0a 
								
							 
						 
						
							
							
								
								- Track which callee-saved registers are spilled.  
							
							... 
							
							
							
							- Some code clean up.
llvm-svn: 34783 
							
						 
						
							2007-03-01 08:26:31 +00:00  
				
					
						
							
							
								 
						
							
								962fa8eb9a 
								
							 
						 
						
							
							
								
								Changes requested in review of last pass.  Also pulled isThumb into a  
							
							... 
							
							
							
							member, instead of resetting in every function that uses it.
llvm-svn: 34764 
							
						 
						
							2007-02-28 23:20:38 +00:00  
				
					
						
							
							
								 
						
							
								440995bd9a 
								
							 
						 
						
							
							
								
								Add intelligence about where to break large blocks.  
							
							... 
							
							
							
							llvm-svn: 34755 
							
						 
						
							2007-02-28 18:41:23 +00:00  
				
					
						
							
							
								 
						
							
								c2f3d015e0 
								
							 
						 
						
							
							
								
								cosmetic changes from review of last patch.  obvious  
							
							... 
							
							
							
							llvm-svn: 34598 
							
						 
						
							2007-02-25 18:31:31 +00:00  
				
					
						
							
							
								 
						
							
								e80e31eada 
								
							 
						 
						
							
							
								
								remove crediting of Evan Cheng and me.  
							
							... 
							
							
							
							llvm-svn: 34568 
							
						 
						
							2007-02-25 01:42:36 +00:00  
				
					
						
							
							
								 
						
							
								01ee5750f4 
								
							 
						 
						
							
							
								
								Removed WaterListOffset, inserted BBOffsets.  Remove TODO item about this  
							
							... 
							
							
							
							from README.
When no water available, use end of block if in range.  (More to do here.)
llvm-svn: 34563 
							
						 
						
							2007-02-25 00:47:03 +00:00  
				
					
						
							
							
								 
						
							
								e18b13b213 
								
							 
						 
						
							
							
								
								rewrite of constant islands  
							
							... 
							
							
							
							llvm-svn: 34523 
							
						 
						
							2007-02-23 05:02:36 +00:00  
				
					
						
							
							
								 
						
							
								540f5e0d41 
								
							 
						 
						
							
							
								
								These vectors are frequently large. Use std::vector instead.  
							
							... 
							
							
							
							llvm-svn: 34109 
							
						 
						
							2007-02-09 23:59:14 +00:00  
				
					
						
							
							
								 
						
							
								8b7700f146 
								
							 
						 
						
							
							
								
								Add reference counting to constantpool entries. Delete the unused ones.  
							
							... 
							
							
							
							llvm-svn: 34105 
							
						 
						
							2007-02-09 20:54:44 +00:00  
				
					
						
							
							
								 
						
							
								36d559d369 
								
							 
						 
						
							
							
								
								- Branch max. displacement calculation bug.  
							
							... 
							
							
							
							- Add debugging info.
llvm-svn: 33811 
							
						 
						
							2007-02-03 02:08:34 +00:00  
				
					
						
							
							
								 
						
							
								d9d94700a4 
								
							 
						 
						
							
							
								
								Use MBB.empty() instead of MBB.size() for speed.  
							
							... 
							
							
							
							llvm-svn: 33789 
							
						 
						
							2007-02-02 19:09:19 +00:00  
				
					
						
							
							
								 
						
							
								3ad22567b3 
								
							 
						 
						
							
							
								
								Watch out for empty BB.  
							
							... 
							
							
							
							llvm-svn: 33788 
							
						 
						
							2007-02-02 18:49:02 +00:00  
				
					
						
							
							
								 
						
							
								fd522996c8 
								
							 
						 
						
							
							
								
								Pasto. Lots of it.  
							
							... 
							
							
							
							llvm-svn: 33762 
							
						 
						
							2007-02-01 20:44:52 +00:00  
				
					
						
							
							
								 
						
							
								f9a4c690de 
								
							 
						 
						
							
							
								
								- Off by one bugs in maximum displacement calculation / testing.  
							
							... 
							
							
							
							- In thumb mode, a new constpool island BB size should be 4 + 2 to
  compensate for the potential padding due to alignment requirement.
llvm-svn: 33753 
							
						 
						
							2007-02-01 10:16:15 +00:00  
				
					
						
							
							
								 
						
							
								234e031e36 
								
							 
						 
						
							
							
								
								Pessmistically assume the .align 2 before the first constpool entry adds  
							
							... 
							
							
							
							two bytes padding.
llvm-svn: 33734 
							
						 
						
							2007-02-01 01:09:47 +00:00  
				
					
						
							
							
								 
						
							
								e5c19993cd 
								
							 
						 
						
							
							
								
								Handle an interesting corner case: the constpool_entry being reference is two  
							
							... 
							
							
							
							instructions away, i.e. its address is equal to PC.
        %r0 = tLDRpci <cp#0>
        bx
        CONSTPOOL_ENTRY 0 <cp#0>, 4
llvm-svn: 33728 
							
						 
						
							2007-01-31 23:35:18 +00:00  
				
					
						
							
							
								 
						
							
								1f3fc4b3f0 
								
							 
						 
						
							
							
								
								When determining whether a pc relative branch / load displacement fits in the  
							
							... 
							
							
							
							instruction field, adjust it for PC value (4 for thumb, 8 for arm).
llvm-svn: 33711 
							
						 
						
							2007-01-31 19:57:44 +00:00  
				
					
						
							
							
								 
						
							
								7169bd8784 
								
							 
						 
						
							
							
								
								Some comments.  
							
							... 
							
							
							
							llvm-svn: 33707 
							
						 
						
							2007-01-31 18:29:27 +00:00  
				
					
						
							
							
								 
						
							
								456928bbbc 
								
							 
						 
						
							
							
								
								ConstPool island bug: watch out for cases where UserMI is the last MI of the BB.  
							
							... 
							
							
							
							llvm-svn: 33706 
							
						 
						
							2007-01-31 18:19:07 +00:00  
				
					
						
							
							
								 
						
							
								345877e77c 
								
							 
						 
						
							
							
								
								- Added Thumb constpool island support.  
							
							... 
							
							
							
							- Islands are inserted right after the user MI since thumb LDR cannot encode
  negative offset.
llvm-svn: 33690 
							
						 
						
							2007-01-31 02:22:22 +00:00  
				
					
						
							
							
								 
						
							
								7fa6964dc2 
								
							 
						 
						
							
							
								
								- In thumb mode, if size of MachineFunction is >= 2048, force LR to be  
							
							... 
							
							
							
							spilled (if it is not already).
- If LR is spilled, use BL to implement far jumps. LR is not used as a GPR
  in thumb mode so it can be clobbered if it is properly spilled / restored
  in prologue / epilogue.
- If LR is force spilled but no far jump has been emitted, try undo'ing the
  spill by:
  push lr -> delete
  pop pc -> bx lr
llvm-svn: 33650 
							
						 
						
							2007-01-30 01:18:38 +00:00  
				
					
						
							
							
								 
						
							
								760c68b8af 
								
							 
						 
						
							
							
								
								Factor GetInstSize() out of constpool island pass.  
							
							... 
							
							
							
							llvm-svn: 33644 
							
						 
						
							2007-01-29 23:45:17 +00:00  
				
					
						
							
							
								 
						
							
								0701c5a074 
								
							 
						 
						
							
							
								
								Thumb jumptable support.  
							
							... 
							
							
							
							llvm-svn: 33568 
							
						 
						
							2007-01-27 02:29:45 +00:00  
				
					
						
							
							
								 
						
							
								3c9dc6bd46 
								
							 
						 
						
							
							
								
								Conditional branch being fixed up is not the last MI in the BB, there is a  
							
							... 
							
							
							
							unconditional branch following it. Simply invert the condition and swap
destinations if the conditional branch can reach the destination of the
unconditional branch:
beq L1
b   L2
=>
bne L2
b   L1
llvm-svn: 33548 
							
						 
						
							2007-01-26 20:38:26 +00:00  
				
					
						
							
							
								 
						
							
								f9e5445ed4 
								
							 
						 
						
							
							
								
								Make LABEL a builtin opcode.  
							
							... 
							
							
							
							llvm-svn: 33537 
							
						 
						
							2007-01-26 14:34:52 +00:00  
				
					
						
							
							
								 
						
							
								1e270b639d 
								
							 
						 
						
							
							
								
								SplitBlockBeforeInstr() insert a unconditional branch to the next BB. This  
							
							... 
							
							
							
							is unnecessary when we are fixing up a conditional branch since we will be
adding a unconditional branch to the destination of the original branch.
llvm-svn: 33517 
							
						 
						
							2007-01-26 02:02:39 +00:00  
				
					
						
							
							
								 
						
							
								db7f0591f3 
								
							 
						 
						
							
							
								
								Need to scan the function for branches even if there aren't any constants.  
							
							... 
							
							
							
							llvm-svn: 33515 
							
						 
						
							2007-01-26 01:04:44 +00:00  
				
					
						
							
							
								 
						
							
								1d138989f4 
								
							 
						 
						
							
							
								
								Forgot to update this.  
							
							... 
							
							
							
							llvm-svn: 33512 
							
						 
						
							2007-01-25 23:31:04 +00:00  
				
					
						
							
							
								 
						
							
								010ae386b8 
								
							 
						 
						
							
							
								
								Add comment, fix typo, reduce memory usage, etc.  
							
							... 
							
							
							
							llvm-svn: 33510 
							
						 
						
							2007-01-25 23:18:59 +00:00  
				
					
						
							
							
								 
						
							
								417260dc11 
								
							 
						 
						
							
							
								
								Doh. Skip JT branches.  
							
							... 
							
							
							
							llvm-svn: 33501 
							
						 
						
							2007-01-25 19:43:52 +00:00  
				
					
						
							
							
								 
						
							
								22c7cf504e 
								
							 
						 
						
							
							
								
								Added (preliminary) branch shortening capability to constantpool island pass.  
							
							... 
							
							
							
							llvm-svn: 33497 
							
						 
						
							2007-01-25 03:12:46 +00:00  
				
					
						
							
							
								 
						
							
								1526ba50d9 
								
							 
						 
						
							
							
								
								Use PC relative ldr to load from a constantpool in Thumb mode.  
							
							... 
							
							
							
							llvm-svn: 33484 
							
						 
						
							2007-01-24 08:53:17 +00:00  
				
					
						
							
							
								 
						
							
								10043e215b 
								
							 
						 
						
							
							
								
								ARM backend contribution from Apple.  
							
							... 
							
							
							
							llvm-svn: 33353 
							
						 
						
							2007-01-19 07:51:42 +00:00