4975db6276 
								
							 
						 
						
							
							
								
								Initial update to VMCore to use Twines for string arguments.  
							
							... 
							
							
							
							- The only meat here is in Value.{h,cpp} the rest is essential 'const
   std::string &' -> 'const Twine &'.
llvm-svn: 77048 
							
						 
						
							2009-07-25 04:41:11 +00:00  
				
					
						
							
							
								 
						
							
								c974225976 
								
							 
						 
						
							
							
								
								Move ExtractElementInst to ::Create instead of new. Update all uses.  
							
							... 
							
							
							
							llvm-svn: 77044 
							
						 
						
							2009-07-25 02:28:41 +00:00  
				
					
						
							
							
								 
						
							
								47db941fd3 
								
							 
						 
						
							
							
								
								Get rid of the Pass+Context magic.  
							
							... 
							
							
							
							llvm-svn: 76702 
							
						 
						
							2009-07-22 00:24:57 +00:00  
				
					
						
							
							
								 
						
							
								fbcc663cbf 
								
							 
						 
						
							
							
								
								llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.  
							
							... 
							
							
							
							This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").
llvm-svn: 75640 
							
						 
						
							2009-07-14 16:55:14 +00:00  
				
					
						
							
							
								 
						
							
								56d0659726 
								
							 
						 
						
							
							
								
								assert(0) -> LLVM_UNREACHABLE.  
							
							... 
							
							
							
							Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.
llvm-svn: 75379 
							
						 
						
							2009-07-11 20:10:48 +00:00  
				
					
						
							
							
								 
						
							
								1e5f00e7a7 
								
							 
						 
						
							
							
								
								This started as a small change, I swear.  Unfortunately, lots of things call the [I|F]CmpInst constructors.  Who knew!?  
							
							... 
							
							
							
							llvm-svn: 75200 
							
						 
						
							2009-07-09 23:48:35 +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  
				
					
						
							
							
								 
						
							
								a79db30d28 
								
							 
						 
						
							
							
								
								Tidy up several unbeseeming casts from pointer to intptr_t.  
							
							... 
							
							
							
							llvm-svn: 55779 
							
						 
						
							2008-09-04 17:05:41 +00:00  
				
					
						
							
							
								 
						
							
								5afc2740b7 
								
							 
						 
						
							
							
								
								Update comments and documentation to reflect that GCSE and ValueNumbering are  
							
							... 
							
							
							
							deprecated by the GVN and GVNPRE passes.
llvm-svn: 51983 
							
						 
						
							2008-06-05 07:55:49 +00:00  
				
					
						
							
							
								 
						
							
								e1f6e4b21d 
								
							 
						 
						
							
							
								
								API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time.  (Merge from use-diet branch.)  
							
							... 
							
							
							
							llvm-svn: 51200 
							
						 
						
							2008-05-16 19:29:10 +00:00  
				
					
						
							
							
								 
						
							
								697e94cc22 
								
							 
						 
						
							
							
								
								Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.  
							
							... 
							
							
							
							llvm-svn: 51143 
							
						 
						
							2008-05-15 10:04:30 +00:00  
				
					
						
							
							
								 
						
							
								d78c400b5b 
								
							 
						 
						
							
							
								
								Clean up the use of static and anonymous namespaces. This turned up  
							
							... 
							
							
							
							several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017 
							
						 
						
							2008-05-13 00:00:25 +00:00  
				
					
						
							
							
								 
						
							
								e9ecc68d8f 
								
							 
						 
						
							
							
								
								API changes for class Use size reduction, wave 1.  
							
							... 
							
							
							
							Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277 
							
						 
						
							2008-04-06 20:25:17 +00:00  
				
					
						
							
							
								 
						
							
								1bfd121321 
								
							 
						 
						
							
							
								
								Make Transforms to be 4.3 warnings-clean  
							
							... 
							
							
							
							llvm-svn: 47371 
							
						 
						
							2008-02-20 11:26:25 +00:00  
				
					
						
							
							
								 
						
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
				
					
						
							
							
								 
						
							
								75470c3bf1 
								
							 
						 
						
							
							
								
								explicit keywords.  
							
							... 
							
							
							
							llvm-svn: 42262 
							
						 
						
							2007-09-24 15:48:49 +00:00  
				
					
						
							
							
								 
						
							
								0625bd6472 
								
							 
						 
						
							
							
								
								Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo  
							
							... 
							
							
							
							Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.
