c94d86c4ad 
								
							 
						 
						
							
							
								
								Whitespace cleanup.  
							
							... 
							
							
							
							llvm-svn: 156034 
							
						 
						
							2012-05-02 23:43:23 +00:00  
				
					
						
							
							
								 
						
							
								274ba89d77 
								
							 
						 
						
							
							
								
								The value held in the vector may be RAUW'ed by some of the canonicalization  
							
							... 
							
							
							
							methods. Use a weak value handle to keep up with this.
PR12245
llvm-svn: 155984 
							
						 
						
							2012-05-02 09:59:45 +00:00  
				
					
						
							
							
								 
						
							
								739ef80fd7 
								
							 
						 
						
							
							
								
								Teach the reassociate pass to fold chains of multiplies with repeated  
							
							... 
							
							
							
							elements to minimize the number of multiplies required to compute the
final result. This uses a heuristic to attempt to form near-optimal
binary exponentiation-style multiply chains. While there are some cases
it misses, it seems to at least a decent job on a very diverse range of
inputs.
Initial benchmarks show no interesting regressions, and an 8%
improvement on SPASS. Let me know if any other interesting results (in
either direction) crop up!
Credit to Richard Smith for the core algorithm, and helping code the
patch itself.
llvm-svn: 155616 
							
						 
						
							2012-04-26 05:30:30 +00:00  
				
					
						
							
							
								 
						
							
								6e80c28017 
								
							 
						 
						
							
							
								
								Prune some includes and forward declarations.  
							
							... 
							
							
							
							llvm-svn: 153429 
							
						 
						
							2012-03-26 06:58:25 +00:00  
				
					
						
							
							
								 
						
							
								a41634e307 
								
							 
						 
						
							
							
								
								Silence a bunch (but not all) "variable written but not read" warnings  
							
							... 
							
							
							
							when building with assertions disabled.
llvm-svn: 137460 
							
						 
						
							2011-08-12 14:54:45 +00:00  
				
					
						
							
							
								 
						
							
								bddf40e082 
								
							 
						 
						
							
							
								
								Revert r136503 and r136480 in an effort to fix non-determinism in the llvm-gcc buildbots on i386.  Devang is looking into the root cause.  
							
							... 
							
							
							
							llvm-svn: 136674 
							
						 
						
							2011-08-02 02:23:42 +00:00  
				
					
						
							
							
								 
						
							
								ce0ceebb1c 
								
							 
						 
						
							
							
								
								Clear DbgValues in the end.  
							
							... 
							
							
							
							llvm-svn: 136503 
							
						 
						
							2011-07-29 19:49:58 +00:00  
				
					
						
							
							
								 
						
							
								3e02522fee 
								
							 
						 
						
							
							
								
								Clean up debug info after reassociation.  
							
							... 
							
							
							
							llvm-svn: 136480 
							
						 
						
							2011-07-29 19:00:35 +00:00  
				
					
						
							
							
								 
						
							
								b1a1512119 
								
							 
						 
						
							
							
								
								start using the new helper methods a bit.  
							
							... 
							
							
							
							llvm-svn: 135251 
							
						 
						
							2011-07-15 06:08:15 +00:00  
				
					
						
							
							
								 
						
							
								80d1d3aaec 
								
							 
						 
						
							
							
								
								Preserve line number information.  
							
							... 
							
							
							
							llvm-svn: 130450 
							
						 
						
							2011-04-28 22:48:14 +00:00  
				
					
						
							
							
								 
						
							
								1c6c34834b 
								
							 
						 
						
							
							
								
								Fix reassociate to use a worklist instead of recursing when new  
							
							... 
							
							
							
							reassociation opportunities are exposed. This fixes a bug where
the nested reassociation expects to be the IR to be consistent,
but it isn't, because the outer reassociation has disconnected
some of the operands.  rdar://9167457
llvm-svn: 129324 
							
						 
						
							2011-04-12 00:11:56 +00:00  
				
					
						
							
							
								 
						
							
								affbc66f60 
								
							 
						 
						
							
							
								
								RecursivelyDeleteTriviallyDeadInstructions only needs a  
							
							... 
							
							
							
							Value, not an Instruction, so casting is not necessary. Also,
