7258dcd77f 
								
							 
						 
						
							
							
								
								Revert 101465, it broke internal OpenGL testing.  
							
							... 
							
							
							
							Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579 
							
						 
						
							2010-04-16 23:37:20 +00:00  
				
					
						
							
							
								 
						
							
								f375520f7b 
								
							 
						 
						
							
							
								
								reapply r101434  
							
							... 
							
							
							
							with a fix for self-hosting
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101465 
							
						 
						
							2010-04-16 15:33:14 +00:00  
				
					
						
							
							
								 
						
							
								403e9694f9 
								
							 
						 
						
							
							
								
								back out r101423 and r101397, they break llvm-gcc self-host on darwin10  
							
							... 
							
							
							
							llvm-svn: 101434 
							
						 
						
							2010-04-16 01:16:20 +00:00  
				
					
						
							
							
								 
						
							
								33ae80bff7 
								
							 
						 
						
							
							
								
								reapply r101364, which has been backed out in r101368  
							
							... 
							
							
							
							with a fix
rotate CallInst operands, i.e. move callee to the back
of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101397 
							
						 
						
							2010-04-15 20:51:13 +00:00  
				
					
						
							
							
								 
						
							
								9fd00c7d25 
								
							 
						 
						
							
							
								
								back out r101364, as it trips the linux nightlybot on some clang C++ tests  
							
							... 
							
							
							
							llvm-svn: 101368 
							
						 
						
							2010-04-15 12:46:56 +00:00  
				
					
						
							
							
								 
						
							
								aafd209632 
								
							 
						 
						
							
							
								
								rotate CallInst operands, i.e. move callee to the back  
							
							... 
							
							
							
							of the operand array
the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary
llvm-svn: 101364 
							
						 
						
							2010-04-15 10:49:53 +00:00  
				
					
						
							
							
								 
						
							
								c576ee9040 
								
							 
						 
						
							
							
								
								Reapply address space patch after fixing an issue in MemCopyOptimizer.  
							
							... 
							
							
							
							Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
llvm-svn: 100304 
							
						 
						
							2010-04-04 03:10:48 +00:00  
				
					
						
							
							
								 
						
							
								999c1b927b 
								
							 
						 
						
							
							
								
								Revert r100191 since it breaks objc in clang  
							
							... 
							
							
							
							llvm-svn: 100199 
							
						 
						
							2010-04-02 18:43:02 +00:00  
				
					
						
							
							
								 
						
							
								a972ab8564 
								
							 
						 
						
							
							
								
								Reapply address space patch after fixing an issue in MemCopyOptimizer.  
							
							... 
							
							
							
							Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
llvm-svn: 100191 
							
						 
						
							2010-04-02 18:04:15 +00:00  
				
					
						
							
							
								 
						
							
								6f7fd28824 
								
							 
						 
						
							
							
								
								Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.  
							
							... 
							
							
							
							llvm-svn: 99948 
							
						 
						
							2010-03-30 22:27:04 +00:00  
				
					
						
							
							
								 
						
							
								7460571381 
								
							 
						 
						
							
							
								
								Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,  
							
							... 
							
							
							
							e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.
llvm-svn: 99928 
							
						 
						
							2010-03-30 20:55:56 +00:00  
				
					
						
							
							
								 
						
							
								c12c2d9bb4 
								
							 
						 
						
							
							
								
								Move OptChkCall off LibCallOptimization into StrCpyOpt.  
							
							... 
							
							
							
							llvm-svn: 99418 
							
						 
						
							2010-03-24 20:19:04 +00:00  
				
					
						
							
							
								 
						
							
								d9e822345c 
								
							 
						 
						
							
							
								
								Teach simplify libcall to transform __strcpy_chk to __memcpy_chk to enable optimizations down stream.  
							
							... 
							
							
							
							llvm-svn: 99282 
							
						 
						
							2010-03-23 15:48:04 +00:00  
				
					
						
							
							
								 
						
							
								f2e4b5dd7f 
								
							 
						 
						
							
							
								
								str[r]chr returns its pointer argument so we cannot mark it as nocapture. Thanks to Duncan for spotting my mistake.  
							
							... 
							
							
							
							llvm-svn: 98671 
							
						 
						
							2010-03-16 20:33:15 +00:00  
				
					
						
							
							
								 
						
							
								5cf5fd2ffa 
								
							 
						 
						
							
							
								
								Mark str[r]chr readonly.  
							
							... 
							
							
							
							llvm-svn: 98663 
							
						 
						
							2010-03-16 19:36:43 +00:00  
				
					
						
							
							
								 
						
							
								a7fb58f5f5 
								
							 
						 
						
							
							
								
								Migrate _chk call lowering from SimplifyLibCalls to InstCombine. Stub  
							
							... 
							
							
							
							out the remainder of the calls that we should lower in some way and
