Chris Lattner 
							
						 
					 
					
						
						
							
						
						6cb7004c34 
					 
					
						
						
							
							Fix a problem fully scalarizing values.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26811  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-16 23:05:19 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						199862b749 
					 
					
						
						
							
							Add support for CopyFromReg from vector values.  Note: this doesn't support  
						
						... 
						
						
						
						illegal vector types yet!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26799  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-16 19:57:50 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						3c38449be6 
					 
					
						
						
							
							Teach CreateRegForValue how to handle vector types.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26798  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-16 19:51:18 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						28b5b1c7b5 
					 
					
						
						
							
							add support for vector->vector casts  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26788  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-15 22:19:46 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						f4321a3a43 
					 
					
						
						
							
							Handle the removal of the debug chain.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26729  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-13 13:07:37 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						0937103368 
					 
					
						
						
							
							Added a parameter to control whether Constant::getStringValue() would chop  
						
						... 
						
						
						
						off the result string at the first null terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26704  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-10 23:52:03 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						7d74d1145f 
					 
					
						
						
							
							scrape out bits of llvm-db  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26701  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-10 22:48:19 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						20a4921791 
					 
					
						
						
							
							Simplify the interface to the schedulers, to not pass the selected heuristicin.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26692  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-10 07:49:12 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						59bcce5ae5 
					 
					
						
						
							
							remove dbg_declare, it's not used yet.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26659  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-09 20:02:42 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						21b6c9d647 
					 
					
						
						
							
							Get rid of the multiple copies of getStringValue.  Now a Constant:: method.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26616  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-08 18:11:07 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						b0d21ef20c 
					 
					
						
						
							
							Change the interface for getting a target HazardRecognizer to be more clean.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26608  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-08 04:25:59 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						03fc53c174 
					 
					
						
						
							
							Hoist the HazardRecognizer out of the ScheduleDAGList.cpp file to where  
						
						... 
						
						
						
						targets can implement them.  Make the top-down scheduler non-g5-specific.
Remove the old testing hazard recognizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26569  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-06 00:22:00 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a5de484bc7 
					 
					
						
						
							
							Split the list scheduler into top-down and bottom-up pieces.  The priority  
						
						... 
						
						
						
						function of the top-down scheduler are completely bogus currently, and
having (future) PPC specific in this file is also wrong, but this is a
small incremental step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26552  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-05 21:10:33 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						a09f848c11 
					 
					
						
						
							
							Codegen copysign[f] into a FCOPYSIGN node  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26542  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-05 05:09:38 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						3e1ce5a44d 
					 
					
						
						
							
							Add more vector NodeTypes: VSDIV, VUDIV, VAND, VOR, and VXOR.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26504  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-03 07:01:07 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						41edaa0529 
					 
					
						
						
							
							remove the read/write port/io intrinsics.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26479  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-03 00:19:58 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						03dd465215 
					 
					
						
						
							
							Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving  
						
						... 
						
						
						
						PR709, and paving the way for future progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26476  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-03 00:00:25 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						860771d2d8 
					 
					
						
						
							
							Vector ops lowering.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26436  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-03-01 01:09:54 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						22873462c9 
					 
					
						
						
							
							Add support for output memory constraints.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26410  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-27 23:45:39 +00:00 
						 
				 
			
				
					
						
							
							
								Jeff Cohen 
							
						 
					 
					
						
						
							
						
						7e88103cde 
					 
					
						
						
							
							Get VC++ building again.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26351  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-24 02:52:40 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						0e43f2ba11 
					 
					
						
						
							
							Implement (most of) selection of inline asm memory operands.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26350  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-24 02:13:54 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						87bc3bd121 
					 
					
						
						
							
							Lower C_Memory operands.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26346  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-24 01:11:24 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						9f6637db10 
					 
					
						
						
							
							Fix an endianness problem on big-endian targets with expanded operands  
						
						... 
						
						
						
						to inline asms.  Mark some methods const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26334  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-23 20:06:57 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						c3a9f8d31c 
					 
					
						
						
							
							Record all of the expanded registers in the DAG and machine instr, fixing  
						
						... 
						
						
						
						several bugs in inline asm expanded operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26332  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-23 19:21:04 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						9b6fb5de49 
					 
					
						
						
							
							This fixes a couple of problems with expansion  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26318  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-22 23:09:03 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						864635ad7b 
					 
					
						
						
							
							Change a whole bunch of code to be built around RegsForValue instead of  
						
						... 
						
						
						
						a single register number.  This fully implements promotion for inline asms,
