e2f23a3abf 
								
							 
						 
						
							
							
								
								Add lengthof and endof templates that hide a lot of sizeof computations.  
							
							... 
							
							
							
							Patch by Sterling Stein!
llvm-svn: 41758 
							
						 
						
							2007-09-07 04:06:50 +00:00  
				
					
						
							
							
								 
						
							
								e20dd92792 
								
							 
						 
						
							
							
								
								RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.  
							
							... 
							
							
							
							llvm-svn: 37193 
							
						 
						
							2007-05-18 00:18:17 +00:00  
				
					
						
							
							
								 
						
							
								20350c4025 
								
							 
						 
						
							
							
								
								Change MachineInstr ctor's to take a TargetInstrDescriptor reference instead  
							
							... 
							
							
							
							of opcode and number of operands.
llvm-svn: 31947 
							
						 
						
							2006-11-27 23:37:22 +00:00  
				
					
						
							
							
								 
						
							
								dbd3d294e6 
								
							 
						 
						
							
							
								
								Matches MachineInstr changes.  
							
							... 
							
							
							
							llvm-svn: 31712 
							
						 
						
							2006-11-13 23:36:35 +00:00  
				
					
						
							
							
								 
						
							
								ed32883b27 
								
							 
						 
						
							
							
								
								fix warning about missing newline at end of file  
							
							... 
							
							
							
							llvm-svn: 31162 
							
						 
						
							2006-10-24 17:07:11 +00:00  
				
					
						
							
							
								 
						
							
								b7267bd034 
								
							 
						 
						
							
							
								
								implement uncond branch insertion for sparc to fix regressions from last night  
							
							... 
							
							
							
							due to branchfolding
llvm-svn: 31157 
							
						 
						
							2006-10-24 16:39:19 +00:00  
				
					
						
							
							
								 
						
							
								158e1f519c 
								
							 
						 
						
							
							
								
								Rename SPARC V8 target to be the LLVM SPARC target.  
							
							... 
							
							
							
							llvm-svn: 25985 
							
						 
						
							2006-02-05 05:50:24 +00:00  
				
					
						
							
							
								 
						
							
								94e95d2b3e 
								
							 
						 
						
							
							
								
								Great renaming: Sparc --> SparcV9  
							
							... 
							
							
							
							llvm-svn: 11826 
							
						 
						
							2004-02-25 18:44:15 +00:00  
				
					
						
							
							
								 
						
							
								b01a80aa94 
								
							 
						 
						
							
							
								
								Reorganized the Sparc backend to be more modular -- each different  
							
							... 
							
							
							
							implementation of a Target{RegInfo, InstrInfo, Machine, etc} now has a separate
header and a separate implementation file.
This means that instead of a massive SparcInternals.h that forces a
recompilation of the whole target whenever a minor detail is changed, you should
only recompile a few files.
Note that SparcInternals.h is still around; its contents should be minimized.
llvm-svn: 10500 
							
						 
						
							2003-12-17 22:04:00 +00:00  
				
					
						
							
							
								 
						
							
								960707c335 
								
							 
						 
						
							
							
								
								Put all LLVM code into the llvm namespace, as per bug 109.  
							
							... 
							
							
							
							llvm-svn: 9903 
							
						 
						
							2003-11-11 22:41:34 +00:00  
				
					
						
							
							
								 
						
							
								bf9ed7ac1f 
								
							 
						 
						
							
							
								
								* Use the MachineConstantPool for storing constants instead of a hash_set;  
							
							... 
							
							
							
							* Do not create new globals for constants!