move the tests to the new correct directory. Fix up tests that are now
optimized more than they were before by -instcombine.
llvm-svn: 97875 
							
						 
						
							2010-03-06 10:50:38 +00:00  
				
					
						
							
							
								 
						
							
								87abfc506f 
								
							 
						 
						
							
							
								
								Move SimplifyLibCalls's LibCall builders to a separate file so they  
							
							... 
							
							
							
							can be used in more places.  Add an argument for the TargetData that
most of them need. Update for the getInt8PtrTy() change.  Should be
no functionality change.
llvm-svn: 97844 
							
						 
						
							2010-03-05 22:25:30 +00:00  
				
					
						
							
							
								 
						
							
								d214ed0e75 
								
							 
						 
						
							
							
								
								Safely turn memset_chk etc. to non-chk variant if the known object size is >= memset / memcpy / memmove size.  
							
							... 
							
							
							
							llvm-svn: 97828 
							
						 
						
							2010-03-05 20:59:47 +00:00  
				
					
						
							
							
								 
						
							
								4899cbc77d 
								
							 
						 
						
							
							
								
								Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.  
							
							... 
							
							
							
							No functionality change.
llvm-svn: 97793 
							
						 
						
							2010-03-05 06:58:57 +00:00  
				
					
						
							
							
								 
						
							
								19d0b47b1f 
								
							 
						 
						
							
							
								
								There are two ways of checking for a given type, for example isa<PointerType>(T)  
							
							... 
							
							
							
							and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344 
							
						 
						
							2010-02-16 11:11:14 +00:00  
				
					
						
							
							
								 
						
							
								9dff9bec31 
								
							 
						 
						
							
							
								
								Uniformize the names of type predicates: rather than having isFloatTy and  
							
							... 
							
							
							
							isInteger, we now have isFloatTy and isIntegerTy.  Requested by Chris!
llvm-svn: 96223 
							
						 
						
							2010-02-15 16:12:20 +00:00  
				
					
						
							
							
								 
						
							
								d86233c118 
								
							 
						 
						
							
							
								
								Recommit this, looks like it wasn't the cause.  
							
							... 
							
							
							
							llvm-svn: 95165 
							
						 
						
							2010-02-03 00:21:58 +00:00  
				
					
						
							
							
								 
						
							
								e67d01a9a8 
								
							 
						 
						
							
							
								
								Hopefully temporarily revert this.  
							
							... 
							
							
							
							llvm-svn: 95154 
							
						 
						
							2010-02-02 23:01:31 +00:00  
				
					
						
							
							
								 
						
							
								4264e7e46f 
								
							 
						 
						
							
							
								
								Re-add strcmp and known size object size checking optimization.  
							
							... 
							
							
							
							Passed bootstrap and nightly test run here.
llvm-svn: 95145 
							
						 
						
							2010-02-02 22:10:43 +00:00  
				
					
						
							
							
								 
						
							
								14dfc3f6df 
								
							 
						 
						
							
							
								
								Don't need to check the last argument since it'll always be bool. We also  
							
							... 
							
							
							
							don't use TargetData here.