expand is close but not quite right yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26316  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-22 22:37:12 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						1efa40f6a4 
					 
					
						
						
							
							split register class handling from explicit physreg handling.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26308  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-22 00:56:39 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						0f0b7d4927 
					 
					
						
						
							
							Adjust to changes in getRegForInlineAsmConstraint prototype  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26306  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-21 23:12:12 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						cffbb5174f 
					 
					
						
						
							
							Dumb bug. Code sees a memcpy from X+c so it increments src offset. But it  
						
						... 
						
						
						
						turns out not to point to a constant string but it forgot change the offset
back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26242  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-16 23:11:42 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						298ebf2bd8 
					 
					
						
						
							
							If the false case is the current basic block, then this is a self loop.  
						
						... 
						
						
						
						We do not want to emit "Loop: ... brcond Out; br Loop", as it adds an extra
instruction in the loop.  Instead, invert the condition and emit
"Loop: ... br!cond Loop; br Out.
Generalize the fix by moving it from PPCDAGToDAGISel to SelectionDAGLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26231  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-16 08:27:56 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						a47876d87a 
					 
					
						
						
							
							Remove an unused function parameter.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26221  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-15 22:12:35 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						74d0aa9a4b 
					 
					
						
						
							
							Turn a memcpy from string constant into a series of stores of constant values.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26219  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-15 21:59:04 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						c080d6fb3d 
					 
					
						
						
							
							Lower memcpy with small constant size operand into a series of load / store  
						
						... 
						
						
						
						ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26195  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-15 01:54:51 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						dea7245997 
					 
					
						
						
							
							Doh again!  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26188  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 23:05:54 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						c4f8eee054 
					 
					
						
						
							
							Keep to < 80 cols  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26177  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 20:12:38 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						ac940ab1bf 
					 
					
						
						
							
							Missed a break so memcpy cases fell through to memset. Doh.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26176  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 19:45:56 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						80e89d7d6c 
					 
					
						
						
							
							Fixed a build breakage.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26175  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 09:11:59 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						a03a5dc7ce 
					 
					
						
						
							
							Rename maxStoresPerMemSet to maxStoresPerMemset, etc.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26174  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 08:38:30 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						1db92f947c 
					 
					
						
						
							
							Expand memset dst, c, size to a series of stores if size falls below the  
						
						... 
						
						
						
						target specific theshold, e.g. 16 for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26171  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 08:22:34 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						06a248c9b3 
					 
					
						
						
							
							now that libcalls don't suck, we can remove this hack  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26164  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-14 05:39:35 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						d96185aa62 
					 
					
						
						
							
							Rename to better reflect usage (current and planned.)  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26145  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-13 12:50:39 +00:00 
						 
				 
			
				
					
						
							
							
								Jim Laskey 
							
						 
					 
					
						
						
							
						
						ce72b1755f 
					 
					
						
						
							
							Reorg for integration with gcc4.  Old style debug info will not be passed though  
						
						... 
						
						
						
						to SelIDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26115  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-11 01:01:30 +00:00 
						 
				 
			
				
					
						
							
							
								Evan Cheng 
							
						 
					 
					
						
						
							
						
						cccf1232a6 
					 
					
						
						
							
							Get rid of some memory leaks identified by Valgrind  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25960  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-04 06:49:00 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						dc19b70d24 
					 
					
						
						
							
							Add initial support for immediates.  This allows us to compile this:  
						
						... 
						
						
						
						int %rlwnm(int %A, int %B) {
  %C = call int asm "rlwnm $0, $1, $2, $3, $4", "=r,r,r,n,n"(int %A, int %B, int 4, int 17)
  ret int %C
}
into:
_rlwnm:
        or r2, r3, r3
        or r3, r4, r4
        rlwnm r2, r2, r3, 4, 17    ;; note the immediates :)
        or r3, r2, r2
        blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25955  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-04 02:26:14 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						3d81fee851 
					 
					
						
						
							
							Initial early support for non-register operands, like immediates  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25952  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-04 02:16:44 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						7632e2beb4 
					 
					
						
						
							
							remove some #ifdef'd out code, which should properly be in the dag combiner anyway.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25941  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-03 20:13:59 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						2223aea6ed 
					 
					
						
						
							
							Implement matching constraints.  We can now say things like this:  
						
						... 
						
						
						
						%C = call int asm "xyz $0, $1, $2, $3", "=r,r,r,0"(int %A, int %B, int 4)
