9f829f1cc4 
								
							 
						 
						
							
							
								
								If we have a VLA that has a "use" in a metadata node that's then used  
							
							... 
							
							
							
							here but it has no other uses, then we have a problem. E.g.,
  int foo (const int *x) {
    char a[*x];
    return 0;
  }
If we assign 'a' a vreg and fast isel later on has to use the selection
DAG isel, it will want to copy the value to the vreg. However, there are
no uses, which goes counter to what selection DAG isel expects.
<rdar://problem/11134152>
llvm-svn: 153705 
							
						 
						
							2012-03-30 00:02:55 +00:00  
				
					
						
							
							
								 
						
							
								6a63a74113 
								
							 
						 
						
							
							
								
								[fast-isel] Fold "urem x, pow2" -> "and x, pow2-1".  This should fix the 271%  
							
							... 
							
							
							
							execution-time regression for nsieve-bits on the ARMv7 -O0 -g nightly tester.
This may also improve compile-time on architectures that would otherwise 
generate a libcall for urem (e.g., ARM) or fall back to the DAG selector.
rdar://10810716
llvm-svn: 153230 
							
						 
						
							2012-03-22 00:21:17 +00:00  
				
					
						
							
							
								 
						
							
								60e01c560a 
								
							 
						 
						
							
							
								
								Do everything up to generating code to try to get a register for  
							
							... 
							
							
							
							a variable. The previous code would break the debug info changing
code invariant. This will regress debug info for arguments where
we elide the alloca created.
Fixes rdar://11066468
llvm-svn: 153074 
							
						 
						
							2012-03-20 01:07:58 +00:00  
				
					
						
							
							
								 
						
							
								997aaa9237 
								
							 
						 
						
							
							
								
								Untabify.  
							
							... 
							
							
							
							llvm-svn: 153073 
							
						 
						
							2012-03-20 01:07:56 +00:00  
				
					
						
							
							
								 
						
							
								e5e54c87fa 
								
							 
						 
						
							
							
								
								Add another debugging statement here.  
							
							... 
							
							
							
							llvm-svn: 153072 
							
						 
						
							2012-03-20 01:07:53 +00:00  
				
					
						
							
							
								 
						
							
								1a06cc9ae6 
								
							 
						 
						
							
							
								
								Use lookUpRegForValue here instead of duplicating the code.  
							
							... 
							
							
							
							llvm-svn: 153071 
							
						 
						
							2012-03-20 01:07:47 +00:00  
				
					
						
							
							
								 
						
							
								3390a6e5e3 
								
							 
						 
						
							
							
								
								We actually handle AllocaInst via getRegForValue below just fine.  
							
							... 
							
							
							
							Part of rdar://8905263
llvm-svn: 152845 
							
						 
						
							2012-03-15 21:33:47 +00:00  
				
					
						
							
							
								 
						
							
								142820ba8d 
								
							 
						 
						
							
							
								
								Add some debugging output into fast isel as well.  
							
							... 
							
							
							
							llvm-svn: 152844 
							
						 
						
							2012-03-15 21:33:44 +00:00  
				
					
						
							
							
								 
						
							
								8b98bf2d6b 
								
							 
						 
						
							
							
								
								Properly emit _fltused with FastISel. Refactor to share code with SDAG.  
							
							... 
							
							
							
							Patch by Joe Groff!
llvm-svn: 151183 
							
						 
						
							2012-02-22 19:06:13 +00:00  
				
					
						
							
							
								 
						
							
								760b134ffa 
								
							 
						 
						
							
							
								
								Make all pointers to TargetRegisterClass const since they are all pointers to static data that should not be modified.  
							
							... 
							
							
							
							llvm-svn: 151134 
							
						 
						
							2012-02-22 05:59:10 +00:00  
				
					
						
							
							
								 
						
							
								81e2bf2b77 
								
							 
						 
						
							
							
								
								Ignore the lifetime intrinsics in fast-isel.  
							
							... 
							
							
							
							llvm-svn: 150848 
							
						 
						
							2012-02-17 23:03:39 +00:00  
				
					
						
							
							
								 
						
							
								6d68c7cf79 
								
							 
						 
						
							
							
								
								[fast-isel] HandlePHINodesInSuccessorBlocks() can promite i8 and i16 types too.  
							
							... 
							
							
							
							llvm-svn: 149730 
							
						 
						
							2012-02-04 00:39:19 +00:00  
				
					
						
							
							
								 
						
							
								8d9d1a0022 
								
							 
						 
						
							
							
								
								Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics.  
							
							... 
							
							
							
							llvm-svn: 149331 
							
						 
						
							2012-01-31 01:58:48 +00:00  
				
					
						
							
							
								 
						
							
								b941674aa4 
								
							 
						 
						
							
							
								
								[fast-isel] Remove SelectInsertValue() as fast-isel wasn't designed to handle  
							
							... 
							
							
							
							instructions that define aggregate types.