Also, order #includes as per coding style guide
llvm-svn: 9772 
							
						 
						
							2003-11-07 17:29:48 +00:00  
				
					
						
							
							
								 
						
							
								73d9355fea 
								
							 
						 
						
							
							
								
								Hrm, unbreak stuph :(  
							
							... 
							
							
							
							llvm-svn: 9334 
							
						 
						
							2003-10-21 17:22:23 +00:00  
				
					
						
							
							
								 
						
							
								a62228d01a 
								
							 
						 
						
							
							
								
								Fix preselection/lowerswitches bug  
							
							... 
							
							
							
							llvm-svn: 9333 
							
						 
						
							2003-10-21 16:29:23 +00:00  
				
					
						
							
							
								 
						
							
								482202a601 
								
							 
						 
						
							
							
								
								Added LLVM project notice to the top of every C++ source file.  
							
							... 
							
							
							
							Header files will be on the way.
llvm-svn: 9298 
							
						 
						
							2003-10-20 19:43:21 +00:00  
				
					
						
							
							
								 
						
							
								b94550e537 
								
							 
						 
						
							
							
								
								Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.  
							
							... 
							
							
							
							llvm-svn: 9269 
							
						 
						
							2003-10-19 21:34:28 +00:00  
				
					
						
							
							
								 
						
							
								2797c131ef 
								
							 
						 
						
							
							
								
								Don't include "Config/stdlib.h".  
							
							... 
							
							
							
							llvm-svn: 9037 
							
						 
						
							2003-10-10 19:12:22 +00:00  
				
					
						
							
							
								 
						
							
								e895c2e241 
								
							 
						 
						
							
							
								
								Unify all constant evaluations that depend on register size  
							
							... 
							
							
							
							in ConvertConstantToIntType.
llvm-svn: 7395 
							
						 
						
							2003-07-29 19:59:23 +00:00  
				
					
						
							
							
								 
						
							
								6077c3195f 
								
							 
						 
						
							
							
								
								Simplify code by using ConstantInt::getRawValue instead of checking to see  
							
							... 
							
							
							
							whether the constant is signed or unsigned, then casting
llvm-svn: 7252 
							
						 
						
							2003-07-23 15:22:26 +00:00  
				
					
						
							
							
								 
						
							
								8ea738a9ff 
								
							 
						 
						
							
							
								
								Bug fix in creating constants: need 1U << 31, not 1 << 31.  
							
							... 
							
							
							
							llvm-svn: 7158 
							
						 
						
							2003-07-10 19:48:19 +00:00  
				
					
						
							
							
								 
						
							
								3ef61afb76 
								
							 
						 
						
							
							
								
								Merged in autoconf branch.  This provides configuration via the autoconf  
							
							... 
							
							
							
							system.
llvm-svn: 7014 
							
						 
						
							2003-06-30 21:59:07 +00:00  
				
					
						
							
							
								 
						
							
								2969ec5266 
								
							 
						 
						
							
							
								
								* Changed Bcc instructions to behave like BPcc instructions  
							
							... 
							
							
							
							* BPA and BPN do not take a %cc register as a parameter
* SLL/SRL/SRA{r,i}5 are there for a reason - they are ONLY 32-bit instructions
* Likewise, SLL/SRL/SRAX{r,i}6 are only 64-bit
* Added WRCCR{r,i} opcodes
llvm-svn: 6655 
							
						 
						
							2003-06-06 09:52:23 +00:00  
				
					
						
							
							
								 
						
							
								3cdf52a644 
								
							 
						 
						
							
							
								
								Convert load/store opcodes from register to immediate forms, if necessary.  
							
							... 
							
							
							
							llvm-svn: 6565 
							
						 
						
							2003-06-03 03:20:57 +00:00  
				
					
						
							
							
								 
						
							
								a83804a29a 
								
							 
						 
						
							
							
								
								Extensive changes to the way code generation occurs for function  
							
							... 
							
							
							
							call arguments and return values:
Now all copy operations before and after a call are generated during
selection instead of during register allocation.
The values are copied to virtual registers (or to the stack), but
in the former case these operands are marked with the correct physical
registers according to the calling convention.
Although this complicates scheduling and does not work well with
live range analysis, it simplifies the machine-dependent part of
register allocation.
llvm-svn: 6465 
							
						 
						
							2003-05-31 07:32:01 +00:00  
				
					
						
							
							
								 
						
							
								8bde6a688c 
								
							 
						 
						
							
							
								
								Added 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.  
							
							... 
							
							
							
							llvm-svn: 6373 
							
						 
						
							2003-05-27 22:35:43 +00:00  
				
					
						
							
							
								 
						
							
								5b941461b1 
								
							 
						 
						
							
							
								
								Bug fix: sign-extension was not happening for C = -MININT since C == -C!  
							
							... 
							
							
							
							llvm-svn: 6332 
							
						 
						
							2003-05-25 21:58:11 +00:00  
				
					
						
							
							
								 
						
							
								f865cc44ab 
								
							 
						 
						
							
							
								
								Cleaned up code layout, spacing, etc. for readability purposes and to be more  
							
							... 
							
							
							
							consistent with the style of LLVM's code base (and itself! it's inconsistent in
some places.)
No functional changes were made.
llvm-svn: 6265 
							
						 
						
							2003-05-21 18:48:06 +00:00  
				
					
						
							
							
								 
						
							
								56f4fa10fd 
								
							 
						 
						
							
							
								
								Sparc instruction opcodes now all live under the `V9' namespace.  
							
							... 
							
							
							
							llvm-svn: 6249 
							
						 
						
							2003-05-20 20:32:24 +00:00  
				
					
						
							
							
								 
						
							
								21d4509d76 
								
							 
						 
						
							
							
								
								IntegerRegSize is always 8 for sparc  
							
							... 
							
							
							
							llvm-svn: 5961 
							
						 
						
							2003-04-26 19:44:35 +00:00  
				
					
						
							
							
								 
						
							
								efbae9cff1 
								
							 
						 
						
							
							
								
								Fix obvious type-o  
							
							... 
							
							
							
							llvm-svn: 5932 
							
						 
						
							2003-04-25 05:23:10 +00:00  
				
					
						
							
							
								 
						
							
								dea36ca100 
								
							 
						 
						
							
							
								
								Move sparc specific code into the Sparc backend  
							
							... 
							
							
							
							llvm-svn: 5317 
							
						 
						
							2003-01-15 21:36:50 +00:00  
				
					
						
							
							
								 
						
							
								e58cd301cd 
								
							 
						 
						
							
							
								
								Use BuildMI more  
							
							... 
							
							
							
							llvm-svn: 5299 
							
						 
						
							2003-01-15 19:23:34 +00:00  
				
					
						
							
							
								 
						
							
								1ebaa90f48 
								
							 
						 
						
							
							
								
								Use BuildMI more, Create*Instruction less  
							
							... 
							
							
							
							llvm-svn: 5291 
							
						 
						
							2003-01-15 17:47:49 +00:00  
				
					
						
							
							
								 
						
							
								71aa7afc27 
								
							 
						 
						
							
							
								
								* Elimiante a bunch of functions from InstrSelectionSupport.h, replacing users  
							
							... 
							
							
							
							of them with BUildMI calls instead.
* Fix def information in instructions generated by prologepilog inserter
llvm-svn: 5287 
							
						 
						
							2003-01-15 00:03:28 +00:00  
				
					
						
							
							
								 
						
							
								b4d58d7f9e 
								
							 
						 
						
							
							
								
								Rename MachineInstrInfo -> TargetInstrInfo  
							
							... 
							
							
							
							llvm-svn: 5272 
							
						 
						
							2003-01-14 22:00:31 +00:00  
				
					
						
							
							
								 
						
							
								a41b89a829 
								
							 
						 
						
							
							
								
								* TargetData is no longer directly accessable from TargetMachine  
							
							... 
							
							
							
							* Constpool & frame info is no longer directly in MachineFunction
llvm-svn: 5174 
							
						 
						
							2002-12-28 20:18:21 +00:00  
				
					
						
							
							
								 
						
							
								01efae0bbf 
								
							 
						 
						
							
							
								
								MachineInstrInfo doesn't need a TargetMachine  
							
							... 
							
							
							
							llvm-svn: 4372 
							
						 
						
							2002-10-29 15:45:20 +00:00  
				
					
						
							
							
								 
						
							
								7ae7f84cf3 
								
							 
						 
						
							
							
								
								Changed `MachineCodeForMethod' to `MachineFunction'.  
							
							... 
							
							
							
							llvm-svn: 4301 
							
						 
						
							2002-10-28 00:28:31 +00:00  
				
					
						
							
							
								 
						
							
								69ce8674b5 
								
							 
						 
						
							
							
								
								- Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to  
							
							... 
							
							
							
							reflect the fact that it's a range being defined.