llvm-svn: 95040 
							
						 
						
							2010-02-02 00:51:45 +00:00  
				
					
						
							
							
								 
						
							
								9afa973203 
								
							 
						 
						
							
							
								
								More indentation/tabification fixes.  
							
							... 
							
							
							
							llvm-svn: 95036 
							
						 
						
							2010-02-02 00:13:06 +00:00  
				
					
						
							
							
								 
						
							
								1408234753 
								
							 
						 
						
							
							
								
								Untabify previous commit.  
							
							... 
							
							
							
							llvm-svn: 95035 
							
						 
						
							2010-02-02 00:06:55 +00:00  
				
					
						
							
							
								 
						
							
								56e4182c49 
								
							 
						 
						
							
							
								
								Formatting.  
							
							... 
							
							
							
							llvm-svn: 95027 
							
						 
						
							2010-02-01 23:25:03 +00:00  
				
					
						
							
							
								 
						
							
								5a0e174863 
								
							 
						 
						
							
							
								
								Revert my last couple of patches. They appear to have broken bison.  
							
							... 
							
							
							
							llvm-svn: 94841 
							
						 
						
							2010-01-29 21:16:24 +00:00  
				
					
						
							
							
								 
						
							
								9b3c02b7da 
								
							 
						 
						
							
							
								
								Make strcpy_chk lower to strcpy if we have a safe size.  
							
							... 
							
							
							
							llvm-svn: 94783 
							
						 
						
							2010-01-29 01:37:11 +00:00  
				
					
						
							
							
								 
						
							
								ba7cd4c393 
								
							 
						 
						
							
							
								
								Reapply 94059 while fixing the calling convention setup  
							
							... 
							
							
							
							for strcpy.
llvm-svn: 94287 
							
						 
						
							2010-01-23 05:29:06 +00:00  
				
					
						
							
							
								 
						
							
								6c0c8d41b4 
								
							 
						 
						
							
							
								
								Revert 94059.  It is breaking the MultiSource/Benchmarks/Prolangs-C/bison  
							
							... 
							
							
							
							test on ARM.
llvm-svn: 94198 
							
						 
						
							2010-01-22 19:16:40 +00:00  
				
					
						
							
							
								 
						
							
								fa863258d0 
								
							 
						 
						
							
							
								
								Add strcpy_chk -> strcpy support for "don't know" object size  
							
							... 
							
							
							
							answers.  This will update as object size checking gets better information.
llvm-svn: 94059 
							
						 
						
							2010-01-21 01:04:38 +00:00  
				
					
						
							
							
								 
						
							
								2cdb806fd8 
								
							 
						 
						
							
							
								
								Move the object size intrinsic optimization to inst-combine and make  
							
							... 
							
							
							
							it work for any integer size return type.
llvm-svn: 92853 
							
						 
						
							2010-01-06 20:04:44 +00:00  
				
					
						
							
							
								 
						
							
								40d2429b28 
								
							 
						 
						
							
							
								
								Formatting.  
							
							... 
							
							
							
							llvm-svn: 92831 
							
						 
						
							2010-01-06 09:20:39 +00:00  
				
					
						
							
							
								 
						
							
								d2564e3afb 
								
							 
						 
						
							
							
								
								Move remaining stuff to the isInteger predicate.  
							
							... 
							
							
							
							llvm-svn: 92771 
							
						 
						
							2010-01-05 21:05:54 +00:00  
				
					
						
							
							
								 
						
							
								9ddc6e2e12 
								
							 
						 
						
							
							
								
								Change errs() to dbgs().  
							
							... 
							
							
							
							llvm-svn: 92615 
							
						 
						
							2010-01-05 01:27:21 +00:00  
				
					
						
							
							
								 
						
							
								6a8ac8ce8f 
								
							 
						 
						
							
							
								
								80-col violations, trailing whitespace.  
							
							... 
							
							
							
							llvm-svn: 92470 
							
						 
						
							2010-01-04 07:55:25 +00:00  
				
					
						
							
							
								 
						
							
								1a32ede6fd 
								
							 
						 
						
							
							
								
								move an optimization for memcmp out of simplifylibcalls and into  
							
							... 
							
							
							
							SDISel.  This optimization was causing simplifylibcalls to 