llvm-svn: 146492 
							
						 
						
							2011-12-13 17:45:06 +00:00  
				
					
						
							
							
								 
						
							
								3168cabef1 
								
							 
						 
						
							
							
								
								[fast-isel] SelectInsertValue seems to be causing miscompiles for ARM.  Disable while I investigate.  
							
							... 
							
							
							
							llvm-svn: 146331 
							
						 
						
							2011-12-10 21:27:40 +00:00  
				
					
						
							
							
								 
						
							
								f70174b869 
								
							 
						 
						
							
							
								
								Typo.  
							
							... 
							
							
							
							llvm-svn: 146327 
							
						 
						
							2011-12-10 19:48:51 +00:00  
				
					
						
							
							
								 
						
							
								dd998ff4df 
								
							 
						 
						
							
							
								
								[fast-isel] Add support for selecting insertvalue.  
							
							... 
							
							
							
							rdar://10530851
llvm-svn: 146276 
							
						 
						
							2011-12-09 20:09:54 +00:00  
				
					
						
							
							
								 
						
							
								46addb9e07 
								
							 
						 
						
							
							
								
								If fast-isel fails, remove dead instructions generated during the failed  
							
							... 
							
							
							
							attempt.  
llvm-svn: 145425 
							
						 
						
							2011-11-29 19:40:47 +00:00  
				
					
						
							
							
								 
						
							
								61e8d1026f 
								
							 
						 
						
							
							
								
								80-column.  
							
							... 
							
							
							
							llvm-svn: 145267 
							
						 
						
							2011-11-28 19:59:09 +00:00  
				
					
						
							
							
								 
						
							
								f83ab704e4 
								
							 
						 
						
							
							
								
								When fast iseling a GEP, accumulate the offset rather than emitting a series of  
							
							... 
							
							
							
							ADDs.  MaxOffs is used as a threshold to limit the size of the offset. Tradeoffs
being: (1) If we can't materialize the large constant then we'll cause fast-isel
to bail. (2) Too large of an offset can't be directly encoded in the ADD
resulting in a MOV+ADD.  Generally not a bad thing because otherwise we would
have had ADD+ADD, but on Thumb this turns into a MOVS+MOVT+ADD. Working on a fix
for that. (3) Conversely, too low of a threshold we'll miss opportunities to 
coalesce ADDs.
rdar://10412592
llvm-svn: 144886 
							
						 
						
							2011-11-17 07:15:58 +00:00  
				
					
						
							
							
								 
						
							
								ff40b1e164 
								
							 
						 
						
							
							
								
								Add fast-isel stats to determine who's doing all the work, the  
							
							... 
							
							
							
							target-independent selector or the target-specific selector.
llvm-svn: 144833 
							
						 
						
							2011-11-16 21:05:28 +00:00  
				
					
						
							
							
								 
						
							
								291ce47db7 
								
							 
						 
						
							
							
								
								GEPs with all zero indices are trivially coalesced by fast-isel.  For example,  
							
							... 
							
							
							
							%arrayidx135 = getelementptr inbounds [4 x [4 x [4 x [4 x i32]]]]* %M0, i32 0, i64 0
%arrayidx136 = getelementptr inbounds [4 x [4 x [4 x i32]]]* %arrayidx135, i32 0, i64 %idxprom134
Prior to this commit, the GEP instruction that defines %arrayidx136 thought that 
%arrayidx135 was a trivial kill.  The GEP that defines %arrayidx135 doesn't 
generate any code and thus %M0 gets folded into the second GEP.  Thus, we need
to look through GEPs with all zero indices.
rdar://10443319
llvm-svn: 144730 
							
						 
						
							2011-11-15 23:34:05 +00:00  
				
					
						
							
							
								 
						
							
								de239d2647 
								
							 
						 
						
							
							
								
								Fix a thinko that Nick noticed. The previous code actually worked as  
							
							... 
							
							
							
							intended, but only by accident.