llvm-svn: 4147 
							
						 
						
							2002-10-13 19:39:16 +00:00  
				
					
						
							
							
								 
						
							
								ea31dc707f 
								
							 
						 
						
							
							
								
								Make sure to handle small negative values hiding as large unsigned longs --  
							
							... 
							
							
							
							this is a common case created by the front-end.
llvm-svn: 4127 
							
						 
						
							2002-10-13 00:04:26 +00:00  
				
					
						
							
							
								 
						
							
								40e2347b90 
								
							 
						 
						
							
							
								
								Modify operand order for Create{Sign,Zero}ExtensionInstructions.  
							
							... 
							
							
							
							llvm-svn: 3960 
							
						 
						
							2002-09-27 14:29:45 +00:00  
				
					
						
							
							
								 
						
							
								fff5ffde27 
								
							 
						 
						
							
							
								
								Add methods to query about the representation of LLVM quantities (e.g.,  
							
							... 
							
							
							
							constants).  Useful for target-dependent LLVM transformations like
Preselection.
llvm-svn: 3743 
							
						 
						
							2002-09-16 15:56:01 +00:00  
				
					
						
							
							
								 
						
							
								549489aa77 
								
							 
						 
						
							
							
								
								Bug fixes in casting between floats and ints smaller than 64 bits.  
							
							... 
							
							
							
							Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.