introduce type-unsafe nastiness.  This is the first step, I'll be 
expanding the memcmp optimizations shortly, covering things that
we really really wouldn't want simplifylibcalls to do.
llvm-svn: 92098 
							
						 
						
							2009-12-24 00:37:38 +00:00  
				
					
						
							
							
								 
						
							
								efebb234b7 
								
							 
						 
						
							
							
								
								reorder to follow a normal fall-through style, no functionality change.  
							
							... 
							
							
							
							llvm-svn: 92084 
							
						 
						
							2009-12-23 23:24:51 +00:00  
				
					
						
							
							
								 
						
							
								fdb33458fc 
								
							 
						 
						
							
							
								
								Update objectsize intrinsic and associated dependencies. Fix  
							
							... 
							
							
							
							lowering code and update testcases.
llvm-svn: 91979 
							
						 
						
							2009-12-23 02:51:48 +00:00  
				
					
						
							
							
								 
						
							
								ab6a0d60d5 
								
							 
						 
						
							
							
								
								Whitespace fixes.  
							
							... 
							
							
							
							llvm-svn: 91875 
							
						 
						
							2009-12-22 01:23:51 +00:00  
				
					
						
							
							
								 
						
							
								f278addbdc 
								
							 
						 
						
							
							
								
								reapply my strstr optimization.  I have reproduced the x86-64 bootstrap  
							
							... 
							
							
							
							miscompile (i386.o miscompares) but it happens both with and without
this patch.
llvm-svn: 91532 
							
						 
						
							2009-12-16 09:32:05 +00:00  
				
					
						
							
							
								 
						
							
								177be32334 
								
							 
						 
						
							
							
								
								revert my strstr optimization, I'm told it breaks x86-64 bootstrap.  
							
							... 
							
							
							
							Will reapply with a fix when I get a chance.
llvm-svn: 91486 
							
						 
						
							2009-12-16 00:46:02 +00:00  
				
					
						
							
							
								 
						
							
								26ab363361 
								
							 
						 
						
							
							
								
								optimize strstr, PR5783  
							
							... 
							
							
							
							llvm-svn: 91438 
							
						 
						
							2009-12-15 19:14:40 +00:00  
				
					
						
							
							
								 
						
							
								24aba42d04 
								
							 
						 
						
							
							
								
								add some other xforms that should be done as part of PR5783  
							
							... 
							
							
							
							llvm-svn: 91428 
							
						 
						
							2009-12-15 09:05:13 +00:00  
				
					
						
							
							
								 
						
							
								eea42c7b51 
								
							 
						 
						
							
							
								
								tidy up, remove dependence on order of evaluation of function args from EmitMemCpy.  
							
							... 
							
							
							
							llvm-svn: 90297 
							
						 
						
							2009-12-02 06:05:42 +00:00  
				
					
						
							
							
								 
						
							
								0c7bd96de2 
								
							 
						 
						
							
							
								
								Add more optimizations for object size checking, enable handling of  
							
							... 
							
							
							
							object size intrinsic and verify return type is correct. Collect various
code in one place.
llvm-svn: 89523 
							
						 
						
							2009-11-21 01:01:30 +00:00  
				
					
						
							
							
								 
						
							
								f87c75706f 
								
							 
						 
						
							
							
								
								Revert "Add some rough optimizations for checking routines.", it buildeth not.  
							
							... 
							
							
							
							llvm-svn: 89482 
							
						 
						
							2009-11-20 20:17:30 +00:00  
				
					
						
							
							
								 
						
							
								cf97d01dff 
								
							 
						 
						
							
							
								
								Add some rough optimizations for checking routines.  
							
							... 
							
							
							
							llvm-svn: 89479 
							
						 
						
							2009-11-20 19:57:37 +00:00  
				
					
						
							
							
								 
						
							
								e5de4a9ad6 
								
							 
						 
						
							
							
								
								CreateIntCast takes an "isSigned" parameter.  Pass "true" for it, rather than  
							
							... 
							
							
							
							a name.