llvm-svn: 42042 
							
						 
						
							2007-09-17 18:34:04 +00:00  
				
					
						
							
							
								 
						
							
								c656cbb8c2 
								
							 
						 
						
							
							
								
								Update GEP constructors to use an iterator interface to fix  
							
							... 
							
							
							
							GLIBCXX_DEBUG issues.
llvm-svn: 41697 
							
						 
						
							2007-09-04 15:46:09 +00:00  
				
					
						
							
							
								 
						
							
								a8ba659976 
								
							 
						 
						
							
							
								
								Fix 80 col. violations.  
							
							... 
							
							
							
							llvm-svn: 40751 
							
						 
						
							2007-08-02 18:20:52 +00:00  
				
					
						
							
							
								 
						
							
								5bd6c3f2c4 
								
							 
						 
						
							
							
								
								Fix a bug where we were marking GEP expressions with the wrong opcode.  
							
							... 
							
							
							
							llvm-svn: 40085 
							
						 
						
							2007-07-20 08:19:20 +00:00  
				
					
						
							
							
								 
						
							
								f9e6542969 
								
							 
						 
						
							
							
								
								Make val_replace fail early, which reduces the time to optimize 403.gcc to 14.8s.  
							
							... 
							
							
							
							llvm-svn: 40064 
							
						 
						
							2007-07-19 19:57:13 +00:00  
				
					
						
							
							
								 
						
							
								6aa17f1def 
								
							 
						 
						
							
							
								
								Use SmallVector and DenseMap in even more places.  
							
							... 
							
							
							
							With this, the time to optimize 403.gcc is down to 15.1s.
llvm-svn: 40042 
							
						 
						
							2007-07-19 06:37:56 +00:00  
				
					
						
							
							
								 
						
							
								75a244d6eb 
								
							 
						 
						
							
							
								
								Change ValueTable to use a DenseMap for mapping expressions to value numbers.  
							
							... 
							
							
							
							This results in a slight speedup for 403.gcc.
llvm-svn: 40040 
							
						 
						
							2007-07-19 06:13:15 +00:00  
				
					
						
							
							
								 
						
							
								6a4ff8549b 
								
							 
						 
						
							
							
								
								Move some sets and maps to SmallPtrSet and DenseMap respectively.  This  
							
							... 
							
							
							
							reduces the time to optimize 403.gcc from 17.6s to 16.4s.
llvm-svn: 40036 
							
						 
						
							2007-07-19 03:32:44 +00:00  
				
					
						
							
							
								 
						
							
								084d3c2e2f 
								
							 
						 
						
							
							
								
								Make the pass registration static.  
							
							... 
							
							
							
							llvm-svn: 38508 
							
						 
						
							2007-07-10 20:20:19 +00:00  
				
					
						
							
							
								 
						
							
								4c4b238448 
								
							 
						 
						
							
							
								
								Move some key maps from std::map to DenseMap.  This improves the time to optimize Anton's testcase from 17.5s  
							
							... 
							
							
							
							to 15.7s.
llvm-svn: 38480 
							
						 
						
							2007-07-10 00:27:22 +00:00  
				
					
						
							
							
								 
						
							
								41c2cab873 
								
							 
						 
						
							
							
								
								Use a cheaper test, delaying calling find_leader() until we know that it's necessary.  This improves  
							
							... 
							
							
							
							the time to optimize Anton's testcase from 21.1s to 17.6s.