llvm-svn: 3580 
							
						 
						
							2002-09-05 18:33:59 +00:00  
				
					
						
							
							
								 
						
							
								b0b412e66e 
								
							 
						 
						
							
							
								
								- Renamed Type::isIntegral() to Type::isInteger()  
							
							... 
							
							
							
							- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.
llvm-svn: 3574 
							
						 
						
							2002-09-03 01:08:28 +00:00  
				
					
						
							
							
								 
						
							
								4f729affe6 
								
							 
						 
						
							
							
								
								Several bug fixes in casting to signed int values.  
							
							... 
							
							
							
							llvm-svn: 3301 
							
						 
						
							2002-08-13 18:04:08 +00:00  
				
					
						
							
							
								 
						
							
								959a5fbf8e 
								
							 
						 
						
							
							
								
								* Removed extraneous #includes  
							
							... 
							
							
							
							* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes
llvm-svn: 3278 
							
						 
						
							2002-08-09 20:08:06 +00:00  
				
					
						
							
							
								 
						
							
								482ab44175 
								
							 
						 
						
							
							
								
								Bug fix in CreateCodeToLoadConst(): use sign of dest, not operand,  
							
							... 
							
							
							
							in choosing how to create int-set instructions.
llvm-svn: 3248 
							
						 
						
							2002-08-04 20:55:37 +00:00  
				
					
						
							
							
								 
						
							
								c19b1cc168 
								
							 
						 
						
							
							
								
								Just improved comments and assertions.  
							
							... 
							
							
							
							llvm-svn: 3191 
							
						 
						
							2002-07-31 21:13:31 +00:00  
				
					
						
							
							
								 
						
							
								3091e11726 
								
							 
						 
						
							
							
								
								GCC 3.1 changes, finally the burm file builds the FIRST time a clean directory is built.  
							
							... 
							
							
							
							llvm-svn: 3073 
							
						 
						
							2002-07-25 06:08:32 +00:00  
				
					
						
							
							
								 
						
							
								58c904ace6 
								
							 
						 
						
							
							
								
								Major overhaul to stop using pseudo-instructions (SETX, SETUW, SETSW)  
							
							... 
							
							
							
							and generate actual machine instruction sequences directly.
Also a couple of bug fixes in code for putting constants into registers:
-- Do *not* sign-extend unsigned constant that is shorter than int reg size
-- Fix handling of address constant (a GlobalValue) vs. constant that
   must be loaded.
llvm-svn: 2856 
							
						 
						
							2002-07-10 21:39:50 +00:00  
				
					
						
							
							
								 
						
							
								c28c7b9ccf 
								
							 
						 
						
							
							
								
								Remove diff-cluttering tags  
							
							... 
							
							
							
							llvm-svn: 2808 
							
						 
						
							2002-06-30 16:12:03 +00:00  
				
					
						
							
							
								 
						
							
								458496c060 
								
							 
						 
						
							
							
								
								changes to make it compatible with 64bit gcc  
							
							... 
							
							
							
							llvm-svn: 2791 
							
						 
						
							2002-06-25 20:55:50 +00:00  
				
					
						
							
							
								 
						
							
								e9327f0082 
								
							 
						 
						
							
							
								
								Numerous bug fixes:  
							
							... 
							
							
							
							-- correct sign extensions for integer casts and for shift-by-constant
   instructions generated for integer multiply
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect stack frame size when padding a section
-- folding getelementptr operations with mixed array and struct indexes
-- use uint64_t instead of uint for constant offsets in mem operands
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!
Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint
llvm-svn: 2640 
							
						 
						
							2002-05-19 15:25:51 +00:00  
				
					
						
							
							
								 
						
							
								181cc32365 
								
							 
						 
						
							
							
								
								Replace all usages of Type::isPointerType with isa<PointerType>  
							
							... 
							
							
							
							llvm-svn: 2486 
							
						 
						
							2002-05-06 16:15:30 +00:00  
				
					
						
							
							
								 
						
							
								d5a847057b 
								
							 
						 
						
							
							
								
								Eliminate duplicate or unneccesary #include's  
							
							... 
							
							
							
							llvm-svn: 2397 
							
						 
						
							2002-04-29 17:42:12 +00:00  
				
					
						
							
							
								 
						
							
								ca14237696 
								
							 
						 
						
							
							
								
								Split ConstantVals.h into Constant.h and Constants.h  
							
							... 
							
							
							
							llvm-svn: 2378 
							
						 
						
							2002-04-28 19:55:58 +00:00  
				
					
						
							
							
								 
						
							
								62b7fd136e 
								
							 
						 
						
							
							
								
								Change references to the Method class to be references to the Function  
							
							... 
							
							
							
							class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