llvm-svn: 88908 
							
						 
						
							2009-11-16 12:32:28 +00:00  
				
					
						
							
							
								 
						
							
								feeabde753 
								
							 
						 
						
							
							
								
								fix PR5104: when printing a single character, return the result of  
							
							... 
							
							
							
							putchar in case there is an error.
llvm-svn: 86515 
							
						 
						
							2009-11-09 04:57:04 +00:00  
				
					
						
							
							
								 
						
							
								b971445ab7 
								
							 
						 
						
							
							
								
								Teach SimplifyLibCalls to fold memcmp calls with constant arguments.  
							
							... 
							
							
							
							llvm-svn: 86141 
							
						 
						
							2009-11-05 17:44:22 +00:00  
				
					
						
							
							
								 
						
							
								7a50b280c1 
								
							 
						 
						
							
							
								
								Add objectsize intrinsic and hook it up through codegen. Doesn't  
							
							... 
							
							
							
							do anything than return "I don't know" at the moment.
llvm-svn: 85189 
							
						 
						
							2009-10-27 00:52:25 +00:00  
				
					
						
							
							
								 
						
							
								5b741f3d14 
								
							 
						 
						
							
							
								
								80-column and whitespace fixes.  
							
							... 
							
							
							
							llvm-svn: 83489 
							
						 
						
							2009-10-07 21:14:25 +00:00  
				
					
						
							
							
								 
						
							
								9ed7b16bf3 
								
							 
						 
						
							
							
								
								Introduce and use convenience methods for getting pointer types  
							
							... 
							
							
							
							where the element is of a basic builtin type.  For example, to get
an i8* use getInt8PtrTy.
llvm-svn: 83379 
							
						 
						
							2009-10-06 15:40:36 +00:00  
				
					
						
							
							
								 
						
							
								fdd8790718 
								
							 
						 
						
							
							
								
								strength reduce a ton of type equality tests to check the typeid (Through  
							
							... 
							
							
							
							the new predicates I added) instead of going through a context and doing a
pointer comparison.  Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.
llvm-svn: 83297 
							
						 
						
							2009-10-05 05:54:46 +00:00  
				
					
						
							
							
								 
						
							
								62995c71a2 
								
							 
						 
						
							
							
								
								Fix SimplifyLibCalls to transfer attributes from callees rather than  
							
							... 
							
							
							
							calls, since direct calls don't always reflect the attributes of their
callees.
llvm-svn: 82867 
							
						 
						
							2009-09-26 18:10:13 +00:00  
				
					
						
							
							
								 
						
							
								394468dc8e 
								
							 
						 
						
							
							
								
								Rename ConstantFP's getInf to getInfinity.  
							
							... 
							
							
							
							llvm-svn: 82823 
							
						 
						
							2009-09-25 23:40:21 +00:00  
				
					
						
							
							
								 
						
							
								5ffd53892d 
								
							 
						 
						
							
							
								
								Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which is  
							
							... 
							
							
							
							typically faster then doing a general pow.
llvm-svn: 82819 
							
						 
						
							2009-09-25 23:10:17 +00:00  
				
					
						
							
							
								 
						
							
								5d034499ad 
								
							 
						 
						
							
							
								
								Enhance transform passes so that they apply the same tranforms to malloc calls as to MallocInst.  
							
							... 
							
							
							
							Reviewed by Dan Gohman.
llvm-svn: 82300 
							
						 
						
							2009-09-18 22:35:49 +00:00  
				
					
						
							
							
								 
						
							
								27266f164f 
								
							 
						 
						
							
							
								
								In C++, code is not allowed to call main.  In C it is, this  
							
							... 
							
							
							
							simplifylibcalls optimization is thus valid for C++ but not C.
It's not important enough to worry about for C++ apps, so just
remove it.
rdar://7191924
llvm-svn: 80887 
							
						 
						
							2009-09-03 05:19:59 +00:00  
				
					
						
							
							
								 
						
							
								2dd09dbdf7 
								
							 
						 
						
							
							
								
								eliminate VISIBILITY_HIDDEN from Transforms/Scalar.  PR4861  
							
							... 
							
							
							
							llvm-svn: 80766 
							
						 
						
							2009-09-02 06:11:42 +00:00  
				
					
						
							
							
								 
						
							
								dea2358c68 
								
							 
						 
						
							
							
								
								Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden  
							
							... 
							
							
							
							before performing optimizations based on constant string values.