it's theoretically possible that the Value is not an
Instruction, since WeakVH follows RAUWs.
llvm-svn: 127427 
							
						 
						
							2011-03-10 20:57:44 +00:00  
				
					
						
							
							
								 
						
							
								154ed49784 
								
							 
						 
						
							
							
								
								Fix reassociate to postpone certain instruction deletions until  
							
							... 
							
							
							
							after it has finished all of its reassociations, because its
habit of unlinking operands and holding them in a datastructure
while working means that it's not easy to determine when an
instruction is really dead until after all its regular work is
done. rdar://9096268.
llvm-svn: 127424 
							
						 
						
							2011-03-10 19:51:54 +00:00  
				
					
						
							
							
								 
						
							
								3eb0af94c4 
								
							 
						 
						
							
							
								
								fix PR9215, preventing -reassociate from clearing nsw/nuw when  
							
							... 
							
							
							
							it swaps the LHS/RHS of a single binop.
llvm-svn: 125700 
							
						 
						
							2011-02-17 01:29:24 +00:00  
				
					
						
							
							
								 
						
							
								08d2c98c23 
								
							 
						 
						
							
							
								
								Fix reassociate to clear optional flags, such as nsw.  
							
							... 
							
							
							
							llvm-svn: 124712 
							
						 
						
							2011-02-02 02:02:34 +00:00  
				
					
						
							
							
								 
						
							
								69bdb585b2 
								
							 
						 
						
							
							
								
								Fix PR9039, a use-after-free in reassociate.  The issue was that the  
							
							... 
							
							
							
							operand being factorized (and erased) could occur several times in Ops,
resulting in freed memory being used when the next occurrence in Ops was
analyzed.
llvm-svn: 124287 
							
						 
						
							2011-01-26 10:08:38 +00:00  
				
					
						
							
							
								 
						
							
								6c18d1aac0 
								
							 
						 
						
							
							
								
								Get rid of static constructors for pass registration.  Instead, every pass exposes an initializeMyPassFunction(), which  
							
							... 
							
							
							
							must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820 
							
						 
						
							2010-10-19 17:21:58 +00:00  
				
					
						
							
							
								 
						
							
								df7a4f2515 
								
							 
						 
						
							
							
								
								Now with fewer extraneous semicolons!  
							
							... 
							
							
							
							llvm-svn: 115996 
							
						 
						
							2010-10-07 22:25:06 +00:00  
				
					
						
							
							
								 
						
							
								a7aed18624 
								
							 
						 
						
							
							
								
								Reapply r110396, with fixes to appease the Linux buildbot gods.  
							
							... 
							
							
							
							llvm-svn: 110460 
							
						 
						
							2010-08-06 18:33:48 +00:00  
				
					
						
							
							
								 
						
							
								bda59bd247 
								
							 
						 
						
							
							
								
								Revert r110396 to fix buildbots.  
							
							... 
							
							
							
							llvm-svn: 110410 
							
						 
						
							2010-08-06 00:23:35 +00:00  
				
					
						
							
							
								 
						
							
								755aceb5d0 
								
							 
						 
						
							
							
								
								Don't use PassInfo* as a type identifier for passes.  Instead, use the address of the static  
							
							... 
							
							
							
							ID member as the sole unique type identifier.  Clean up APIs related to this change.
llvm-svn: 110396 
							
						 
						
							2010-08-05 23:42:04 +00:00  
				
					
						
							
							
								 
						
							
								a57b97e7e7 
								
							 
						 
						
							
							
								
								Fix batch of converting RegisterPass<> to INTIALIZE_PASS().  
							
							... 
							
							
							
							llvm-svn: 109045 
							
						 
						
							2010-07-21 22:09:45 +00:00  
				
					
						
							
							
								 
						
							
								782f62412f 
								
							 
						 
						
							
							
								
								cache dereferenced iterators  
							
							... 
							
							
							
							llvm-svn: 108138 
							
						 
						
							2010-07-12 12:03:02 +00:00  
				
					
						
							
							
								 
						
							
								c6c1523f59 
								
							 
						 
						
							
							
								
								fix a nice subtle reassociate bug which would only occur  
							
							... 
							
							
							
							in a very specific use pattern embodied in the carefully
reduced testcase.
llvm-svn: 97794 
							
						 
						
							2010-03-05 07:18:54 +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  
				
					
						
							
							
								 
						
							
								4a618827de 
								
							 
						 
						
							
							
								
								Fix "the the" and similar typos.  
							
							... 
							
							
							
							llvm-svn: 95781 
							
						 
						
							2010-02-10 16:03:48 +00:00  
				
					
						
							
							
								 
						
							
								27dfb1e1a4 
								
							 
						 
						
							
							
								
								Do not reassociate expressions with i1 type.  SimplifyCFG converts some  
							
							... 
							
							
							
							short-circuited conditions to AND/OR expressions, and those expressions