and get:
xyz r2, r3, r4, r2
note that the r2's are pinned together.  Yaay for 2-address instructions.
2342 ----------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25893  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-02 00:25:23 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						4e4b576e2e 
					 
					
						
						
							
							Implement simple register assignment for inline asms.  This allows us to compile:  
						
						... 
						
						
						
						int %test(int %A, int %B) {
  %C = call int asm "xyz $0, $1, $2", "=r,r,r"(int %A, int %B)
  ret int %C
}
into:
 (0x8906130, LLVM BB @0x8902220):
        %r2 = OR4 %r3, %r3
        %r3 = OR4 %r4, %r4
        INLINEASM <es:xyz $0, $1, $2>, %r2<def>, %r2, %r3
        %r3 = OR4 %r2, %r2
        BLR
which asmprints as:
_test:
        or r2, r3, r3
        or r3, r4, r4
        xyz $0, $1, $2      ;; need to print the operands now :)
        or r3, r2, r2
        blr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25878  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-01 18:59:47 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						2cc2f66c25 
					 
					
						
						
							
							adjust to changes in InlineAsm interface.  Fix a few minor bugs.  
						
						... 
						
						
						
						git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25865  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-02-01 01:28:23 +00:00 
						 
				 
			
				
					
						
							
							
								Chris Lattner 
							
						 
					 
					
						
						
							
						
						6656dd1a78 
					 
					
						
						
							
							Handle physreg input/outputs.  We now compile this:  
						
						... 
						
						
						
						int %test_cpuid(int %op) {
        %B = alloca int
        %C = alloca int
        %D = alloca int
        %A = call int asm "cpuid", "=eax,==ebx,==ecx,==edx,eax"(int* %B, int* %C, int* %D, int %op)
        %Bv = load int* %B
        %Cv = load int* %C
        %Dv = load int* %D
        %x = add int %A, %Bv
        %y = add int %x, %Cv
        %z = add int %y, %Dv
        ret int %z
}
to this:
_test_cpuid:
        sub %ESP, 16
        mov DWORD PTR [%ESP], %EBX
        mov %EAX, DWORD PTR [%ESP + 20]
        cpuid
        mov DWORD PTR [%ESP + 8], %ECX
        mov DWORD PTR [%ESP + 12], %EBX
        mov DWORD PTR [%ESP + 4], %EDX
        mov %ECX, DWORD PTR [%ESP + 12]
        add %EAX, %ECX
        mov %ECX, DWORD PTR [%ESP + 8]
        add %EAX, %ECX
        mov %ECX, DWORD PTR [%ESP + 4]
        add %EAX, %ECX
        mov %EBX, DWORD PTR [%ESP]
        add %ESP, 16
        ret
... note the proper register allocation.  :)
it is unclear to me why the loads aren't folded into the adds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25827  91177308-0d34-0410-b5e6-96231b3b80d8 
						
						
					 
					
						2006-01-31 02:03:41 +00:00