llvm-svn: 79384 
							
						 
						
							2009-08-19 00:11:12 +00:00  
				
					
						
							
							
								 
						
							
								9f2b3db428 
								
							 
						 
						
							
							
								
								Make TargetData optional in SimplifyLibCalls.  
							
							... 
							
							
							
							llvm-svn: 79298 
							
						 
						
							2009-08-18 00:48:13 +00:00  
				
					
						
							
							
								 
						
							
								55f1c09e31 
								
							 
						 
						
							
							
								
								Push LLVMContexts through the IntegerType APIs.  
							
							... 
							
							
							
							llvm-svn: 78948 
							
						 
						
							2009-08-13 21:58:54 +00:00  
				
					
						
							
							
								 
						
							
								5a1acd9912 
								
							 
						 
						
							
							
								
								Move a few more APIs back to 2.5 forms.  The only remaining ones left to change back are  
							
							... 
							
							
							
							metadata related, which I'm waiting on to avoid conflicting with Devang.
llvm-svn: 77721 
							
						 
						
							2009-07-31 20:28:14 +00:00  
				
					
						
							
							
								 
						
							
								4056ca9568 
								
							 
						 
						
							
							
								
								Move types back to the 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77516 
							
						 
						
							2009-07-29 22:17:13 +00:00  
				
					
						
							
							
								 
						
							
								98ddd164d8 
								
							 
						 
						
							
							
								
								Fix PR4645 which was fallout from the fix for PR4641.  
							
							... 
							
							
							
							- Call RAUW to delete all instructions (this is a patch from Nick Lewycky).
llvm-svn: 77512 
							
						 
						
							2009-07-29 22:00:43 +00:00  
				
					
						
							
							
								 
						
							
								487375e9a2 
								
							 
						 
						
							
							
								
								Move ConstantExpr to 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77494 
							
						 
						
							2009-07-29 18:55:55 +00:00  
				
					
						
							
							
								 
						
							
								f82326b984 
								
							 
						 
						
							
							
								
								Bulk erasing instructions without RAUWing them is unsafe. Instead, break them  
							
							... 
							
							
							
							into a new BB that has no predecessors.
llvm-svn: 77433 
							
						 
						
							2009-07-29 05:17:50 +00:00  
				
					
						
							
							
								 
						
							
								c2c7932c64 
								
							 
						 
						
							
							
								
								Change ConstantArray to 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77347 
							
						 
						
							2009-07-28 18:32:17 +00:00  
				
					
						
							
							
								 
						
							
								69c464dec4 
								
							 
						 
						
							
							
								
								Move ConstantFP construction back to the 2.5-ish API.  
							
							... 
							
							
							
							llvm-svn: 77247 
							
						 
						
							2009-07-27 20:59:43 +00:00  
				
					
						
							
							
								 
						
							
								ca414c7cae 
								
							 
						 
						
							
							
								
								Remove Value::getNameLen  
							
							... 
							
							
							
							llvm-svn: 77148 
							
						 
						
							2009-07-26 08:34:35 +00:00  
				
					
						
							
							
								 
						
							
								9813b0b025 
								
							 
						 
						
							
							
								
								Eliminate some uses of DOUT, cerr, and getNameStart().  
							
							... 
							
							
							
							llvm-svn: 77145 
							
						 
						
							2009-07-26 07:49:05 +00:00  
				
					
						
							
							
								 
						
							
								e03eecb75f 
								
							 
						 
						
							
							
								
								Remove Value::{isName, getNameRef}.  
							
							... 
							
							
							
							Also, change MDString to use a StringRef.