are often converted back to a short-circuited form in code gen.  The
original source order may have been optimized to take advantage of the
expected values, and if we reassociate them, we change the order and
subvert that optimization.  Radar 7497329.
llvm-svn: 95333 
							
						 
						
							2010-02-04 23:32:37 +00:00  
				
					
						
							
							
								 
						
							
								ab7087ad66 
								
							 
						 
						
							
							
								
								only factor from expressions whose uses are empty and whose  
							
							... 
							
							
							
							base is the right expression type.  This fixes PR5981.
llvm-svn: 93045 
							
						 
						
							2010-01-09 06:01:36 +00:00  
				
					
						
							
							
								 
						
							
								4a8b15dc74 
								
							 
						 
						
							
							
								
								Suppress an unused variable warning when assertions are off;  
							
							... 
							
							
							
							remove some trailing whitespace while there.
llvm-svn: 93008 
							
						 
						
							2010-01-08 17:51:48 +00:00  
				
					
						
							
							
								 
						
							
								f741d72b84 
								
							 
						 
						
							
							
								
								fix an infinite loop in reassociate building emacs.  
							
							... 
							
							
							
							llvm-svn: 92679 
							
						 
						
							2010-01-05 04:55:35 +00:00  
				
					
						
							
							
								 
						
							
								d17c3916d0 
								
							 
						 
						
							
							
								
								Change errs() to dbgs().  
							
							... 
							
							
							
							llvm-svn: 92617 
							
						 
						
							2010-01-05 01:27:24 +00:00  
				
					
						
							
							
								 
						
							
								e199d2df80 
								
							 
						 
						
							
							
								
								theoretically the negate we find could be in a different function, check  
							
							... 
							
							
							
							for this case.
llvm-svn: 92425 
							
						 
						
							2010-01-02 21:46:33 +00:00  
				
					
						
							
							
								 
						
							
								0c59ac3f41 
								
							 
						 
						
							
							
								
								When factoring multiply expressions across adds, factor both  
							
							... 
							
							
							
							positive and negative forms of constants together.  This 
allows us to compile:
int foo(int x, int y) {
    return (x-y) + (x-y) + (x-y);
}
into:
_foo:                                                       ## @foo
	subl	%esi, %edi
	leal	(%rdi,%rdi,2), %eax
	ret
instead of (where the 3 and -3 were not factored):
_foo:
        imull   $-3, 8(%esp), %ecx
        imull   $3, 4(%esp), %eax
        addl    %ecx, %eax
        ret
this started out as:
    movl    12(%ebp), %ecx
    imull   $3, 8(%ebp), %eax
    subl    %ecx, %eax
    subl    %ecx, %eax
    subl    %ecx, %eax
    ret
This comes from PR5359.
llvm-svn: 92381 
							
						 
						
							2010-01-01 01:13:15 +00:00  
				
					
						
							
							
								 
						
							
								a552683fd4 
								
							 
						 
						
							
							
								
								clean up some comments.  
							
							... 
							
							
							
							llvm-svn: 92377 
							
						 
						
							2010-01-01 00:04:26 +00:00  
				
					
						
							
							
								 
						
							
								17229a7cb8 
								
							 
						 
						
							
							
								
								switch from std::map to DenseMap for rank data structures.  
							
							... 
							
							
							
							llvm-svn: 92375 
							
						 
						
							2010-01-01 00:01:34 +00:00  
				
					
						
							
							
								 
						
							
								fed3397654 
								
							 
						 
						
							
							
								
								reuse negates where possible instead of always creating them from scratch.  
							
							... 
							
							
							
							This allows us to optimize test12 into:
define i32 @test12(i32 %X) {
  %factor = mul i32 %X, -3                        ; <i32> [#uses=1]
  %Z = add i32 %factor, 6                         ; <i32> [#uses=1]
  ret i32 %Z
}
instead of:
define i32 @test12(i32 %X) {
  %Y = sub i32 6, %X                              ; <i32> [#uses=1]
  %C = sub i32 %Y, %X                             ; <i32> [#uses=1]
  %Z = sub i32 %C, %X                             ; <i32> [#uses=1]
  ret i32 %Z
}
llvm-svn: 92373 
							
						 
						
							2009-12-31 20:34:32 +00:00  
				
					
						
							
							
								 
						
							
								60c2ca743d 
								
							 
						 
						
							
							
								
								we don't need a smallptrset to detect duplicates, the values are  
							
							... 
							
							
							
							sorted, so we can just do a linear scan.
llvm-svn: 92372 
							
						 
						
							2009-12-31 19:49:01 +00:00  
				
					
						
							
							
								 
						
							
								1d8979422a 
								
							 
						 
						
							
							
								
								make reassociate more careful about not leaving around dead mul's  
							
							... 
							
							
							
							llvm-svn: 92370 
							
						 
						
							2009-12-31 19:34:45 +00:00  
				
					
						
							
							
								 
						
							
								ed18917665 
								
							 
						 
						
							
							
								
								remove debug  
							
							... 
							
							
							
							llvm-svn: 92369 
							
						 
						
							2009-12-31 19:25:19 +00:00  
				
					
						
							
							
								 
						
							
								60b71b5c4d 
								
							 
						 
						
							
							
								
								teach reassociate to factor x+x+x -> x*3.  While I'm at it,  
							
							... 
							
							
							
							fix RemoveDeadBinaryOp to actually do something.
llvm-svn: 92368 
							
						 
						
							2009-12-31 19:24:52 +00:00  
				
					
						
							
							
								 
						
							
								38abecbad0 
								
							 
						 
						
							
							
								
								change reassociate to use SmallVector for its key datastructures  
							
							... 
							
							
							
							instead of std::vector.
llvm-svn: 92366 
							
						 
						
							2009-12-31 18:40:32 +00:00  
				
					
						
							
							
								 
						
							
								ac61550504 
								
							 
						 
						
							
							
								
								change an if to an assert, fix comment.  
							
							... 
							
							
							
							llvm-svn: 92364 
							
						 
						
							2009-12-31 18:18:46 +00:00  
				
					
						
							
							
								 
						
							
								177140ad12 
								
							 
						 
						
							
							
								
								move the rest of the add optimization code out to OptimizeAdd,  
							
							... 
							
							
							
							improve some comments, simplify a bit of code.
llvm-svn: 92363 
							
						 
						
							2009-12-31 18:17:13 +00:00  
				
					
						
							
							
								 
						
							
								ba1f36aa99 
								
							 
						 
						
							
							
								
								factor statistic updating better.  
							
							... 
							
							
							
							llvm-svn: 92362 
							
						 
						
							2009-12-31 17:51:05 +00:00  
				
					
						
							
							
								 
						
							
								4e3a5678af 
								
							 
						 
						
							
							
								
								simple fix for an incorrect factoring which causes a  
							
							... 
							
							
							
							miscompilation, PR5458.
llvm-svn: 92354 
							
						 
						
							2009-12-31 08:33:49 +00:00  
				
					
						
							
							
								 
						
							
								5f8a005d38 
								
							 
						 
						
							
							
								
								factor code out into helper functions.  
							
							... 
							
							
							
							llvm-svn: 92347 
							
						 
						
							2009-12-31 07:59:34 +00:00  
				
					
						
							
							
								 
						
							
								f5c2b8b8d7 
								
							 
						 
						
							
							
								
								switch some std::vector's to smallvector.  Reduce nesting.  
							
							... 
							
							
							
							llvm-svn: 92346 
							
						 
						
							2009-12-31 07:48:51 +00:00  
				
					
						
							
							
								 
						
							
								9039ff8912 
								
							 
						 
						
							
							
								
								use more modern datastructures.  
							
							... 
							
							
							
							llvm-svn: 92344 
							
						 
						
							2009-12-31 07:33:14 +00:00  
				
					
						
							
							
								 
						
							
								bc1512c8d1 
								
							 
						 
						
							
							
								
								clean up -debug output.  
							
							... 
							
							
							
							llvm-svn: 92343 
							
						 
						
							2009-12-31 07:17:37 +00:00  
				
					
						
							
							
								 
						
							
								7935bcb0fe 
								
							 
						 
						
							
							
								
								Remove LLVMContext from reassociate. It was threaded through every function but  
							
							... 
							
							
							
							ultimately never used.
llvm-svn: 88763 
							
						 
						
							2009-11-14 07:25:54 +00:00  
				
					
						
							
							
								 
						
							
								be9e179104 
								
							 
						 
						
							
							
								
								Make changes to rev 84292 as requested by Chris Lattner.  
							
							... 
							
							
							
							Most changes are cleanup, but there is 1 correctness fix:
I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects).
llvm-svn: 84772 
							
						 
						
							2009-10-21 19:11:40 +00:00  
				
					
						
							
							
								 
						
							
								a3aaf85e23 
								
							 
						 
						
							
							
								
								Remove MallocInst from LLVM Instructions.  
							
							... 
							
							
							
							llvm-svn: 84299 
							
						 
						
							2009-10-17 01:18:07 +00:00  
				
					
						
							
							
								 
						
							
								c7d6a8327c 
								
							 
						 
						
							
							
								
								Autoupgrade malloc insts to malloc calls.  
							
							... 
							
							
							
							Update testcases that rely on malloc insts being present.
Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step.
llvm-svn: 84292 
							
						 
						
							2009-10-17 00:00:19 +00:00  
				
					
						
							
							
								 
						
							
								8b4d3dfbbf 
								
							 
						 
						
							
							
								
								calls are already unmovable, malloc doesn't need a special case.  
							
							... 
							
							
							
							llvm-svn: 82933 
							
						 
						
							2009-09-27 21:36:19 +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  
				
					
						
							
							
								 
						
							
								2dd09dbdf7 
								
							 
						 
						
							
							
								
								eliminate VISIBILITY_HIDDEN from Transforms/Scalar.  PR4861  
							
							... 
							
							
							
							llvm-svn: 80766 
							
						 
						
							2009-09-02 06:11:42 +00:00  
				
					
						
							
							
								 
						
							
								3924bb5792 
								
							 
						 
						
							
							
								
								remove the std::ostream version of module and type printing.  
							
							... 
							
							
							
							llvm-svn: 79823 
							
						 
						
							2009-08-23 04:52:46 +00:00  
				
					
						
							
							
								 
						
							
								b25de3ff60 
								
							 
						 
						
							
							
								
								eliminate the "Value" printing methods that print to a std::ostream.  
							
							... 
							
							
							
							This required converting a bunch of stuff off DOUT and other cleanups.
llvm-svn: 79819 
							
						 
						
							2009-08-23 04:37:46 +00:00  
				
					
						
							
							
								 
						
							
								8dd69f88ea 
								
							 
						 
						
							
							
								
								Fix debug output to include a newline after printing a Value, now  
							
							... 
							
							
							
							that Value's operator<< doesn't include one.
llvm-svn: 79240 
							
						 
						
							2009-08-17 15:25:05 +00:00  
				
					
						
							
							
								 
						
							
								5476cfdb15 
								
							 
						 
						
							
							
								
								Remove a bunch more now-unnecessary Context arguments.  
							
							... 
							
							
							
							llvm-svn: 78809 
							
						 
						
							2009-08-12 16:23:25 +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  
				
					
						
							
							
								 
						
							
								b292b8ce70 
								
							 
						 
						
							
							
								
								Move more code back to 2.5 APIs.  
							
							... 
							
							
							
							llvm-svn: 77635 
							
						 
						
							2009-07-30 23:03:37 +00:00  
				
					
						
							
							
								 
						
							
								487375e9a2 
								
							 
						 
						
							
							
								
								Move ConstantExpr to 2.5 API.  
							
							... 
							
							
							
							llvm-svn: 77494 
							
						 
						
							2009-07-29 18:55:55 +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  
				
					
						
							
							
								 
						
							
								47db941fd3 
								
							 
						 
						
							
							
								
								Get rid of the Pass+Context magic.  
							
							... 
							
							
							
							llvm-svn: 76702 
							
						 
						
							2009-07-22 00:24:57 +00:00  
				
					
						
							
							
								 
						
							
								bb2501bbbe 
								
							 
						 
						
							
							
								
								These don't really need contexts either.  
							
							... 
							
							
							
							llvm-svn: 75528 
							
						 
						
							2009-07-13 22:18:28 +00:00  
				
					
						
							
							
								 
						
							
								542619e6d5 
								
							 
						 
						
							
							
								
								Move more functionality over to LLVMContext.  
							
							... 
							
							
							
							llvm-svn: 75497 
							
						 
						
							2009-07-13 20:58:05 +00:00  
				
					
						
							
							
								 
						
							
								53a52215b5 
								
							 
						 
						
							
							
								
								Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.  
							
							... 
							
							
							
							This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.
llvm-svn: 75445 
							
						 
						
							2009-07-13 04:09:18 +00:00  
				
					
						
							
							
								 
						
							
								38264b1554 
								
							 
						 
						
							
							
								
								"LLVMContext* " --> "LLVMContext *"  
							
							... 
							
							
							
							llvm-svn: 74878 
							
						 
						
							2009-07-06 23:00:19 +00:00  
				
					
						
							
							
								 
						
							
								340288c621 
								
							 
						 
						
							
							
								
								Even more passes being LLVMContext'd.  
							
							... 
							
							
							
							llvm-svn: 74781 
							
						 
						
							2009-07-03 19:42:02 +00:00  
				
					
						
							
							
								 
						
							
								f72ce6ea8b 
								
							 
						 
						
							
							
								
								Make the key of ValueRankMap an AssertingVH, so that we die violently  
							
							... 
							
							
							
							if it dangles.
llvm-svn: 68150 
							
						 
						
							2009-03-31 22:13:29 +00:00  
				
					
						
							
							
								 
						
							
								52bc2aac8a 
								
							 
						 
						
							
							
								
								This pass keeps a map of Instructions to Rank numbers,  
							
							... 
							
							
							
							and was deleting Instructions without clearing the
corresponding map entry.  This led to nondeterministic
behavior if the same address got allocated to another
Instruction within a short time.
llvm-svn: 67306 
							
						 
						
							2009-03-19 17:22:53 +00:00  
				
					
						
							
							
								 
						
							
								fb1caf3e1f 
								
							 
						 
						
							
							
								
								Don't assign rank numbers to debug intrinsic "calls".  
							
							... 
							
							
							
							This is needed so debug info doesn't change codegen.
llvm-svn: 66235 
							
						 
						
							2009-03-06 01:41:59 +00:00  
				
					
						
							
							
								 
						
							
								702f45df58 
								
							 
						 
						
							
							
								
								Fix build failure.  
							
							... 
							
							
							
							llvm-svn: 59844 
							
						 
						
							2008-11-21 21:00:20 +00:00  
				
					
						
							
							
								 
						
							
								cb181bb203 
								
							 
						 
						
							
							
								
								Silence unused variable warnings.  
							
							... 
							
							
							
							llvm-svn: 59841 
							
						 
						
							2008-11-21 20:00:59 +00:00  
				
					
						
							
							
								 
						
							
								a79db30d28 
								
							 
						 
						
							
							
								
								Tidy up several unbeseeming casts from pointer to intptr_t.  
							
							... 
							
							
							
							llvm-svn: 55779 
							
						 
						
							2008-09-04 17:05:41 +00:00  
				
					
						
							
							
								 
						
							
								57693dda1d 
								
							 
						 
						
							
							
								
								don't use the result of WriteAsOperand  
							
							... 
							
							
							
							llvm-svn: 54979 
							
						 
						
							2008-08-19 04:45:19 +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  
				
					
						
							
							
								 
						
							
								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  
				
					
						
							
							
								 
						
							
								9988569af8 
								
							 
						 
						
							
							
								
								Don't include <map> in Pass.h, which doesn't need it. This requires  
							
							... 
							
							
							
							adding <map> to many files that actually do need it.
llvm-svn: 48667 
							
						 
						
							2008-03-21 23:51:57 +00:00  
				
					
						
							
							
								 
						
							
								0e7fd2f1a8 
								
							 
						 
						
							
							
								
								simplify some code, BreakUpSubtract always returns nonnull now.  
							
							... 
							
							
							
							llvm-svn: 47251 
							
						 
						
							2008-02-18 02:18:25 +00:00  
				
					
						
							
							
								 
						
							
								5f08ec854f 
								
							 
						 
						
							
							
								
								fix pasto  
							
							... 
							
							
							
							llvm-svn: 47242 
							
						 
						
							2008-02-17 20:54:40 +00:00  
				
					
						
							
							
								 
						
							
								a70d138457 
								
							 
						 
						
							
							
								
								Split up subtracts into add+negate if they have a reassociable use or operand  
							
							... 
							
							
							
							that is also a subtract.  This implements PR2047 and Transforms/Reassociate/subtest2.ll 
llvm-svn: 47241 
							
						 
						
							2008-02-17 20:51:26 +00:00  
				
					
						
							
							
								 
						
							
								902537cd8d 
								
							 
						 
						
							
							
								
								make the logic for breaking up subtracts more explicit, no  
							
							... 
							
							
							
							functionality change.
llvm-svn: 47239 
							
						 
						
							2008-02-17 20:44:51 +00:00  
				
					
						
							
							
								 
						
							
								70de4cb1cd 
								
							 
						 
						
							
							
								
								Use empty() instead of comparing size() with zero.  
							
							... 
							
							
							
							llvm-svn: 46514 
							
						 
						
							2008-01-29 13:02:09 +00:00  
				
					
						
							
							
								 
						
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
				
					
						
							
							
								 
						
							
								e7da2d6ac3 
								
							 
						 
						
							
							
								
								Fix typo in comment.  
							
							... 
							
							
							
							llvm-svn: 36873 
							
						 
						
							2007-05-06 13:37:16 +00:00  
				
					
						
							
							
								 
						
							
								8c78a0bff0 
								
							 
						 
						
							
							
								
								Drop 'const'  
							
							... 
							
							
							
							llvm-svn: 36662 
							
						 
						
							2007-05-03 01:11:54 +00:00  
				
					
						
							
							
								 
						
							
								e95c6ad802 
								
							 
						 
						
							
							
								
								Use 'static const char' instead of 'static const int'.  
							
							... 
							
							
							
							Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652 
							
						 
						
							2007-05-02 21:39:20 +00:00  
				
					
						
							
							
								 
						
							
								09f162ca6a 
								
							 
						 
						
							
							
								
								Do not use typeinfo to identify pass in pass manager.  
							
							... 
							
							
							
							llvm-svn: 36632 
							
						 
						
							2007-05-01 21:15:47 +00:00  
				
					
						
							
							
								 
						
							
								2e54a15943 
								
							 
						 
						
							
							
								
								Prefer non-virtual calls to ConstantInt::isZero over virtual calls to  
							
							... 
							
							
							
							Constant::isNullValue() in situations where it is possible.
llvm-svn: 34821 
							
						 
						
							2007-03-02 00:28:52 +00:00  
				
					
						
							
							
								 
						
							
								17797076ef 
								
							 
						 
						
							
							
								
								Use isUnitValue() instead of getZExtValue() == 1 which will prevent an  
							
							... 
							
							
							
							assert if the ConstantInt's value is large.
llvm-svn: 34814 
							
						 
						
							2007-03-01 21:51:23 +00:00  
				
					
						
							
							
								 
						
							
								d84d35ba70 
								
							 
						 
						
							
							
								
								For PR1195:  
							
							... 
							
							
							
							Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293 
							
						 
						
							2007-02-15 02:26:10 +00:00  
				
					
						
							
							
								 
						
							
								6e0123b17f 
								
							 
						 
						
							
							
								
								Simplify code by using value::takename  
							
							... 
							
							
							
							llvm-svn: 34176 
							
						 
						
							2007-02-11 01:23:03 +00:00  
				
					
						
							
							
								 
						
							
								557ab15e71 
								
							 
						 
						
							
							
								
								Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in  
							
							... 
							
							
							
							the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.
llvm-svn: 33939 
							
						 
						
							2007-02-05 23:32:05 +00:00  
				
					
						
							
							
								 
						
							
								2eadb5310d 
								
							 
						 
						
							
							
								
								For PR970:  
							
							... 
							
							
							
							Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!
llvm-svn: 33415 
							
						 
						
							2007-01-21 00:29:26 +00:00  
				
					
						
							
							
								 
						
							
								03c4953cdd 
								
							 
						 
						
							
							
								
								rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.  
							
							... 
							
							
							
							rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.
This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)
llvm-svn: 33225 
							
						 
						
							2007-01-15 02:27:26 +00:00  
				
					
						
							
							
								 
						
							
								75b871fb1e 
								
							 
						 
						
							
							
								
								For PR1043:  
							
							... 
							
							
							
							Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.
llvm-svn: 33073 
							
						 
						
							2007-01-11 12:24:14 +00:00  
				
					
						
							
							
								 
						
							
								266e42b312 
								
							 
						 
						
							
							
								
								For PR950:  
							
							... 
							
							
							
							This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751 
							
						 
						
							2006-12-23 06:05:41 +00:00