llvm-svn: 2144 
							
						 
						
							2002-04-07 20:49:59 +00:00  
				
					
						
							
							
								 
						
							
								bd4e68c280 
								
							 
						 
						
							
							
								
								Fix CreateUIntSetInstruction() to handle sign extensions correctly.  
							
							... 
							
							
							
							llvm-svn: 2059 
							
						 
						
							2002-03-31 00:13:12 +00:00  
				
					
						
							
							
								 
						
							
								f9ab087be7 
								
							 
						 
						
							
							
								
								Use distinct names for the three types of SetMachineOperand to  
							
							... 
							
							
							
							avoid painful overloading problems and errors.
llvm-svn: 1893 
							
						 
						
							2002-03-18 03:09:15 +00:00  
				
					
						
							
							
								 
						
							
								f08669fcbc 
								
							 
						 
						
							
							
								
								* Switch to new TmpInstruction model  
							
							... 
							
							
							
							llvm-svn: 1654 
							
						 
						
							2002-02-03 07:49:49 +00:00  
				
					
						
							
							
								 
						
							
								7f74a56e24 
								
							 
						 
						
							
							
								
								Changes to build successfully with GCC 3.02  
							
							... 
							
							
							
							llvm-svn: 1503 
							
						 
						
							2002-01-20 22:54:45 +00:00  
				
					
						
							
							
								 
						
							
								8234b04143 
								
							 
						 
						
							
							
								
								Remove int hack to allow unsigned numbers greater than 2^63 - 1...  
							
							... 
							
							
							
							llvm-svn: 1483 
							
						 
						
							2001-12-15 00:33:36 +00:00  
				
					
						
							
							
								 
						
							
								3462ae3ad7 
								
							 
						 
						
							
							
								
								Rename ConstPoolVal -> Constant  
							
							... 
							
							
							
							Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407 
							
						 
						
							2001-12-03 22:26:30 +00:00  
				
					
						
							
							
								 
						
							
								821b129755 
								
							 
						 
						
							
							
								
								Fix int->float conversion.  
							
							... 
							
							
							
							llvm-svn: 1314 
							
						 
						
							2001-11-15 14:59:56 +00:00  
				
					
						
							
							
								 
						
							
								e6642f93d4 
								
							 
						 
						
							
							
								
								Added function UltraSparcInstrInfo::CreateCodeToCopyFloatToInt.  
							
							... 
							
							
							
							llvm-svn: 1226 
							
						 
						
							2001-11-09 02:16:40 +00:00  
				
					
						
							
							
								 
						
							
								503d3098fa 
								
							 
						 
						
							
							
								
								Added new function UltraSparcInstrInfo::CreateCodeToCopyIntToFloat.  
							
							... 
							
							
							
							Also major overhaul of how stack frame is managed.
llvm-svn: 1193 
							
						 
						
							2001-11-08 04:57:53 +00:00  
				
					
						
							
							
								 
						
							
								2f72cdd756 
								
							 
						 
						
							
							
								
								Generate SETX for 64-bit integers!  
							
							... 
							
							
							
							llvm-svn: 1007 
							
						 
						
							2001-10-28 21:41:46 +00:00  
				
					
						
							
							
								 
						
							
								4cc2b3b155 
								
							 
						 
						
							
							
								
								Moved implementation of class UltraSparcInstrInfo here.  
							
							... 
							
							
							
							llvm-svn: 861 
							
						 
						
							2001-10-18 00:01:48 +00:00