llvm-svn: 77098 
							
						 
						
							2009-07-25 23:55:21 +00:00  
				
					
						
							
							
								 
						
							
								edb4a70325 
								
							 
						 
						
							
							
								
								Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types.  More to come.  
							
							... 
							
							
							
							llvm-svn: 77011 
							
						 
						
							2009-07-24 23:12:02 +00:00  
				
					
						
							
							
								 
						
							
								5bf72e20eb 
								
							 
						 
						
							
							
								
								Convert StringMap to using StringRef for its APIs.  
							
							... 
							
							
							
							- Yay for '-'s and simplifications!
 - I kept StringMap::GetOrCreateValue for compatibility purposes, this can
   eventually go away. Likewise the StringMapEntry Create functions still follow
   the old style.
 - NIFC.
llvm-svn: 76888 
							
						 
						
							2009-07-23 18:17:34 +00:00  
				
					
						
							
							
								 
						
							
								47db941fd3 
								
							 
						 
						
							
							
								
								Get rid of the Pass+Context magic.  
							
							... 
							
							
							
							llvm-svn: 76702 
							
						 
						
							2009-07-22 00:24:57 +00:00  
				
					
						
							
							
								 
						
							
								ff9bf97ceb 
								
							 
						 
						
							
							
								
								Fix simplifylibcalls memset recognition to work on 64-bit platforms  
							
							... 
							
							
							
							where int is 32 bits.
llvm-svn: 76293 
							
						 
						
							2009-07-18 08:34:51 +00:00  
				
					
						
							
							
								 
						
							
								20b34ac794 
								
							 
						 
						
							
							
								
								Move the ConstantInt uniquing table into LLVMContextImpl.  This exposed a number of issues in  
							
							... 
							
							
							
							our current context-passing stuff, which is also fixed here
llvm-svn: 76089 
							
						 
						
							2009-07-16 18:04:31 +00:00  
				
					
						
							
							
								 
						
							
								542619e6d5 
								
							 
						 
						
							
							
								
								Move more functionality over to LLVMContext.  
							
							... 
							
							
							
							llvm-svn: 75497 
							
						 
						
							2009-07-13 20:58:05 +00:00  
				
					
						
							
							
								 
						
							
								a771459bb1 
								
							 
						 
						
							
							
								
								Push LLVMContext _back_ through IRBuilder.  
							
							... 
							
							
							
							llvm-svn: 75040 
							
						 
						
							2009-07-08 20:50:47 +00:00  
				
					
						
							
							
								 
						
							
								b17f32945f 
								
							 
						 
						
							
							
								
								Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.  
							
							... 
							
							
							
							llvm-svn: 75025 
							
						 
						
							2009-07-08 19:03:57 +00:00  
				
					
						
							
							
								 
						
							
								5948fdf68b 
								
							 
						 
						
							
							
								
								Push LLVMContext through GlobalVariables and IRBuilder.  
							
							... 
							
							
							
							llvm-svn: 74985 
							
						 
						
							2009-07-08 01:26:06 +00:00  
				
					
						
							
							
								 
						
							
								340288c621 
								
							 
						 
						
							
							
								
								Even more passes being LLVMContext'd.  
							
							... 
							
							
							
							llvm-svn: 74781 
							
						 
						
							2009-07-03 19:42:02 +00:00  
				
					
						
							
							
								 
						
							
								87a222c5c8 
								
							 
						 
						
							
							
								
								part of PR4405: disable a contentious optimization for  
							
							... 
							
							
							
							strcmp -> memcmp when the lengths of the strings are unknown.
Patch by Nick Lewycky!
llvm-svn: 73751 
							
						 
						
							2009-06-19 04:17:36 +00:00  
				
					
						
							
							
								 
						
							
								6ee547bb1b 
								
							 
						 
						
							
							
								
								Revert IRBuilder CC propagation. Fix SimplifyLibCalls instead.  
							
							... 
							
							
							
							llvm-svn: 73715 
							
						 
						
							2009-06-18 20:05:31 +00:00  
				
					
						
							
							
								 
						
							
								a5b9645c4b 
								
							 
						 
						
							
							
								
								Split the Add, Sub, and Mul instruction opcodes into separate  
							
							... 
							
							
							
							integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt 