llvm-svn: 141779 
							
						 
						
							2011-10-12 15:56:56 +00:00  
				
					
						
							
							
								 
						
							
								9d904e1a97 
								
							 
						 
						
							
							
								
								Directly point debug info to the stack slot of the arugment, instead of trying to keep track of vreg in which it the arugment is copied. The LiveDebugVariable can keep track of variable's ranges.  
							
							... 
							
							
							
							llvm-svn: 139330 
							
						 
						
							2011-09-08 22:59:09 +00:00  
				
					
						
							
							
								 
						
							
								d7cbd4c518 
								
							 
						 
						
							
							
								
								FastISel: avoid function calls between the materialization of the constant and its use.  
							
							... 
							
							
							
							llvm-svn: 137993 
							
						 
						
							2011-08-18 22:06:10 +00:00  
				
					
						
							
							
								 
						
							
								9ab3cac694 
								
							 
						 
						
							
							
								
								Revert r135423.  
							
							... 
							
							
							
							llvm-svn: 135454 
							
						 
						
							2011-07-19 00:28:24 +00:00  
				
					
						
							
							
								 
						
							
								7a16288157 
								
							 
						 
						
							
							
								
								Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity  
							
							... 
							
							
							
							errors like the one corrected by r135261.  Migrate all LLVM callers of the old
constructor to the new one.
llvm-svn: 135431 
							
						 
						
							2011-07-18 21:45:40 +00:00  
				
					
						
							
							
								 
						
							
								4dc76f2438 
								
							 
						 
						
							
							
								
								During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.  
							
							... 
							
							
							
							[take 2]
llvm-svn: 135423 
							
						 
						
							2011-07-18 20:55:23 +00:00  
				
					
						
							
							
								 
						
							
								229907cd11 
								
							 
						 
						
							
							
								
								land David Blaikie's patch to de-constify Type, with a few tweaks.  
							
							... 
							
							
							
							llvm-svn: 135375 
							
						 
						
							2011-07-18 04:54:35 +00:00  
				
					
						
							
							
								 
						
							
								57aa636794 
								
							 
						 
						
							
							
								
								Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.  
							
							... 
							
							
							
							llvm-svn: 135040 
							
						 
						
							2011-07-13 10:26:04 +00:00  
				
					
						
							
							
								 
						
							
								0eada03216 
								
							 
						 
						
							
							
								
								Revert r133953 for now.  
							
							... 
							
							
							
							llvm-svn: 134116 
							
						 
						
							2011-06-29 23:50:13 +00:00  
				
					
						
							
							
								 
						
							
								6cc775f905 
								
							 
						 
						
							
							
								
								- Rename TargetInstrDesc, TargetOperandInfo to MCInstrDesc and MCOperandInfo and  
							
							... 
							
							
							
							sink them into MC layer.
- Added MCInstrInfo, which captures the tablegen generated static data. Chang
TargetInstrInfo so it's based off MCInstrInfo.
llvm-svn: 134021 
							
						 
						
							2011-06-28 19:10:37 +00:00  
				
					
						
							
							
								 
						
							
								4dc034df1d 
								
							 
						 
						
							
							
								
								During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.  
							
							... 
							
							
							
							llvm-svn: 133953 
							
						 
						
							2011-06-27 22:32:04 +00:00  
				
					
						
							
							
								 
						
							
								f071d72c44 
								
							 
						 
						
							
							
								
								Handle debug info for  i128 constants.  
							
							... 
							
							
							
							llvm-svn: 133821 
							
						 
						
							2011-06-24 20:46:11 +00:00  
				
					
						
							
							
								 
						
							
								bd375f1a3f 
								
							 
						 
						
							
							
								
								PR10077: fix fast-isel of extractvalue of aggregate constants.  
							
							... 
							
							
							
							llvm-svn: 132676 
							
						 
						
							2011-06-06 05:46:34 +00:00  
				
					
						
							
							
								 
						
							
								c70355195c 
								
							 
						 
						
							
							
								
								Rewrite fast-isel integer cast handling to handle more cases, and to be simpler and more consistent.  
							
							... 
							
							
							
							The practical effects here are that x86-64 fast-isel can now handle trunc from i8 to i1, and ARM fast-isel can handle many more constructs involving integers narrower than 32 bits (including loads, stores, and many integer casts).