llvm-svn: 38479 
							
						 
						
							2007-07-10 00:09:25 +00:00  
				
					
						
							
							
								 
						
							
								7ee197ecf2 
								
							 
						 
						
							
							
								
								Add an assertion if find_leader fails.  
							
							... 
							
							
							
							llvm-svn: 38477 
							
						 
						
							2007-07-09 23:57:18 +00:00  
				
					
						
							
							
								 
						
							
								effc7a7d16 
								
							 
						 
						
							
							
								
								Take advantage of the new fast SmallPtrSet assignment operator when propagating AVAIL_OUT sets.  
							
							... 
							
							
							
							This reduces the time to optimize Anton's testcase from 31.2s to 21.s!
llvm-svn: 38475 
							
						 
						
							2007-07-09 22:29:50 +00:00  
				
					
						
							
							
								 
						
							
								56b01eb3d9 
								
							 
						 
						
							
							
								
								Fix a comment.  
							
							... 
							
							
							
							llvm-svn: 38459 
							
						 
						
							2007-07-09 16:43:55 +00:00  
				
					
						
							
							
								 
						
							
								267ba45249 
								
							 
						 
						
							
							
								
								Improve a hotspot that was making build_sets() slower by calling lookup() too  
							
							... 
							
							
							
							often.  This improves Anton's testcase from 36s to 32s.
llvm-svn: 38441 
							
						 
						
							2007-07-09 07:56:55 +00:00  
				
					
						
							
							
								 
						
							
								1c83b5d999 
								
							 
						 
						
							
							
								
								Start using a set representation that remembers the set of value numbers represented  
							
							... 
							
							
							
							in the set.  For the moment, this results in a slight performance decrease, but
it lays the groundwork for future improvements.
llvm-svn: 38439 
							
						 
						
							2007-07-09 06:50:06 +00:00  
				
					
						
							
							
								 
						
							
								8b99e0ab20 
								
							 
						 
						
							
							
								
								Fix an error where ANTIC_OUT was ending up with more than one expression of  
							
							... 
							
							
							
							the same value number.  This fixes an infinite loop on 444.namd.
llvm-svn: 37967 
							
						 
						
							2007-07-07 20:13:57 +00:00  
				
					
						
							
							
								 
						
							
								7d4bbc1c0c 
								
							 
						 
						
							
							
								
								Be more aggressive in the heuristic.  This mostly exposes more opportunities  
							
							... 
							
							
							
							for the GVN part of GVNPRE to apply.
llvm-svn: 37951 
							
						 
						
							2007-07-06 20:29:43 +00:00  
				
					
						
							
							
								 
						
							
								3c3dd902ec 
								
							 
						 
						
							
							
								
								Achieve what the incorrect test was trying to do by simply requiring that all  
							
							... 
							
							
							
							critical edges be split before we begin.