llvm-svn: 72897 
							
						 
						
							2009-06-04 22:49:04 +00:00  
				
					
						
							
							
								 
						
							
								221895303c 
								
							 
						 
						
							
							
								
								fix PR4284, a bug in simplifylibcalls handling memcmp.  Patch by  
							
							... 
							
							
							
							Benjamin Kramer!
llvm-svn: 72625 
							
						 
						
							2009-05-30 18:43:04 +00:00  
				
					
						
							
							
								 
						
							
								7e335a763a 
								
							 
						 
						
							
							
								
								Fix PR4206 - crash in simplify lib calls  
							
							... 
							
							
							
							llvm-svn: 71644 
							
						 
						
							2009-05-13 06:26:11 +00:00  
				
					
						
							
							
								 
						
							
								6cd82fb430 
								
							 
						 
						
							
							
								
								"There was a typo in my previous patch which leads to miscompilation of  
							
							... 
							
							
							
							strncat :(
strncat(foo, "bar", 99)
would be optimized to
memcpy(foo+strlen(foo), "bar", 100, 1)
instead of
memcpy(foo+strlen(foo), "bar", 4, 1)"
Patch by Benjamin Kramer!
llvm-svn: 68905 
							
						 
						
							2009-04-12 18:22:33 +00:00  
				
					
						
							
							
								 
						
							
								91b6af24ac 
								
							 
						 
						
							
							
								
								add some optimizations for strncpy/strncat and factor some  
							
							... 
							
							
							
							code.  Patch by Benjamin Kramer!
llvm-svn: 68885 
							
						 
						
							2009-04-12 05:06:39 +00:00  
				
					
						
							
							
								 
						
							
								01aa6ec97a 
								
							 
						 
						
							
							
								
								Let the strcat optimizer return the pointer to the start of the buffer,  
							
							... 
							
							
							
							instead of the place where it started to perform the string copy.
- PR3661
- Patch by Benjamin Kramer!
llvm-svn: 68443 
							
						 
						
							2009-04-06 13:06:48 +00:00  
				
					
						
							
							
								 
						
							
								fa54bc2052 
								
							 
						 
						
							
							
								
								Oops...I committed too much.  
							
							... 
							
							
							
							llvm-svn: 66867 
							
						 
						
							2009-03-13 04:39:26 +00:00  
				
					
						
							
							
								 
						
							
								b02eadf660 
								
							 
						 
						
							
							
								
								Temporarily XFAIL this test.  
							
							... 
							
							
							
							llvm-svn: 66866 
							
						 
						
							2009-03-13 04:37:11 +00:00  
				
					
						
							
							
								 
						
							
								8f4a097f15 
								
							 
						 
						
							
							
								
								Update the list of function annotations for nocapture. All of these came up  
							
							... 
							
							
							
							when I was looking at functions used by python.
Highlights include, better largefile support (64-bit file sizes on 32-bit
systems), fputs string is nocapture, popen/pclose added (popen being noalias
return), modf and frexp and friends. Also added some missing 'break' statements
and combined identical sections.
llvm-svn: 64615 
							
						 
						
							2009-02-15 22:47:25 +00:00  
				
					
						
							
							
								 
						
							
								d234a845f9 
								
							 
						 
						
							
							
								
								Mark strto* as readonly when the endptr is null.  
							
							... 
							
							
							
							llvm-svn: 64460 
							
						 
						
							2009-02-13 17:08:33 +00:00  
				
					
						
							
							
								 
						
							
								a0e83a0952 
								
							 
						 
						
							
							
								
								On strtod and friends, mark 'endptr' nocapture in the function prototype, and  
							
							... 
							
							
							
							mark the first argument nocapture if endptr=NULL for each particular call.
llvm-svn: 64453 
							
						 
						
							2009-02-13 15:31:46 +00:00  
				
					
						
							
							
								 
						
							
								b92c4d72a7 
								
							 
						 
						
							
							
								
								Don't mark all args to strtod and friends as nocapture.  
							
							... 
							
							
							
							llvm-svn: 64352 
							
						 
						
							2009-02-12 03:18:34 +00:00