rdar://9437928 .
llvm-svn: 132099 
							
						 
						
							2011-05-25 23:49:02 +00:00  
				
					
						
							
							
								 
						
							
								a4d4a0162d 
								
							 
						 
						
							
							
								
								Make fast-isel work correctly s/uadd.with.overflow intrinsics.  
							
							... 
							
							
							
							llvm-svn: 131420 
							
						 
						
							2011-05-16 21:06:17 +00:00  
				
					
						
							
							
								 
						
							
								4c08bb450a 
								
							 
						 
						
							
							
								
								Fix silly typo.  
							
							... 
							
							
							
							llvm-svn: 131419 
							
						 
						
							2011-05-16 20:34:53 +00:00  
				
					
						
							
							
								 
						
							
								9ac944774f 
								
							 
						 
						
							
							
								
								Basic fast-isel of extractvalue.  Not too helpful on its own, given the IR clang generates for cases like this, but it should become more useful soon.  
							
							... 
							
							
							
							llvm-svn: 131417 
							
						 
						
							2011-05-16 20:27:46 +00:00  
				
					
						
							
							
								 
						
							
								8f1e11cde9 
								
							 
						 
						
							
							
								
								Fix a FIXME by moving the fast-isel implementation of the objectsize intrinsic from the x86 code to the generic code.  
							
							... 
							
							
							
							llvm-svn: 131332 
							
						 
						
							2011-05-14 00:47:51 +00:00  
				
					
						
							
							
								 
						
							
								68b6b0efb0 
								
							 
						 
						
							
							
								
								Allow FastISel of three-register-operand instructions.  
							
							... 
							
							
							
							llvm-svn: 130934 
							
						 
						
							2011-05-05 17:59:04 +00:00  
				
					
						
							
							
								 
						
							
								4105ed1523 
								
							 
						 
						
							
							
								
								Make FastEmit_ri_ try a bit harder to succeed for supported operations; FastEmit_i can fail for non-Thumb2 ARM.  Makes ARMSimplifyAddress work correctly, and reduces the number of fast-isel bailouts on non-Thumb ARM.  
							
							... 
							
							
							
							llvm-svn: 130560 
							
						 
						
							2011-04-29 23:34:52 +00:00  
				
					
						
							
							
								 
						
							
								33c133919a 
								
							 
						 
						
							
							
								
								Fix a silly mistake in r130338.  
							
							... 
							
							
							
							llvm-svn: 130360 
							
						 
						
							2011-04-28 00:42:03 +00:00  
				
					
						
							
							
								 
						
							
								406c471b69 
								
							 
						 
						
							
							
								
								Make the fast-isel code for literal 0.0 a bit shorter/faster, since 0.0 is common.  rdar://problem/9303592 .  
							
							... 
							
							
							
							llvm-svn: 130338 
							
						 
						
							2011-04-27 22:41:55 +00:00  
				
					
						
							
							
								 
						
							
								121d27e9e4 
								
							 
						 
						
							
							
								
								Remove unused function.  
							
							... 
							
							
							
							llvm-svn: 130337 
							
						 
						
							2011-04-27 22:21:02 +00:00  
				
					
						
							
							
								 
						
							
								7da91aee83 
								
							 
						 
						
							
							
								
								Fast-isel support for simple inline asms.  
							
							... 
							
							
							
							llvm-svn: 130205 
							
						 
						
							2011-04-26 17:18:34 +00:00  
				
					
						
							
							
								 
						
							
								dd450b86cf 
								
							 
						 
						
							
							
								
								Teach FastISel to deal with instructions that have two immediate operands.  
							
							... 
							
							
							
							llvm-svn: 130033 
							
						 
						
							2011-04-22 23:38:06 +00:00  
				
					
						
							
							
								 
						
							
								91328b317b 
								
							 
						 
						
							
							
								
								Implement support for x86 fastisel of small fixed-sized memcpys, which are generated  
							
							... 
							
							
							
							en-mass for C++ PODs.  On my c++ test file, this cuts the fast isel rejects by 10x 
and shrinks the generated .s file by 5%
llvm-svn: 129755 
							
						 
						
							2011-04-19 05:52:03 +00:00  
				
					
						
							
							
								 
						
							
								48f75ad678 
								
							 
						 
						
							
							
								
								while we're at it, handle 'sdiv exact' of a power of 2 also,  
							
							... 
							
							
							
							this fixes a few rejects on c++ iterator loops.
llvm-svn: 129694 
							
						 
						
							2011-04-18 07:00:40 +00:00  
				
					
						
							
							
								 
						
							
								562d6e82bd 
								
							 
						 
						
							
							
								
								fix rdar://9297011 - udiv by power of two causing fast-isel rejects  
							
							... 
							
							
							
							llvm-svn: 129693 
							
						 
						
							2011-04-18 06:55:51 +00:00