llvm-svn: 37949 
							
						 
						
							2007-07-06 18:12:36 +00:00  
				
					
						
							
							
								 
						
							
								bcdd7ec4c9 
								
							 
						 
						
							
							
								
								Remove an incorrect check.  
							
							... 
							
							
							
							llvm-svn: 37948 
							
						 
						
							2007-07-06 16:52:47 +00:00  
				
					
						
							
							
								 
						
							
								02e9698293 
								
							 
						 
						
							
							
								
								Fix a bunch of issues found in a testcase from 400.perlbench.  
							
							... 
							
							
							
							llvm-svn: 37929 
							
						 
						
							2007-07-05 23:11:26 +00:00  
				
					
						
							
							
								 
						
							
								ca1a184fd8 
								
							 
						 
						
							
							
								
								Fix another bug, this time in PREing select instructions.  
							
							... 
							
							
							
							llvm-svn: 37878 
							
						 
						
							2007-07-04 22:33:23 +00:00  
				
					
						
							
							
								 
						
							
								cd94fc982a 
								
							 
						 
						
							
							
								
								Fix a typo that was killing GVNPRE of select instructions.  
							
							... 
							
							
							
							llvm-svn: 37871 
							
						 
						
							2007-07-04 18:26:18 +00:00  
				
					
						
							
							
								 
						
							
								664e260a9c 
								
							 
						 
						
							
							
								
								Fix an error in phi translation of GEPs that was causing failures.  
							
							... 
							
							
							
							llvm-svn: 37868 
							
						 
						
							2007-07-04 04:51:16 +00:00  
				
					
						
							
							
								 
						
							
								2e4b6feac2 
								
							 
						 
						
							
							
								
								Add support for performing GVNPRE on GEP instructions.  
							
							... 
							
							
							
							llvm-svn: 37862 
							
						 
						
							2007-07-03 23:51:19 +00:00  
				
					
						
							
							
								 
						
							
								b9a494aea3 
								
							 
						 
						
							
							
								
								Add functionality to value number GEP instructions.  This also provides the infrastructure that will  
							
							... 
							
							
							
							be used for function calls.  NOTE: This does not yet do any transformation of GEPs or function calls.
llvm-svn: 37860 
							
						 
						
							2007-07-03 22:50:56 +00:00  
				
					
						
							
							
								 
						
							
								6b958c72bd 
								
							 
						 
						
							
							
								
								Make the unary operator case a bit faster, since casts are the only kind of unary operation.  
							
							... 
							
							
							
							llvm-svn: 37857 
							
						 
						
							2007-07-03 19:01:42 +00:00  
				
					
						
							
							
								 
						
							
								59bd053fc5 
								
							 
						 
						
							
							
								
								Add support for performing GVNPRE on cast instructions, and add a testcase for this.  
							
							... 
							
							
							
							llvm-svn: 37856 
							
						 
						
							2007-07-03 18:37:08 +00:00  
				
					
						
							
							
								 
						
							
								67799d4ffb 
								
							 
						 
						
							
							
								
								Add support for value numbering (but not actually optimizing) cast instructions.  
							
							... 
							
							
							
							llvm-svn: 37789 
							
						 
						
							2007-06-29 00:51:03 +00:00  
				
					
						
							
							
								 
						
							
								c738f7ca42 
								
							 
						 
						
							
							
								
								Add a type field to expressions in preparation for performing GVNPRE on casts.  
							
							... 
							
							
							
							llvm-svn: 37788 
							
						 
						
							2007-06-29 00:40:05 +00:00  
				
					
						
							
							
								 
						
							
								8a9fa5d081 
								
							 
						 
						
							
							
								
								Add support for performing GVNPRE on select instructions.  This fixes test/Transforms/GVNPRE/select.ll.  
							
							... 
							
							
							
							llvm-svn: 37783 
							
						 
						
							2007-06-28 23:51:21 +00:00  
				
					
						
							
							
								 
						
							
								e02da55cc8 
								
							 
						 
						
							
							
								
								Make many sets a much more reasonable size.  This decreases the time to optimize  
							
							... 
							
							
							
							Anton's testcase from 35.5s to 34.7s.
llvm-svn: 37769 
							
						 
						
							2007-06-28 00:34:34 +00:00  
				
					
						
							
							
								 
						
							
								7dae8efcf2 
								
							 
						 
						
							
							
								
								Use cached information that has already been computed to make clean() simpler and faster.  This is a small speedup on most cases.  
							
							... 
							
							
							
							llvm-svn: 37761 
							
						 
						
							2007-06-27 17:38:29 +00:00  
				
					
						
							
							
								 
						
							
								0eb265729a 
								
							 
						 
						
							
							
								
								Fold a lot of code into two cases: binary instructions and ternary instructions.  
							
							... 
							
							
							
							This saves many lines of code duplication.  No functionality change.
llvm-svn: 37759 
							
						 
						
							2007-06-27 17:03:03 +00:00