14ab84a483 
								
							 
						 
						
							
							
								
								Fix PR223: Loopsimplify incorrectly updates dominator information  
							
							... 
							
							
							
							The problem is that the dominator update code didn't "realize" that it's
possible for the newly inserted basic block to dominate anything.  Because
it IS possible, stuff was getting updated wrong.
llvm-svn: 11137 
							
						 
						
							2004-02-05 21:12:24 +00:00  
				
					
						
							
							
								 
						
							
								39ad6f2772 
								
							 
						 
						
							
							
								
								Minor speedup, don't query ValueMap each time through the loop  
							
							... 
							
							
							
							llvm-svn: 11123 
							
						 
						
							2004-02-04 21:44:26 +00:00  
				
					
						
							
							
								 
						
							
								6f8865bf9f 
								
							 
						 
						
							
							
								
								Two changes:  
							
							... 
							
							
							
							1. Don't scan to the end of alloca instructions in the caller function to
     insert inlined allocas, just insert at the top.  This saves a lot of
     time inlining into functions with a lot of allocas.
  2. Use splice to move the alloca instructions over, instead of remove/insert.
     This allows us to transfer a block at a time, and eliminates a bunch of
     silly symbol table manipulations.
This speeds up the inliner on the testcase in PR209 from 1.73s -> 1.04s (67%)
llvm-svn: 11118 
							
						 
						
							2004-02-04 21:33:42 +00:00  
				
					
						
							
							
								 
						
							
								0fa8c7c321 
								
							 
						 
						
							
							
								
								Optimize the case where we are inlining a function that contains only one basic block,  
							
							... 
							
							
							
							and that basic block ends with a return instruction.  In this case, we can just splice
the cloned "body" of the function directly into the source basic block, avoiding a lot
of rearrangement and splitBasicBlock's linear scan over the split block.  This speeds up
the inliner on the testcase in PR209 from 2.3s to 1.7s, a 35% reduction.
llvm-svn: 11116 
							
						 
						
							2004-02-04 04:17:06 +00:00  
				
					
						
							
							
								 
						
							
								8d414ad035 
								
							 
						 
						
							
							
								
								Adjust to the new BasicBlock ctor, which requires a function parameter  
							
							... 
							
							
							
							llvm-svn: 11114 
							
						 
						
							2004-02-04 03:58:28 +00:00  
				
					
						
							
							
								 
						
							
								0ff9da5fed 
								
							 
						 
						
							
							
								
								Remove unneeded code now that splitBasicBlock does the "right thing"  
							
							... 
							
							
							
							llvm-svn: 11111 
							
						 
						
							2004-02-04 03:21:51 +00:00  
				
					
						
							
							
								 
						
							
								18ef3fda57 
								
							 
						 
						
							
							
								
								More refactoring.  Move alloca instructions and handle invoke instructions  
							
							... 
							
							
							
							before we delete the original call site, allowing slight simplifications of
code, but nothing exciting.
llvm-svn: 11109 
							
						 
						
							2004-02-04 02:51:48 +00:00  
				
					
						
							
							
								 
						
							
								9fc977eac4 
								
							 
						 
						
							
							
								
								Move the cloning of the function body much earlier in the inlinefunction  
							
							... 
							
							
							
							process.  The only optimization we did so far is to avoid creating a
PHI node, then immediately destroying it in the common case where the
callee has one return statement.  Instead, we just don't create the return
value.  This has no noticable performance impact, but paves the way for
future improvements.
llvm-svn: 11108 
							
						 
						
							2004-02-04 01:41:09 +00:00  
				
					
						
							
							
								 
						
							
								a6578ef318 
								
							 
						 
						
							
							
								
								Give CloneBasicBlock an optional function argument to specify which function  
							
							... 
							
							
							
							to add the cloned block to.  This allows the block to be added to the function
immediately, and all of the instructions to be immediately added to the function
symbol table, which speeds up the inliner from 3.7 -> 3.38s on the PR209.
llvm-svn: 11107 
							
						 
						
							2004-02-04 01:19:43 +00:00  
				
					
						
							
							
								 
						
							
								ae51cae111 
								
							 
						 
						
							
							
								
								Bunch up all locally used allocas by the block they are allocated in, and  
							
							... 
							
							
							
							process them all as a group.  This speeds up SRoA/mem2reg from 28.46s to
0.62s on the testcase from PR209.
llvm-svn: 11100 
							
						 
						
							2004-02-03 22:34:12 +00:00  
				
					
						
							
							
								 
						
							
								3784188620 
								
							 
						 
						
							
							
								
								Handle extremely trivial cases extremely efficiently.  This speeds up  
							
							... 
							
							
							
							SRoA/mem2reg from 41.2s to 27.5s on the testcase in PR209.
llvm-svn: 11099 
							
						 
						
							2004-02-03 22:00:33 +00:00  
				
					
						
							
							
								 
						
							
								c2f0aa58df 
								
							 
						 
						
							
							
								
								Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.  
							
							... 
							
							
							
							llvm-svn: 11083 
							
						 
						
							2004-02-02 20:09:56 +00:00  
				
					
						
							
							
								 
						
							
								cacd30b957 
								
							 
						 
						
							
							
								
								Update comment  
							
							... 
							
							
							
							llvm-svn: 11082 
							
						 
						
							2004-02-02 20:09:22 +00:00  
				
					
						
							
							
								 
						
							
								6204e75c4a 
								
							 
						 
						
							
							
								
								Make deadarghaX0r warning louder.  
							
							... 
							
							
							
							(I just love typing haX0r.   haX0r haX0r haX0r.)
llvm-svn: 11079 
							
						 
						
							2004-02-02 19:32:27 +00:00  
				
					
						
							
							
								 
						
							
								ed9b12c31a 
								
							 
						 
						
							
							
								
								Disable tail duplication in any "hard" cases, where it might break SSA form.  
							
							... 
							
							
							
							llvm-svn: 11052 
							
						 
						
							2004-02-01 06:32:28 +00:00  
				
					
						
							
							
								 
						
							
								7c91a6176c 
								
							 
						 
						
							
							
								
								Fix the count of the number of instructions removed  
							
							... 
							
							
							
							llvm-svn: 11049 
							
						 
						
							2004-02-01 05:15:07 +00:00  
				
					
						
							
							
								 
						
							
								bf43787f33 
								
							 
						 
						
							
							
								
								Hyphenate `target-dependent'  
							
							... 
							
							
							
							llvm-svn: 11003 
							
						 
						
							2004-01-28 20:43:01 +00:00  
				
					
						
							
							
								 
						
							
								1f7942fe7d 
								
							 
						 
						
							
							
								
								Fix InstCombine/2004-01-13-InstCombineInvokePHI.ll, which also fixes lots  
							
							... 
							
							
							
							of C++ programs in Shootout-C++, including lists1 and moments, etc
llvm-svn: 10845 
							
						 
						
							2004-01-14 06:06:08 +00:00  
				
					
						
							
							
								 
						
							
								6b052f2154 
								
							 
						 
						
							
							
								
								Clean up #includes  
							
							... 
							
							
							
							llvm-svn: 10799 
							
						 
						
							2004-01-12 19:56:36 +00:00  
				
					
						
							
							
								 
						
							
								fcf21a75b0 
								
							 
						 
						
							
							
								
								Fix bug in previous checkin  
							
							... 
							
							
							
							llvm-svn: 10798 
							
						 
						
							2004-01-12 19:47:05 +00:00  
				
					
						
							
							
								 
						
							
								c1e7cc0fbe 
								
							 
						 
						
							
							
								
								Eliminate use of ConstantHandling and ConstantExpr::getShift interfaces  
							
							... 
							
							
							
							llvm-svn: 10796 
							
						 
						
							2004-01-12 19:35:11 +00:00  
				
					
						
							
							
								 
						
							
								d7ccc9e5a5 
								
							 
						 
						
							
							
								
								Add header file I accidentally removed in teh shuffle  
							
							... 
							
							
							
							llvm-svn: 10795 
							
						 
						
							2004-01-12 19:15:20 +00:00  
				
					
						
							
							
								 
						
							
								c9fb4a3b89 
								
							 
						 
						
							
							
								
								Remove use of the ConstantHandling interfaces  
							
							... 
							
							
							
							llvm-svn: 10793 
							
						 
						
							2004-01-12 19:12:50 +00:00  
				
					
						
							
							
								 
						
							
								429963742e 
								
							 
						 
						
							
							
								
								Remove use of ConstantExpr::getShift  
							
							... 
							
							
							
							llvm-svn: 10792 
							
						 
						
							2004-01-12 19:10:58 +00:00  
				
					
						
							
							
								 
						
							
								1b7d4d7b63 
								
							 
						 
						
							
							
								
								Don't use ConstantExpr::getShift anymore  
							
							... 
							
							
							
							llvm-svn: 10791 
							
						 
						
							2004-01-12 19:08:43 +00:00  
				
					
						
							
							
								 
						
							
								2853a7ed22 
								
							 
						 
						
							
							
								
								Remove use of ConstantHandling  
							
							... 
							
							
							
							llvm-svn: 10789 
							
						 
						
							2004-01-12 18:35:03 +00:00  
				
					
						
							
							
								 
						
							
								118a76cb2f 
								
							 
						 
						
							
							
								
								Remove unneeded #include  
							
							... 
							
							
							
							llvm-svn: 10788 
							
						 
						
							2004-01-12 18:33:54 +00:00  
				
					
						
							
							
								 
						
							
								fc6c859a0c 
								
							 
						 
						
							
							
								
								Move llvm::ConstantFoldInstruction from VMCore to here, next to ConstantFoldTerminator  
							
							... 
							
							
							
							llvm-svn: 10785 
							
						 
						
							2004-01-12 18:25:22 +00:00  
				
					
						
							
							
								 
						
							
								81d8822396 
								
							 
						 
						
							
							
								
								Remove uses of ConstantHandling itf  
							
							... 
							
							
							
							llvm-svn: 10783 
							
						 
						
							2004-01-12 18:12:44 +00:00  
				
					
						
							
							
								 
						
							
								0fe5b32c01 
								
							 
						 
						
							
							
								
								Use constantexprs for casts.  Eliminate use of the ConstantHandling interfaces  
							
							... 
							
							
							
							llvm-svn: 10779 
							
						 
						
							2004-01-12 17:43:40 +00:00  
				
					
						
							
							
								 
						
							
								fe992d4332 
								
							 
						 
						
							
							
								
								Fix fairly severe bug in my last checking where we treated all unfoldable  
							
							... 
							
							
							
							constants as being "true" when evaluating branches.  This was introduced
because we now create constantexprs for the constants instead of failing the
fold.
llvm-svn: 10778 
							
						 
						
							2004-01-12 17:40:36 +00:00  
				
					
						
							
							
								 
						
							
								49f74522ec 
								
							 
						 
						
							
							
								
								* Implement minor performance optimization for the getelementptr case  
							
							... 
							
							
							
							* Implement SCCP of load instructions, implementing Transforms/SCCP/loadtest.ll
  This allows us to fold expressions like "foo"[2], even if the pointer is only
  a conditional constant.
llvm-svn: 10767 
							
						 
						
							2004-01-12 04:29:41 +00:00  
				
					
						
							
							
								 
						
							
								7e8af38637 
								
							 
						 
						
							
							
								
								Do not hack on volatile loads.  I'm not sure what the point of a volatile load  
							
							... 
							
							
							
							from constant memory is, but lets not take chances.
llvm-svn: 10765 
							
						 
						
							2004-01-12 04:13:56 +00:00  
				
					
						
							
							
								 
						
							
								05fe6847a8 
								
							 
						 
						
							
							
								
								Implement SCCP/phitest.ll  
							
							... 
							
							
							
							llvm-svn: 10763 
							
						 
						
							2004-01-12 03:57:30 +00:00  
				
					
						
							
							
								 
						
							
								fafa2ff2d6 
								
							 
						 
						
							
							
								
								Implement Transforms/ScalarRepl/phinodepromote.ll, which is an important  
							
							... 
							
							
							
							case that the C/C++ front-end generates.
llvm-svn: 10761 
							
						 
						
							2004-01-12 01:18:32 +00:00  
				
					
						
							
							
								 
						
							
								3bcecb92f3 
								
							 
						 
						
							
							
								
								Update obsolete comments  
							
							... 
							
							
							
							Fix iterator invalidation problems which was causing -mstrip to miss some
entries, and read free'd memory.  This shrinks the symbol table of 254.gap
from 333 to 284 bytes!  :)
llvm-svn: 10751 
							
						 
						
							2004-01-10 21:36:49 +00:00  
				
					
						
							
							
								 
						
							
								df3c342a4c 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							llvm-svn: 10727 
							
						 
						
							2004-01-09 06:12:26 +00:00  
				
					
						
							
							
								 
						
							
								fdf788eebd 
								
							 
						 
						
							
							
								
								Remove dependence on structure index type.  s/MT/FT  
							
							... 
							
							
							
							llvm-svn: 10726 
							
						 
						
							2004-01-09 06:02:51 +00:00  
				
					
						
							
							
								 
						
							
								49525f8cf4 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							llvm-svn: 10725 
							
						 
						
							2004-01-09 06:02:20 +00:00  
				
					
						
							
							
								 
						
							
								ff66958154 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							add flags for PR82
llvm-svn: 10724 
							
						 
						
							2004-01-09 05:53:38 +00:00  
				
					
						
							
							
								 
						
							
								9cc1a0e40d 
								
							 
						 
						
							
							
								
								Inching towards fixing PR82  
							
							... 
							
							
							
							llvm-svn: 10722 
							
						 
						
							2004-01-09 05:44:50 +00:00  
				
					
						
							
							
								 
						
							
								59d2d7fc33 
								
							 
						 
						
							
							
								
								Improve encapsulation in the Loop and LoopInfo classes by eliminating the  
							
							... 
							
							
							
							getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.
llvm-svn: 10714 
							
						 
						
							2004-01-08 00:09:44 +00:00  
				
					
						
							
							
								 
						
							
								56db5e98c8 
								
							 
						 
						
							
							
								
								Merging constants can cause further room for improvement.  Iterate until  
							
							... 
							
							
							
							we converge
llvm-svn: 10618 
							
						 
						
							2003-12-28 07:19:08 +00:00  
				
					
						
							
							
								 
						
							
								30513e0a3a 
								
							 
						 
						
							
							
								
								rename ClassifyExpression -> ClassifyExpr  
							
							... 
							
							
							
							llvm-svn: 10592 
							
						 
						
							2003-12-23 08:04:08 +00:00  
				
					
						
							
							
								 
						
							
								7e755e443f 
								
							 
						 
						
							
							
								
								More minor non-functional changes.  This now computes the exit condition, though  
							
							... 
							
							
							
							it doesn't do anything with it.
llvm-svn: 10590 
							
						 
						
							2003-12-23 07:47:09 +00:00  
				
					
						
							
							
								 
						
							
								93bfb6c741 
								
							 
						 
						
							
							
								
								Remove extraneous #include  
							
							... 
							
							
							
							finegrainify namespacification
llvm-svn: 10589 
							
						 
						
							2003-12-23 07:43:38 +00:00  
				
					
						
							
							
								 
						
							
								c2ee05427e 
								
							 
						 
						
							
							
								
								Fix memory corruption bug PR193  
							
							... 
							
							
							
							llvm-svn: 10586 
							
						 
						
							2003-12-22 23:49:36 +00:00  
				
					
						
							
							
								 
						
							
								a02d5aa6ce 
								
							 
						 
						
							
							
								
								Don't mind me, I'm just refactoring away.  This patch makes room for LFTR, but  
							
							... 
							
							
							
							contains no functionality changes.
llvm-svn: 10583 
							
						 
						
							2003-12-22 09:53:29 +00:00  
				
					
						
							
							
								 
						
							
								6449dcefbc 
								
							 
						 
						
							
							
								
								Implement IndVarsSimplify/pointer-indvars.ll, transforming pointer  
							
							... 
							
							
							
							arithmetic into "array subscripts"
llvm-svn: 10580 
							
						 
						
							2003-12-22 05:02:01 +00:00  
				
					
						
							
							
								 
						
							
								d3678bc7c5 
								
							 
						 
						
							
							
								
								Fix PR194  
							
							... 
							
							
							
							llvm-svn: 10573 
							
						 
						
							2003-12-22 03:58:44 +00:00  
				
					
						
							
							
								 
						
							
								fc7bdac1b3 
								
							 
						 
						
							
							
								
								Fix ADCE/2003-12-19-MergeReturn.llx  
							
							... 
							
							
							
							llvm-svn: 10539 
							
						 
						
							2003-12-19 09:08:34 +00:00  
				
					
						
							
							
								 
						
							
								918460190f 
								
							 
						 
						
							
							
								
								Remove the wierd "Operands" loop, by traversing basicblocks in reverse order  
							
							... 
							
							
							
							llvm-svn: 10536 
							
						 
						
							2003-12-19 08:18:16 +00:00  
				
					
						
							
							
								 
						
							
								547192d688 
								
							 
						 
						
							
							
								
								Implement LICM/sink_multiple.ll, by sinking all possible instructions in the  
							
							... 
							
							
							
							loop before hoisting any.
llvm-svn: 10534 
							
						 
						
							2003-12-19 07:22:45 +00:00  
				
					
						
							
							
								 
						
							
								031a3f8cc7 
								
							 
						 
						
							
							
								
								Generalize a special case to fix PR187  
							
							... 
							
							
							
							llvm-svn: 10531 
							
						 
						
							2003-12-19 06:27:08 +00:00  
				
					
						
							
							
								 
						
							
								91daeb5431 
								
							 
						 
						
							
							
								
								Factor code out into the Utils library  
							
							... 
							
							
							
							llvm-svn: 10530 
							
						 
						
							2003-12-19 05:58:40 +00:00  
				
					
						
							
							
								 
						
							
								04efa4b155 
								
							 
						 
						
							
							
								
								Add new function  
							
							... 
							
							
							
							llvm-svn: 10529 
							
						 
						
							2003-12-19 05:56:28 +00:00  
				
					
						
							
							
								 
						
							
								b22e9b4b35 
								
							 
						 
						
							
							
								
								Reverted back to previous revision - this was previously merged  
							
							... 
							
							
							
							according to the CVS log messages.
llvm-svn: 10517 
							
						 
						
							2003-12-18 17:19:19 +00:00  
				
					
						
							
							
								 
						
							
								86a3a48697 
								
							 
						 
						
							
							
								
								Merged in RELEASE_11.  
							
							... 
							
							
							
							llvm-svn: 10516 
							
						 
						
							2003-12-18 16:43:17 +00:00  
				
					
						
							
							
								 
						
							
								9e2b42a0c8 
								
							 
						 
						
							
							
								
								When we delete instructions from the loop, make sure to remove them from the  
							
							... 
							
							
							
							AliasSetTracker as well.
llvm-svn: 10507 
							
						 
						
							2003-12-18 08:12:32 +00:00  
				
					
						
							
							
								 
						
							
								6c08bb8b8e 
								
							 
						 
						
							
							
								
								Fix for PR185 & IndVarsSimplify/2003-12-15-Crash.llx  
							
							... 
							
							
							
							llvm-svn: 10473 
							
						 
						
							2003-12-15 17:34:02 +00:00  
				
					
						
							
							
								 
						
							
								884e824534 
								
							 
						 
						
							
							
								
								Refactor code just a little bit, allowing us to implement TailCallElim/return_constant.ll  
							
							... 
							
							
							
							llvm-svn: 10467 
							
						 
						
							2003-12-14 23:57:39 +00:00  
				
					
						
							
							
								 
						
							
								d1c371c32c 
								
							 
						 
						
							
							
								
								Do not promote volatile alias sets into registers  
							
							... 
							
							
							
							llvm-svn: 10458 
							
						 
						
							2003-12-14 04:52:31 +00:00  
				
					
						
							
							
								 
						
							
								34399dda2d 
								
							 
						 
						
							
							
								
								Fix LICM/2003-12-11-SinkingToPHI.ll, and quite possibly all of the other known problems in the universe.  
							
							... 
							
							
							
							llvm-svn: 10409 
							
						 
						
							2003-12-11 22:23:32 +00:00  
				
					
						
							
							
								 
						
							
								027253b0d5 
								
							 
						 
						
							
							
								
								verifyFunction depends on dominator info, which levelraise does not declare  
							
							... 
							
							
							
							that it needs.  This is pretty scary code!  This fixes
Regression.Transforms.LevelRaise.2002-07-16-SourceAndDestCrash
Regression.Transforms.LevelRaise.2002-07-31-AssertionFailure
llvm-svn: 10406 
							
						 
						
							2003-12-11 21:47:37 +00:00  
				
					
						
							
							
								 
						
							
								6281fd3ead 
								
							 
						 
						
							
							
								
								Fix bug: LICM/sink_multiple_exits.ll  
							
							... 
							
							
							
							Thanks for pointing this out John  :)
llvm-svn: 10387 
							
						 
						
							2003-12-10 22:35:56 +00:00  
				
					
						
							
							
								 
						
							
								55c2113b7b 
								
							 
						 
						
							
							
								
								Don't allow dead instructions to stop sinking early.  
							
							... 
							
							
							
							llvm-svn: 10386 
							
						 
						
							2003-12-10 20:43:29 +00:00  
				
					
						
							
							
								 
						
							
								713907e2b8 
								
							 
						 
						
							
							
								
								Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx  
							
							... 
							
							
							
							llvm-svn: 10385 
							
						 
						
							2003-12-10 20:43:04 +00:00  
				
					
						
							
							
								 
						
							
								7e5bd59da2 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							Fix bug: LowerInvoke/2003-12-10-Crash.llx
llvm-svn: 10382 
							
						 
						
							2003-12-10 20:22:42 +00:00  
				
					
						
							
							
								 
						
							
								ccd9f3c1f8 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							Reorder #includes
Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll
llvm-svn: 10376 
							
						 
						
							2003-12-10 18:06:47 +00:00  
				
					
						
							
							
								 
						
							
								7710f2f49e 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll
llvm-svn: 10373 
							
						 
						
							2003-12-10 17:20:35 +00:00  
				
					
						
							
							
								 
						
							
								6364314a6e 
								
							 
						 
						
							
							
								
								Simplify code  
							
							... 
							
							
							
							llvm-svn: 10371 
							
						 
						
							2003-12-10 16:58:24 +00:00  
				
					
						
							
							
								 
						
							
								48b4b852b4 
								
							 
						 
						
							
							
								
								Avoid performing two identical lookups when one will suffice  
							
							... 
							
							
							
							llvm-svn: 10370 
							
						 
						
							2003-12-10 16:57:24 +00:00  
				
					
						
							
							
								 
						
							
								edda1af35a 
								
							 
						 
						
							
							
								
								Make LICM itself a bit more efficient, and make the generated code more efficient too: don't insert a store in every exit block, because a particular block may be exited to more than once by a loop  
							
							... 
							
							
							
							llvm-svn: 10369 
							
						 
						
							2003-12-10 15:56:24 +00:00  
				
					
						
							
							
								 
						
							
								aaaea51090 
								
							 
						 
						
							
							
								
								Implement instruction sinking out of loops.  This still can do a little bit  
							
							... 
							
							
							
							better job, but this is the majority of the work.  This implements
LICM/sink*.ll
llvm-svn: 10358 
							
						 
						
							2003-12-10 06:41:05 +00:00  
				
					
						
							
							
								 
						
							
								6c237bcdf2 
								
							 
						 
						
							
							
								
								Do not insert one entry PHI nodes in split exit blocks!  
							
							... 
							
							
							
							llvm-svn: 10348 
							
						 
						
							2003-12-09 23:12:55 +00:00  
				
					
						
							
							
								 
						
							
								65c1193d55 
								
							 
						 
						
							
							
								
								Refactor code a little bit, eliminating the gratuitous InstVisitor, which  
							
							... 
							
							
							
							should make subsequent changes simpler.  This also allows us to hoist vaarg
and vanext instructions
llvm-svn: 10342 
							
						 
						
							2003-12-09 19:32:44 +00:00  
				
					
						
							
							
								 
						
							
								c05176843e 
								
							 
						 
						
							
							
								
								Fine grainify namespacification  
							
							... 
							
							
							
							Code cleanups
Make LICM::SafeToHoist marginally more efficient
llvm-svn: 10341 
							
						 
						
							2003-12-09 17:18:00 +00:00  
				
					
						
							
							
								 
						
							
								50663a1a78 
								
							 
						 
						
							
							
								
								Implement: TailCallElim/accum_recursion_constant_arg.ll  
							
							... 
							
							
							
							Also make sure to clean up any PHI nodes that are inserted which are pointless.
llvm-svn: 10333 
							
						 
						
							2003-12-08 23:37:35 +00:00  
				
					
						
							
							
								 
						
							
								198e620752 
								
							 
						 
						
							
							
								
								Implement: test/Regression/Transforms/TailCallElim/accum_recursion.ll  
							
							... 
							
							
							
							We now insert accumulator variables as necessary to eliminate tail recursion
more aggressively.  This is still fairly limited, but allows us to transform
fib/factorial, and other functions into nice happy loops.  :)
llvm-svn: 10332 
							
						 
						
							2003-12-08 23:19:26 +00:00  
				
					
						
							
							
								 
						
							
								a7b6f3ab9c 
								
							 
						 
						
							
							
								
								Cleanup and restructure the code to make it easier to read and maintain.  
							
							... 
							
							
							
							The only functionality change is that we now implement:
  Regression/Transforms/TailCallElim/intervening-inst.ll
Which is really kinda pointless, because it means that trivially dead code
does not interfere with -tce, but trivially dead code probably wouldn't be
around anytime when this pass is run anyway.
The point of including this change it to support other more aggressive
transformations when we have the analysis capabilities to do so.
llvm-svn: 10312 
							
						 
						
							2003-12-08 05:34:54 +00:00  
				
					
						
							
							
								 
						
							
								771804b541 
								
							 
						 
						
							
							
								
								Implement RaiseAllocations/FreeCastConstantExpr.ll  
							
							... 
							
							
							
							llvm-svn: 10305 
							
						 
						
							2003-12-07 01:42:08 +00:00  
				
					
						
							
							
								 
						
							
								8427bffb9a 
								
							 
						 
						
							
							
								
								* Finegrainify namespacification  
							
							... 
							
							
							
							* Transform: free <ty>* (cast <ty2>* X to <ty>*) into free <ty2>* X
llvm-svn: 10303 
							
						 
						
							2003-12-07 01:24:23 +00:00  
				
					
						
							
							
								 
						
							
								40d2aeb28f 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							Fix regressions ScalarRepl/basictest.ll & arraytest.ll
llvm-svn: 10287 
							
						 
						
							2003-12-02 17:43:55 +00:00  
				
					
						
							
							
								 
						
							
								8384f97ee4 
								
							 
						 
						
							
							
								
								Fix test: Transforms/LevelRaise/2003-11-28-IllegalTypeConversion.ll  
							
							... 
							
							
							
							Some gep generalization changes
llvm-svn: 10252 
							
						 
						
							2003-11-29 05:31:25 +00:00  
				
					
						
							
							
								 
						
							
								52310702a1 
								
							 
						 
						
							
							
								
								Do not use index type to determine what it is indexing into!  
							
							... 
							
							
							
							llvm-svn: 10226 
							
						 
						
							2003-11-25 21:09:18 +00:00  
				
					
						
							
							
								 
						
							
								28ebb3e0a6 
								
							 
						 
						
							
							
								
								Delete dead line  
							
							... 
							
							
							
							llvm-svn: 10164 
							
						 
						
							2003-11-22 02:26:17 +00:00  
				
					
						
							
							
								 
						
							
								f40cdbe856 
								
							 
						 
						
							
							
								
								Fix bug: Transforms/PruneEH/2003-11-21-PHIUpdate.llx  
							
							... 
							
							
							
							llvm-svn: 10163 
							
						 
						
							2003-11-22 02:20:36 +00:00  
				
					
						
							
							
								 
						
							
								4cc2cc5c58 
								
							 
						 
						
							
							
								
								Do not crash when deleing a region with a dead invoke instruction  
							
							... 
							
							
							
							llvm-svn: 10161 
							
						 
						
							2003-11-22 02:13:08 +00:00  
				
					
						
							
							
								 
						
							
								1ad805977d 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							The module stripping pass should not strip symbols on external globals
llvm-svn: 10157 
							
						 
						
							2003-11-22 01:29:35 +00:00  
				
					
						
							
							
								 
						
							
								61b3f20bf1 
								
							 
						 
						
							
							
								
								Considering that CI is not even IN SCOPE here, I wooda thought the compiler  
							
							... 
							
							
							
							would have caught this.  *sigh*
llvm-svn: 10142 
							
						 
						
							2003-11-21 21:57:29 +00:00  
				
					
						
							
							
								 
						
							
								f52e03c79e 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							llvm-svn: 10138 
							
						 
						
							2003-11-21 21:54:22 +00:00  
				
					
						
							
							
								 
						
							
								456031eed7 
								
							 
						 
						
							
							
								
								Get rid of using decls, finegrainify namespacification  
							
							... 
							
							
							
							llvm-svn: 10137 
							
						 
						
							2003-11-21 21:52:10 +00:00  
				
					
						
							
							
								 
						
							
								51c28a5c1b 
								
							 
						 
						
							
							
								
								* Finegrainify namespacification  
							
							... 
							
							
							
							* Make the cost metric for passing constants in as arguments to functions MUCH
  more accurate, by actually estimating the amount of code that will be constant
  propagated away.
llvm-svn: 10136 
							
						 
						
							2003-11-21 21:46:09 +00:00  
				
					
						
							
							
								 
						
							
								a82f131abb 
								
							 
						 
						
							
							
								
								Finegrainify namespacification  
							
							... 
							
							
							
							Print out the costs for functions that AREN'T inlined as well
llvm-svn: 10135 
							
						 
						
							2003-11-21 21:45:31 +00:00  
				
					
						
							
							
								 
						
							
								a29600046d 
								
							 
						 
						
							
							
								
								Minor cleanups and simplifications  
							
							... 
							
							
							
							llvm-svn: 10127 
							
						 
						
							2003-11-21 16:52:05 +00:00  
				
					
						
							
							
								 
						
							
								8791e26de1 
								
							 
						 
						
							
							
								
								* Finegrainify namespacification  
							
							... 
							
							
							
							* Implement FuncResolve/2003-11-20-BogusResolveWarning.ll
   ... which eliminates a large number of annoying warnings.  I know misha
   will miss them though!
llvm-svn: 10123 
							
						 
						
							2003-11-20 21:21:31 +00:00  
				
					
						
							
							
								 
						
							
								2af517281d 
								
							 
						 
						
							
							
								
								Start using the nicer terminator auto-insertion API  
							
							... 
							
							
							
							llvm-svn: 10111 
							
						 
						
							2003-11-20 18:25:24 +00:00  
				
					
						
							
							
								 
						
							
								63a0ccff44 
								
							 
						 
						
							
							
								
								Spew symbolic types!  
							
							... 
							
							
							
							llvm-svn: 10110 
							
						 
						
							2003-11-20 18:23:14 +00:00  
				
					
						
							
							
								 
						
							
								18e5d5228a 
								
							 
						 
						
							
							
								
								When spewing out warnings during function resolution, do not vomit out pages  
							
							... 
							
							
							
							and pages of non-symbolic types.
llvm-svn: 10109 
							
						 
						
							2003-11-20 18:19:35 +00:00  
				
					
						
							
							
								 
						
							
								4f7ce560d5 
								
							 
						 
						
							
							
								
								This file was somehow missing a top-level comment line.  
							
							... 
							
							
							
							llvm-svn: 10055 
							
						 
						
							2003-11-17 19:35:17 +00:00  
				
					
						
							
							
								 
						
							
								841dd53555 
								
							 
						 
						
							
							
								
								Fix PR116  
							
							... 
							
							
							
							llvm-svn: 10032 
							
						 
						
							2003-11-16 21:39:27 +00:00  
				
					
						
							
							
								 
						
							
								d76fe4ea7d 
								
							 
						 
						
							
							
								
								Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll  
							
							... 
							
							
							
							llvm-svn: 9981 
							
						 
						
							2003-11-13 19:17:02 +00:00  
				
					
						
							
							
								 
						
							
								960707c335 
								
							 
						 
						
							
							
								
								Put all LLVM code into the llvm namespace, as per bug 109.  
							
							... 
							
							
							
							llvm-svn: 9903 
							
						 
						
							2003-11-11 22:41:34 +00:00  
				
					
						
							
							
								 
						
							
								1e6d3053f2 
								
							 
						 
						
							
							
								
								Reorganize code for locality, improve comments  
							
							... 
							
							
							
							llvm-svn: 9857 
							
						 
						
							2003-11-10 04:42:42 +00:00  
				
					
						
							
							
								 
						
							
								4474336166 
								
							 
						 
						
							
							
								
								Adjust to new critical edge interface  
							
							... 
							
							
							
							llvm-svn: 9853 
							
						 
						
							2003-11-10 04:10:50 +00:00  
				
					
						
							
							
								 
						
							
								984e11792f 
								
							 
						 
						
							
							
								
								Do NOT inline self recursive calls into other functions.  This is causing the  
							
							... 
							
							
							
							pool allocator no end of trouble, and doesn't make a lot of sense anyway.  This
does not solve the problem with mutually recursive functions, but they are much less common.
llvm-svn: 9828 
							
						 
						
							2003-11-09 05:05:36 +00:00  
				
					
						
							
							
								 
						
							
								d61abe82d3 
								
							 
						 
						
							
							
								
								Untypo  
							
							... 
							
							
							
							llvm-svn: 9827 
							
						 
						
							2003-11-09 05:04:25 +00:00  
				
					
						
							
							
								 
						
							
								ad03afcb34 
								
							 
						 
						
							
							
								
								Declare FunctionPasses as such so that they can be used in FunctionPassManager.  
							
							... 
							
							
							
							llvm-svn: 9768 
							
						 
						
							2003-11-07 17:20:18 +00:00  
				
					
						
							
							
								 
						
							
								38cd27e450 
								
							 
						 
						
							
							
								
								Various cleanups and efficiency improvements  
							
							... 
							
							
							
							llvm-svn: 9753 
							
						 
						
							2003-11-06 19:46:29 +00:00  
				
					
						
							
							
								 
						
							
								b0a4b49b23 
								
							 
						 
						
							
							
								
								Fix bug: PR93  
							
							... 
							
							
							
							llvm-svn: 9752 
							
						 
						
							2003-11-06 19:18:49 +00:00  
				
					
						
							
							
								 
						
							
								4e1b467594 
								
							 
						 
						
							
							
								
								Fix the problem with running cleanups in bugpoint:  We were deleting arguments  
							
							... 
							
							
							
							of intrinsic functions, causing the verifier to fail.
llvm-svn: 9745 
							
						 
						
							2003-11-05 21:53:41 +00:00  
				
					
						
							
							
								 
						
							
								9e60aced2e 
								
							 
						 
						
							
							
								
								Split behavior into two pieces  
							
							... 
							
							
							
							llvm-svn: 9741 
							
						 
						
							2003-11-05 21:43:02 +00:00  
				
					
						
							
							
								 
						
							
								8055fb3afa 
								
							 
						 
						
							
							
								
								Yet more fixes for constant expr shifts  
							
							... 
							
							
							
							llvm-svn: 9739 
							
						 
						
							2003-11-05 20:43:58 +00:00  
				
					
						
							
							
								 
						
							
								ba55bd37fe 
								
							 
						 
						
							
							
								
								Further fixes for PR93  
							
							... 
							
							
							
							llvm-svn: 9738 
							
						 
						
							2003-11-05 20:37:01 +00:00  
				
					
						
							
							
								 
						
							
								7c94d1171a 
								
							 
						 
						
							
							
								
								Fix flawed logic that was breaking several SPEC benchmarks, including gzip and crafty.  
							
							... 
							
							
							
							llvm-svn: 9731 
							
						 
						
							2003-11-05 17:31:36 +00:00  
				
					
						
							
							
								 
						
							
								813ec04735 
								
							 
						 
						
							
							
								
								Be gcc 3.4 clean  
							
							... 
							
							
							
							llvm-svn: 9725 
							
						 
						
							2003-11-05 06:12:18 +00:00  
				
					
						
							
							
								 
						
							
								8f2f598024 
								
							 
						 
						
							
							
								
								Fix bug with previous implementation:  
							
							... 
							
							
							
							-      // ~(c-X) == X-(c-1) == X+(-c+1)
+      // ~(c-X) == X-c-1 == X+(-c-1)
Implement: C - ~X == X + (1+C)
llvm-svn: 9715 
							
						 
						
							2003-11-05 01:06:05 +00:00  
				
					
						
							
							
								 
						
							
								e580666532 
								
							 
						 
						
							
							
								
								Minor cleanup, plus implement InstCombine/xor.ll:test17  
							
							... 
							
							
							
							llvm-svn: 9711 
							
						 
						
							2003-11-04 23:50:51 +00:00  
				
					
						
							
							
								 
						
							
								0f68fa6569 
								
							 
						 
						
							
							
								
								Implement InstCombine/xor.ll:test(15|16)  
							
							... 
							
							
							
							llvm-svn: 9708 
							
						 
						
							2003-11-04 23:37:10 +00:00  
				
					
						
							
							
								 
						
							
								81587e798a 
								
							 
						 
						
							
							
								
								Checking in Chris's suggestions:  
							
							... 
							
							
							
							Added assert() to ensure symbol table is well formed.
Added code to remember the value that was found; resolving types can change
the symbol table and invalidate the value of the iterator.
Added comments to the ResolveTypes() function (mainly for my own benefit).
Please feel free to correct the comments if they are not accurate.
llvm-svn: 9693 
							
						 
						
							2003-11-04 15:22:26 +00:00  
				
					
						
							
							
								 
						
							
								6444c37488 
								
							 
						 
						
							
							
								
								Implement InstCombine/cast-set.ll:test6[a].  This improves code generated for  
							
							... 
							
							
							
							a hot function in em3d
llvm-svn: 9673 
							
						 
						
							2003-11-03 05:17:03 +00:00  
				
					
						
							
							
								 
						
							
								1693079e92 
								
							 
						 
						
							
							
								
								Implement InstCombine/cast-set.ll: test1, test2, test7  
							
							... 
							
							
							
							llvm-svn: 9670 
							
						 
						
							2003-11-03 04:25:02 +00:00  
				
					
						
							
							
								 
						
							
								af7893203b 
								
							 
						 
						
							
							
								
								Fix bug with zero sized casts  
							
							... 
							
							
							
							llvm-svn: 9667 
							
						 
						
							2003-11-03 01:29:41 +00:00  
				
					
						
							
							
								 
						
							
								d4d987dd4a 
								
							 
						 
						
							
							
								
								Fix bug in previous checkin  
							
							... 
							
							
							
							llvm-svn: 9656 
							
						 
						
							2003-11-02 06:54:48 +00:00  
				
					
						
							
							
								 
						
							
								f4ad165e8b 
								
							 
						 
						
							
							
								
								Implement transmogriphication of allocation instructions  
							
							... 
							
							
							
							llvm-svn: 9654 
							
						 
						
							2003-11-02 05:57:39 +00:00  
				
					
						
							
							
								 
						
							
								7f7285bab7 
								
							 
						 
						
							
							
								
								Fix PR78  
							
							... 
							
							
							
							llvm-svn: 9648 
							
						 
						
							2003-11-02 02:06:27 +00:00  
				
					
						
							
							
								 
						
							
								b45d9077cb 
								
							 
						 
						
							
							
								
								Strip off CPR's manually, because if we don't, the inliner doesn't delete dead  
							
							... 
							
							
							
							functions.  GRR
llvm-svn: 9641 
							
						 
						
							2003-10-31 21:05:58 +00:00  
				
					
						
							
							
								 
						
							
								686767f3f6 
								
							 
						 
						
							
							
								
								Fix bug: 2003-10-29-CallSiteResolve.ll & PR70  
							
							... 
							
							
							
							llvm-svn: 9600 
							
						 
						
							2003-10-30 00:46:41 +00:00  
				
					
						
							
							
								 
						
							
								3420137e63 
								
							 
						 
						
							
							
								
								Refactor code, initial implementation of -insert-block-profiling pass  
							
							... 
							
							
							
							llvm-svn: 9593 
							
						 
						
							2003-10-29 21:24:22 +00:00  
				
					
						
							
							
								 
						
							
								bcb0f4bf2e 
								
							 
						 
						
							
							
								
								Fix PR66 & ScalarRepl/2003-10-29-ArrayProblem.ll  
							
							... 
							
							
							
							llvm-svn: 9585 
							
						 
						
							2003-10-29 17:55:44 +00:00  
				
					
						
							
							
								 
						
							
								e5f15cdc5f 
								
							 
						 
						
							
							
								
								Fix bug: ConstantMerge/2003-10-28-MergeExternalConstants.ll & PR64  
							
							... 
							
							
							
							llvm-svn: 9579 
							
						 
						
							2003-10-29 06:01:26 +00:00  
				
					
						
							
							
								 
						
							
								3e5ff2568c 
								
							 
						 
						
							
							
								
								Check in statistifying patch for Bill  
							
							... 
							
							
							
							llvm-svn: 9572 
							
						 
						
							2003-10-28 23:14:59 +00:00  
				
					
						
							
							
								 
						
							
								183fa7ceb3 
								
							 
						 
						
							
							
								
								Pass in argc & argv  
							
							... 
							
							
							
							llvm-svn: 9563 
							
						 
						
							2003-10-28 22:42:24 +00:00  
				
					
						
							
							
								 
						
							
								c8ba0672ac 
								
							 
						 
						
							
							
								
								Initial checkin of profiling instrumentation pass.  So far, despite the  
							
							... 
							
							
							
							file name, we only support function profiling.  This will be fixed in the
near future.
llvm-svn: 9547 
							
						 
						
							2003-10-28 18:59:04 +00:00  
				
					
						
							
							
								 
						
							
								233989316c 
								
							 
						 
						
							
							
								
								Eliminate using declarations  
							
							... 
							
							
							
							llvm-svn: 9543 
							
						 
						
							2003-10-27 21:44:09 +00:00  
				
					
						
							
							
								 
						
							
								5e004e8ce0 
								
							 
						 
						
							
							
								
								Propagating constants to arguments can make other arguments constant.  For now  
							
							... 
							
							
							
							do something dumb, and inefficient, but more complete.
llvm-svn: 9542 
							
						 
						
							2003-10-27 21:09:00 +00:00  
				
					
						
							
							
								 
						
							
								b727fb2663 
								
							 
						 
						
							
							
								
								Fix test: Linker/2003-10-27-LinkOncePromote.ll  
							
							... 
							
							
							
							Fix PR58
llvm-svn: 9530 
							
						 
						
							2003-10-27 16:39:39 +00:00  
				
					
						
							
							
								 
						
							
								d9f4ffdf5e 
								
							 
						 
						
							
							
								
								Get the list of PHI node values before the basic block is split.  Also, add  
							
							... 
							
							
							
							PHI node entries for unwind instructions just like for call instructions which
became invokes!  This fixes PR57, tested by
Inline/2003-10-26-InlineInvokeExceptionDestPhi.ll
llvm-svn: 9526 
							
						 
						
							2003-10-27 05:33:09 +00:00  
				
					
						
							
							
								 
						
							
								12b78db685 
								
							 
						 
						
							
							
								
								We might as well strip off any CPRs before propagation  
							
							... 
							
							
							
							llvm-svn: 9437 
							
						 
						
							2003-10-23 18:49:23 +00:00  
				
					
						
							
							
								 
						
							
								05c71fb3e6 
								
							 
						 
						
							
							
								
								* We were forgetting to pass varargs arguments through a call  
							
							... 
							
							
							
							* Add a work around for bug PR56, gross but necessary for now.
llvm-svn: 9428 
							
						 
						
							2003-10-23 17:44:53 +00:00  
				
					
						
							
							
								 
						
							
								f516c698ff 
								
							 
						 
						
							
							
								
								Check in initial version of ipcp  
							
							... 
							
							
							
							llvm-svn: 9423 
							
						 
						
							2003-10-23 16:52:27 +00:00  
				
					
						
							
							
								 
						
							
								0658cc20bd 
								
							 
						 
						
							
							
								
								Make this pass substantially stronger by having it delete dead return values  
							
							... 
							
							
							
							as well as arguments.  Now it can delete arguments and return values which are
only passed into other arguments or are returned, if they are dead.  This causes
it to delete several hundred extra args/retvals from the C++ hello world program,
shrinking it by about 2K.
llvm-svn: 9398 
							
						 
						
							2003-10-23 03:48:17 +00:00  
				
					
						
							
							
								 
						
							
								9e8fe49c37 
								
							 
						 
						
							
							
								
								This important patch fixes two warnings in the linker which can occur from linking  
							
							... 
							
							
							
							valid pieces of code
llvm-svn: 9390 
							
						 
						
							2003-10-22 23:03:38 +00:00  
				
					
						
							
							
								 
						
							
								6d3425e87a 
								
							 
						 
						
							
							
								
								Update the 'used' flag correctly  
							
							... 
							
							
							
							llvm-svn: 9366 
							
						 
						
							2003-10-22 04:43:18 +00:00  
				
					
						
							
							
								 
						
							
								12b3593dea 
								
							 
						 
						
							
							
								
								Loop over the module, not the symbol table.  This makes the code handle  
							
							... 
							
							
							
							unused external functions again
llvm-svn: 9365 
							
						 
						
							2003-10-22 04:42:20 +00:00  
				
					
						
							
							
								 
						
							
								4cd99ffa57 
								
							 
						 
						
							
							
								
								Implement FunctionResolve/2003-10-21-GlobalResolveHack.ll  
							
							... 
							
							
							
							llvm-svn: 9363 
							
						 
						
							2003-10-22 03:35:34 +00:00  
				
					
						
							
							
								 
						
							
								af2c00bf14 
								
							 
						 
						
							
							
								
								Fix bug: FunctionResolve/2003-10-21-GlobalTypeDifference.ll  
							
							... 
							
							
							
							llvm-svn: 9359 
							
						 
						
							2003-10-21 23:17:56 +00:00  
				
					
						
							
							
								 
						
							
								4f2581f828 
								
							 
						 
						
							
							
								
								Fix bug: Linker/2003-10-21-ConflictingTypesTolerance.ll  
							
							... 
							
							
							
							llvm-svn: 9357 
							
						 
						
							2003-10-21 22:46:38 +00:00  
				
					
						
							
							
								 
						
							
								9bc22b7439 
								
							 
						 
						
							
							
								
								Fix message to make more sense and confuse Chris less  
							
							... 
							
							
							
							llvm-svn: 9354 
							
						 
						
							2003-10-21 21:52:20 +00:00  
				
					
						
							
							
								 
						
							
								29265fe981 
								
							 
						 
						
							
							
								
								Added LLVM copyright header.  
							
							... 
							
							
							
							llvm-svn: 9321 
							
						 
						
							2003-10-21 15:17:13 +00:00  
				
					
						
							
							
								 
						
							
								4436c49787 
								
							 
						 
						
							
							
								
								Added LLVM copyright notice to Makefiles.  
							
							... 
							
							
							
							llvm-svn: 9312 
							
						 
						
							2003-10-20 22:26:57 +00:00  
				
					
						
							
							
								 
						
							
								482202a601 
								
							 
						 
						
							
							
								
								Added LLVM project notice to the top of every C++ source file.  
							
							... 
							
							
							
							Header files will be on the way.
llvm-svn: 9298 
							
						 
						
							2003-10-20 19:43:21 +00:00  
				
					
						
							
							
								 
						
							
								2d9c117e21 
								
							 
						 
						
							
							
								
								Reorder for minor efficiency gain  
							
							... 
							
							
							
							llvm-svn: 9285 
							
						 
						
							2003-10-20 05:54:26 +00:00  
				
					
						
							
							
								 
						
							
								b94550e537 
								
							 
						 
						
							
							
								
								Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.  
							
							... 
							
							
							
							llvm-svn: 9269 
							
						 
						
							2003-10-19 21:34:28 +00:00  
				
					
						
							
							
								 
						
							
								b32f5748b7 
								
							 
						 
						
							
							
								
								Fix PR#50  
							
							... 
							
							
							
							llvm-svn: 9227 
							
						 
						
							2003-10-18 06:14:59 +00:00  
				
					
						
							
							
								 
						
							
								f0fc9be634 
								
							 
						 
						
							
							
								
								ADd support for the new varargs instructions  
							
							... 
							
							
							
							llvm-svn: 9225 
							
						 
						
							2003-10-18 05:56:52 +00:00  
				
					
						
							
							
								 
						
							
								1facf89eaf 
								
							 
						 
						
							
							
								
								Do not crash on empty structures  
							
							... 
							
							
							
							llvm-svn: 9195 
							
						 
						
							2003-10-17 18:03:54 +00:00  
				
					
						
							
							
								 
						
							
								068ad84038 
								
							 
						 
						
							
							
								
								Add support for 'weak' linkage.  
							
							... 
							
							
							
							llvm-svn: 9171 
							
						 
						
							2003-10-16 18:29:00 +00:00  
				
					
						
							
							
								 
						
							
								50b6858e2e 
								
							 
						 
						
							
							
								
								This code does not require random access use_lists  
							
							... 
							
							
							
							llvm-svn: 9156 
							
						 
						
							2003-10-16 16:49:12 +00:00  
				
					
						
							
							
								 
						
							
								5dbb244edb 
								
							 
						 
						
							
							
								
								Eliminate using declaration  
							
							... 
							
							
							
							Rewrite code to work with use_lists what are either random access or bidirectional
llvm-svn: 9155 
							
						 
						
							2003-10-16 16:48:53 +00:00  
				
					
						
							
							
								 
						
							
								f95d9b99b3 
								
							 
						 
						
							
							
								
								Decrease usage of use_size()  
							
							... 
							
							
							
							llvm-svn: 9135 
							
						 
						
							2003-10-15 16:48:29 +00:00  
				
					
						
							
							
								 
						
							
								f77a856f3b 
								
							 
						 
						
							
							
								
								Cleanup  
							
							... 
							
							
							
							llvm-svn: 9133 
							
						 
						
							2003-10-15 16:42:21 +00:00  
				
					
						
							
							
								 
						
							
								b4778c73c9 
								
							 
						 
						
							
							
								
								Do not move variable sized allocations to the top of the caller, which might  
							
							... 
							
							
							
							break dominance relationships, and is otherwise bad.  This fixes bug:
Inline/2003-10-13-AllocaDominanceProblem.ll.  This also fixes miscompilation
of 3 176.gcc source files (reload1.c, global.c, flow.c)
llvm-svn: 9109 
							
						 
						
							2003-10-14 01:11:07 +00:00  
				
					
						
							
							
								 
						
							
								612cafef0a 
								
							 
						 
						
							
							
								
								Whoops, we inserted into the wrong set.  What's up with the dead set anyway?  
							
							... 
							
							
							
							llvm-svn: 9094 
							
						 
						
							2003-10-13 16:49:21 +00:00  
				
					
						
							
							
								 
						
							
								951e7329e8 
								
							 
						 
						
							
							
								
								Use external df iterators to avoid revisiting blocks in functions with  
							
							... 
							
							
							
							multiple setjmp calls.
llvm-svn: 9093 
							
						 
						
							2003-10-13 16:44:50 +00:00  
				
					
						
							
							
								 
						
							
								178957028b 
								
							 
						 
						
							
							
								
								Wrap code at 80 columns  
							
							... 
							
							
							
							llvm-svn: 9073 
							
						 
						
							2003-10-13 05:04:27 +00:00  
				
					
						
							
							
								 
						
							
								44d2c3514a 
								
							 
						 
						
							
							
								
								Regularize header file comments  
							
							... 
							
							
							
							llvm-svn: 9071 
							
						 
						
							2003-10-13 03:32:08 +00:00  
				
					
						
							
							
								 
						
							
								7cce14bfbf 
								
							 
						 
						
							
							
								
								Regularize header file comment, eliminate using's  
							
							... 
							
							
							
							llvm-svn: 9069 
							
						 
						
							2003-10-13 03:30:47 +00:00  
				
					
						
							
							
								 
						
							
								f7a60cd9fa 
								
							 
						 
						
							
							
								
								Minor cleanups  
							
							... 
							
							
							
							llvm-svn: 9067 
							
						 
						
							2003-10-13 01:02:33 +00:00  
				
					
						
							
							
								 
						
							
								56b8526083 
								
							 
						 
						
							
							
								
								Checkin an improvement contributed by Bill:  
							
							... 
							
							
							
							Only transform call sites in a setjmp'ing function which are reachable from
the setjmp.  If the call dominates the setjmp (for example), the called
function cannot longjmp to the setjmp.
This dramatically reduces the number of invoke instructions created in some
large testcases.
llvm-svn: 9066 
							
						 
						
							2003-10-13 00:57:16 +00:00  
				
					
						
							
							
								 
						
							
								c4622a6955 
								
							 
						 
						
							
							
								
								Add support to the loop canonicalization pass to make it transform loops to  
							
							... 
							
							
							
							have a SINGLE backedge.  This is useful to, for example, the -indvars pass.
This implements testcase LoopSimplify/single-backedge.ll and closes PR#34
llvm-svn: 9065 
							
						 
						
							2003-10-13 00:37:13 +00:00  
				
					
						
							
							
								 
						
							
								72272a70b8 
								
							 
						 
						
							
							
								
								Rename loop preheaders pass to loop simplify  
							
							... 
							
							
							
							llvm-svn: 9061 
							
						 
						
							2003-10-12 21:52:28 +00:00  
				
					
						
							
							
								 
						
							
								55d4788397 
								
							 
						 
						
							
							
								
								File is renamed to LoopSimplify.cpp  
							
							... 
							
							
							
							llvm-svn: 9059 
							
						 
						
							2003-10-12 21:44:18 +00:00  
				
					
						
							
							
								 
						
							
								154e4d5dea 
								
							 
						 
						
							
							
								
								First step in renaming the preheaders pass to loopsimplify  
							
							... 
							
							
							
							llvm-svn: 9058 
							
						 
						
							2003-10-12 21:43:28 +00:00  
				
					
						
							
							
								 
						
							
								9703c02ce4 
								
							 
						 
						
							
							
								
								The preheader insertion pass only depends on the CFG.  Mark it as such, which  
							
							... 
							
							
							
							allows GCCAS to only run it once.
llvm-svn: 9056 
							
						 
						
							2003-10-12 19:33:10 +00:00  
				
					
						
							
							
								 
						
							
								b8a4ed6543 
								
							 
						 
						
							
							
								
								Include <cstdio> instead of <stdio.h>.  
							
							... 
							
							
							
							llvm-svn: 9032 
							
						 
						
							2003-10-10 18:46:52 +00:00  
				
					
						
							
							
								 
						
							
								cc31fddf13 
								
							 
						 
						
							
							
								
								Don't include Config/stdio.h or <stdio.h>.  
							
							... 
							
							
							
							llvm-svn: 9031 
							
						 
						
							2003-10-10 18:46:29 +00:00  
				
					
						
							
							
								 
						
							
								8b2bd4ed47 
								
							 
						 
						
							
							
								
								Fix spelling.  
							
							... 
							
							
							
							llvm-svn: 9027 
							
						 
						
							2003-10-10 17:57:28 +00:00  
				
					
						
							
							
								 
						
							
								b3acb4027e 
								
							 
						 
						
							
							
								
								Fixing the spelling of this filename.  
							
							... 
							
							
							
							llvm-svn: 9009 
							
						 
						
							2003-10-10 16:57:31 +00:00  
				
					
						
							
							
								 
						
							
								35e56e7372 
								
							 
						 
						
							
							
								
								Update comment  
							
							... 
							
							
							
							llvm-svn: 8965 
							
						 
						
							2003-10-08 16:56:11 +00:00  
				
					
						
							
							
								 
						
							
								0bbbe5d4c8 
								
							 
						 
						
							
							
								
								Use a set to keep track of which edges have been noticed as executable already  
							
							... 
							
							
							
							to avoid reprocessing PHI nodes needlessly.  This speeds up the big bad PHI
testcase 43%: from 104.9826 to 73.5157s
llvm-svn: 8964 
							
						 
						
							2003-10-08 16:55:34 +00:00  
				
					
						
							
							
								 
						
							
								7324f7cd03 
								
							 
						 
						
							
							
								
								Minor fixes here and there  
							
							... 
							
							
							
							llvm-svn: 8963 
							
						 
						
							2003-10-08 16:21:03 +00:00  
				
					
						
							
							
								 
						
							
								71ac22ffb5 
								
							 
						 
						
							
							
								
								Avoid building data structures we don't really need.  This improves the runtime  
							
							... 
							
							
							
							of a test that Bill Wendling sent me from 228.5s to 105s.  Obviously there is
more improvement to be had, but this is a nice speedup which should be "felt"
by many programs.
llvm-svn: 8962 
							
						 
						
							2003-10-08 15:47:41 +00:00  
				
					
						
							
							
								 
						
							
								950fc785ae 
								
							 
						 
						
							
							
								
								whoops, don't accidentally lose variable names  
							
							... 
							
							
							
							llvm-svn: 8955 
							
						 
						
							2003-10-07 22:58:41 +00:00  
				
					
						
							
							
								 
						
							
								75b4d1deec 
								
							 
						 
						
							
							
								
								Fix bug: InstCombine/cast.ll:test11 / PR#7  
							
							... 
							
							
							
							llvm-svn: 8954 
							
						 
						
							2003-10-07 22:54:13 +00:00  
				
					
						
							
							
								 
						
							
								aec3d948cf 
								
							 
						 
						
							
							
								
								Refactor code a bit  
							
							... 
							
							
							
							llvm-svn: 8952 
							
						 
						
							2003-10-07 22:32:43 +00:00  
				
					
						
							
							
								 
						
							
								f8492537eb 
								
							 
						 
						
							
							
								
								Fix bugzilla bug  #5  
							
							... 
							
							
							
							llvm-svn: 8930 
							
						 
						
							2003-10-07 19:33:31 +00:00  
				
					
						
							
							
								 
						
							
								ed922162e1 
								
							 
						 
						
							
							
								
								Bill contributed this major rewrite of the -lowerswitch pass to make it generate  
							
							... 
							
							
							
							logarithmic conditional branch sequences instead of linear sequences.  Thanks Bill!
llvm-svn: 8928 
							
						 
						
							2003-10-07 18:46:23 +00:00  
				
					
						
							
							
								 
						
							
								800aaaf207 
								
							 
						 
						
							
							
								
								Fix bug in previous checkin  
							
							... 
							
							
							
							llvm-svn: 8922 
							
						 
						
							2003-10-07 15:17:02 +00:00  
				
					
						
							
							
								 
						
							
								e8ed4ef039 
								
							 
						 
						
							
							
								
								Minor speedups for the instcombine pass  
							
							... 
							
							
							
							llvm-svn: 8894 
							
						 
						
							2003-10-06 17:11:01 +00:00  
				
					
						
							
							
								 
						
							
								6dc0ae2d18 
								
							 
						 
						
							
							
								
								Speed up the predicate used to decide when to inline by caching the size  
							
							... 
							
							
							
							of callees between executions.
On eon, in release mode, this changes the inliner from taking 11.5712s
to taking 2.2066s.  In debug mode, it went from taking 14.4148s to
taking 7.0745s.  In release mode, this is a 24.7% speedup of gccas, in
debug mode, it's a total speedup of 11.7%.
This also makes it slightly more aggressive.  This could be because we
are not judging the size of the functions quite as accurately as before.
When we start looking at the performance of the generated code, this can
be investigated further.
llvm-svn: 8893 
							
						 
						
							2003-10-06 15:52:43 +00:00  
				
					
						
							
							
								 
						
							
								6aa34b0d0b 
								
							 
						 
						
							
							
								
								Avoid doing pointless work.  Amazingly, this makes us go faster.  
							
							... 
							
							
							
							Running the inliner on 252.eon used to take 48.4763s, now it takes 14.4148s.
In release mode, it went from taking 25.8741s to taking 11.5712s.
This also fixes a FIXME.
llvm-svn: 8890 
							
						 
						
							2003-10-06 15:23:43 +00:00  
				
					
						
							
							
								 
						
							
								c30f22f57c 
								
							 
						 
						
							
							
								
								This changes the PromoteMemToReg function to create "pruned" SSA form, not  
							
							... 
							
							
							
							"minimal" SSA form (in other words, it doesn't insert dead PHIs).  This
speeds up the mem2reg pass very significantly because it doesn't have to
do a lot of frivolous work in many common cases.
In the 252.eon function I have been playing with, this doesn't even insert
the 120 PHI nodes that it used to which were trivially dead (in the process
of promoting 356 alloca instructions overall).  This speeds up the mem2reg
pass from 1.2459s to 0.1284s.  More significantly, the DCE pass used to take
2.4138s to remove the 120 dead PHI nodes that mem2reg constructed, now it
takes 0.0134s (which is the time to scan the function and decide that there
is nothing dead).  So overall, on this one function, we speed things up a
total of 3.5179s, which is a 24.8x speedup!  :)
This change is tested by the Mem2Reg/2003-10-05-DeadPHIInsertion.ll test,
which now passes.
llvm-svn: 8884 
							
						 
						
							2003-10-05 22:19:20 +00:00  
				
					
						
							
							
								 
						
							
								a906bacfdd 
								
							 
						 
						
							
							
								
								Change the interface to PromoteMemToReg to also take a DominatorTree  
							
							... 
							
							
							
							llvm-svn: 8883 
							
						 
						
							2003-10-05 21:20:13 +00:00  
				
					
						
							
							
								 
						
							
								8047152977 
								
							 
						 
						
							
							
								
								Speed up the mem2reg transform for allocas which are only read/written in a single  
							
							... 
							
							
							
							basic block.  This is amazingly common in code generated by the C/C++ front-ends.
This change makes it not have to insert ANY phi nodes, whereas before it would insert
a ton of dead ones which DCE would have to clean up.
Thus, this fix improves compile-time performance of these trivial allocas in two ways:
  1. It doesn't have to do the walking and book-keeping for renaming
  2. It does not insert dead phi nodes for them which would have to
     subsequently be cleaned up.
On my favorite testcase from 252.eon, this special case handles 305 out of
356 promoted allocas in the function.  It speeds up the mem2reg pass from 7.5256s
to 1.2505s.  It inserts 677 fewer dead PHI nodes, which speeds up a subsequent
-dce pass from 18.7524s to 2.4806s.
There are still 120 trivially dead PHI nodes being inserted for variables used
in multiple basic blocks, but they are not handled by this patch.
llvm-svn: 8881 
							
						 
						
							2003-10-05 20:54:03 +00:00  
				
					
						
							
							
								 
						
							
								a43b8f4b2f 
								
							 
						 
						
							
							
								
								Initial checkin of the LLVM->LLVM transform to support code generators which  
							
							... 
							
							
							
							do not support stack unwinding yet
llvm-svn: 8869 
							
						 
						
							2003-10-05 19:14:42 +00:00  
				
					
						
							
							
								 
						
							
								5ed281d7d7 
								
							 
						 
						
							
							
								
								simplify-cfg is really a function pass  
							
							... 
							
							
							
							llvm-svn: 8868 
							
						 
						
							2003-10-05 19:14:16 +00:00  
				
					
						
							
							
								 
						
							
								a5721d3d03 
								
							 
						 
						
							
							
								
								The first PHI node may be null, scan for the first non-null one  
							
							... 
							
							
							
							llvm-svn: 8865 
							
						 
						
							2003-10-05 05:34:39 +00:00  
				
					
						
							
							
								 
						
							
								203bc011e5 
								
							 
						 
						
							
							
								
								The VersionNumbers vector is only used during PHI placement.  Turn it into an argument, allowing us to get rid of the vector.  
							
							... 
							
							
							
							llvm-svn: 8864 
							
						 
						
							2003-10-05 04:33:22 +00:00  
				
					
						
							
							
								 
						
							
								7d9692df22 
								
							 
						 
						
							
							
								
								* Update file header comment  
							
							... 
							
							
							
							*** Revamp the code which handled unreachable code in the function.  Now the
    code is much more efficient for high-degree basic blocks, such as those
    that occur in the 252.eon SPEC benchmark.
For the interested, the time to promote a SINGLE alloca in _ZN7mrScene4ReadERSi
function used to be > 3.5s.  Now it is < .075s.  The function has a LOT of
allocas in it, so it appeared to be infinite looping, this should make it much
nicer.  :)
llvm-svn: 8863 
							
						 
						
							2003-10-05 04:26:39 +00:00  
				
					
						
							
							
								 
						
							
								db1f81bcb5 
								
							 
						 
						
							
							
								
								Simplify the loop a bit  
							
							... 
							
							
							
							llvm-svn: 8862 
							
						 
						
							2003-10-05 03:45:44 +00:00  
				
					
						
							
							
								 
						
							
								2093012a03 
								
							 
						 
						
							
							
								
								There is no need for separate WriteSets and PhiNodeBlocks lists.  It is just a  
							
							... 
							
							
							
							work-list of value definitions.  This allows elimination of the explicit
'iterative' step of the algorithm, and also reuses temporary memory better.
llvm-svn: 8861 
							
						 
						
							2003-10-05 03:39:10 +00:00  
				
					
						
							
							
								 
						
							
								9408b1e8b9 
								
							 
						 
						
							
							
								
								The PhiNodes 2D vector is only used during PHI node placement.  It doesn't  
							
							... 
							
							
							
							need to be an instance variable!
llvm-svn: 8860 
							
						 
						
							2003-10-05 03:26:25 +00:00  
				
					
						
							
							
								 
						
							
								417bc173ee 
								
							 
						 
						
							
							
								
								* Document instance vars better  
							
							... 
							
							
							
							* Fuse two parallel loops
* Use a more specific type for AllocaLookup
llvm-svn: 8859 
							
						 
						
							2003-10-05 03:16:07 +00:00  
				
					
						
							
							
								 
						
							
								c360f135be 
								
							 
						 
						
							
							
								
								Two small cleanups/speedups:  
							
							... 
							
							
							
							* Do not insert a new entry into NewPhiNodes during the rename pass if there are no PHIs in a block.
 * Do not compute WriteSets in parallel
llvm-svn: 8858 
							
						 
						
							2003-10-05 02:37:36 +00:00  
				
					
						
							
							
								 
						
							
								c3d57b5923 
								
							 
						 
						
							
							
								
								* Minor cleanups  
							
							... 
							
							
							
							* Eliminate the KillList instance variable, instead, just delete loads and
  stores as they are "renamed", and delete allocas when they are done
* Make the 'visited' set an instance variable to avoid passing it on the stack.
llvm-svn: 8857 
							
						 
						
							2003-10-05 01:52:53 +00:00  
				
					
						
							
							
								 
						
							
								b9cde76e60 
								
							 
						 
						
							
							
								
								Implement InstCombine/add.ll:test17 & 18  
							
							... 
							
							
							
							llvm-svn: 8817 
							
						 
						
							2003-10-02 15:11:26 +00:00  
				
					
						
							
							
								 
						
							
								e317856e0e 
								
							 
						 
						
							
							
								
								Use global *_iterator  
							
							... 
							
							
							
							llvm-svn: 8703 
							
						 
						
							2003-09-24 22:07:33 +00:00  
				
					
						
							
							
								 
						
							
								a940095ae2 
								
							 
						 
						
							
							
								
								Do not use BasicBlock::*_iterator, just use *_iterator itself.  
							
							... 
							
							
							
							Isn't updating copy and pasted code a joy
llvm-svn: 8702 
							
						 
						
							2003-09-24 22:06:25 +00:00  
				
					
						
							
							
								 
						
							
								295b907cee 
								
							 
						 
						
							
							
								
								Fix bug: IndVarsSimplify/2003-09-23-NotAtTop.ll  
							
							... 
							
							
							
							llvm-svn: 8689 
							
						 
						
							2003-09-23 20:26:48 +00:00  
				
					
						
							
							
								 
						
							
								50ac360a34 
								
							 
						 
						
							
							
								
								Fix bugs in the last change  
							
							... 
							
							
							
							llvm-svn: 8667 
							
						 
						
							2003-09-22 23:30:59 +00:00  
				
					
						
							
							
								 
						
							
								d6002b8e15 
								
							 
						 
						
							
							
								
								Fix bug: Inline/2003-09-22-PHINodesInNormalInvokeDest.ll  
							
							... 
							
							
							
							llvm-svn: 8666 
							
						 
						
							2003-09-22 22:35:39 +00:00  
				
					
						
							
							
								 
						
							
								0178d262e6 
								
							 
						 
						
							
							
								
								Fix bug: Inline/2003-09-22-PHINodesInExceptionDest.ll  
							
							... 
							
							
							
							... by making sure to update PHI nodes to take into consideration the
extra edges we get if we inline a call instruction through an invoke.
llvm-svn: 8664 
							
						 
						
							2003-09-22 21:59:27 +00:00  
				
					
						
							
							
								 
						
							
								e051f86a3d 
								
							 
						 
						
							
							
								
								Credits now go into the top-level CREDITS.TXT  
							
							... 
							
							
							
							llvm-svn: 8662 
							
						 
						
							2003-09-22 21:57:56 +00:00  
				
					
						
							
							
								 
						
							
								4ce9dae5b1 
								
							 
						 
						
							
							
								
								Credits are now in top-level CREDITS.TXT  
							
							... 
							
							
							
							llvm-svn: 8661 
							
						 
						
							2003-09-22 21:57:15 +00:00  
				
					
						
							
							
								 
						
							
								2caaaba3e9 
								
							 
						 
						
							
							
								
								Squelch warning  
							
							... 
							
							
							
							llvm-svn: 8659 
							
						 
						
							2003-09-22 20:33:34 +00:00  
				
					
						
							
							
								 
						
							
								c8dfbbbf25 
								
							 
						 
						
							
							
								
								Global variables with APPENDING linkage are very important to keep around!  
							
							... 
							
							
							
							llvm-svn: 8632 
							
						 
						
							2003-09-20 19:00:50 +00:00  
				
					
						
							
							
								 
						
							
								5dac64f629 
								
							 
						 
						
							
							
								
								Rename Function::getEntryNode -> getEntryBlock  
							
							... 
							
							
							
							llvm-svn: 8625 
							
						 
						
							2003-09-20 14:39:18 +00:00  
				
					
						
							
							
								 
						
							
								4413e4362c 
								
							 
						 
						
							
							
								
								Minor cleanups, no functional changes  
							
							... 
							
							
							
							Rename Function::getEntryNode -> getEntryBlock
llvm-svn: 8623 
							
						 
						
							2003-09-20 14:36:23 +00:00  
				
					
						
							
							
								 
						
							
								b6ac976247 
								
							 
						 
						
							
							
								
								Fix a really obvious huge gaping bug, add a comment  
							
							... 
							
							
							
							llvm-svn: 8620 
							
						 
						
							2003-09-20 05:24:00 +00:00  
				
					
						
							
							
								 
						
							
								0016085602 
								
							 
						 
						
							
							
								
								Expose the TCE pass  
							
							... 
							
							
							
							llvm-svn: 8619 
							
						 
						
							2003-09-20 05:14:13 +00:00  
				
					
						
							
							
								 
						
							
								2e9014cb1b 
								
							 
						 
						
							
							
								
								New transformation: tail recursion elimination  
							
							... 
							
							
							
							llvm-svn: 8618 
							
						 
						
							2003-09-20 05:03:31 +00:00  
				
					
						
							
							
								 
						
							
								2da29177ba 
								
							 
						 
						
							
							
								
								Implement InstCombine/and.ll:test(15|16)  
							
							... 
							
							
							
							llvm-svn: 8607 
							
						 
						
							2003-09-19 19:05:02 +00:00  
				
					
						
							
							
								 
						
							
								ba1cb38c06 
								
							 
						 
						
							
							
								
								pull a large nested conditional out into its own function  
							
							... 
							
							
							
							llvm-svn: 8605 
							
						 
						
							2003-09-19 17:17:26 +00:00  
				
					
						
							
							
								 
						
							
								dbba189f15 
								
							 
						 
						
							
							
								
								Implement InstCombine/add.ll:test(15|16)  
							
							... 
							
							
							
							llvm-svn: 8604 
							
						 
						
							2003-09-19 15:35:42 +00:00  
				
					
						
							
							
								 
						
							
								39f398b50d 
								
							 
						 
						
							
							
								
								Fix bug raising allocations whose call sites were invoke instructions.  
							
							... 
							
							
							
							Thanks to brg for tracking down the problem so precisely!
llvm-svn: 8568 
							
						 
						
							2003-09-16 19:42:21 +00:00  
				
					
						
							
							
								 
						
							
								ec6d7a6df3 
								
							 
						 
						
							
							
								
								This is effectively a complete rewrite of the globaldce algorithm, resulting  
							
							... 
							
							
							
							in it being both shorter and more effective.  It no longer depends on the
callgraph, so one FIXME has been fixed.
Additionally, this pass was not able to delete recursive (but dead) functions
if they were pointed to by global variables which were also dead.  In fact
this pass had a lot of problems deleting functions which were only pointed
to by dead globals and other stuff.
Fixing this means that the entire EH library should be stripped away now from
programs that don't use sjlj or exceptions.
llvm-svn: 8567 
							
						 
						
							2003-09-16 19:27:31 +00:00  
				
					
						
							
							
								 
						
							
								40b6621b50 
								
							 
						 
						
							
							
								
								Minor cleanups, give credit, remove code that should not be necessary, and  
							
							... 
							
							
							
							was a "major hack"  :)
llvm-svn: 8524 
							
						 
						
							2003-09-15 05:43:05 +00:00  
				
					
						
							
							
								 
						
							
								6f99eb56c3 
								
							 
						 
						
							
							
								
								Initial checkin of the Setjmp/Longjmp lowering/transformation pass,  
							
							... 
							
							
							
							contributed by the masterful Bill Wendling!
llvm-svn: 8520 
							
						 
						
							2003-09-15 04:56:27 +00:00  
				
					
						
							
							
								 
						
							
								da3585335b 
								
							 
						 
						
							
							
								
								Ugh, a bug fix needed because of the bug in the CallGraph code  
							
							... 
							
							
							
							llvm-svn: 8519 
							
						 
						
							2003-09-15 04:52:00 +00:00  
				
					
						
							
							
								 
						
							
								5a6fa29eb3 
								
							 
						 
						
							
							
								
								Fix bug: PruneEH/2003-09-14-ExternalCall.llx  
							
							... 
							
							
							
							llvm-svn: 8516 
							
						 
						
							2003-09-15 02:22:50 +00:00  
				
					
						
							
							
								 
						
							
								7f89ea75e1 
								
							 
						 
						
							
							
								
								Fix bug: Inline/2003-09-14-InlineValue.ll  
							
							... 
							
							
							
							llvm-svn: 8514 
							
						 
						
							2003-09-15 02:10:16 +00:00  
				
					
						
							
							
								 
						
							
								099ec07a95 
								
							 
						 
						
							
							
								
								Make sure to cannonicalize loops before running indvar simplify  
							
							... 
							
							
							
							llvm-svn: 8502 
							
						 
						
							2003-09-12 16:45:01 +00:00  
				
					
						
							
							
								 
						
							
								7fdde92b1f 
								
							 
						 
						
							
							
								
								Do not return success after checking only the FIRST USE of a gep instruction.  
							
							... 
							
							
							
							Instead, check all uses.
This fixes bug: ScalarRepl/2003-09-12-IncorrectPromote.ll
This also fixes the miscompilation of Ptrdist/bc
llvm-svn: 8493 
							
						 
						
							2003-09-12 16:02:12 +00:00  
				
					
						
							
							
								 
						
							
								9a95f2a944 
								
							 
						 
						
							
							
								
								Minor optimization efficiency improvement:  
							
							... 
							
							
							
							- Run mem2reg promotion first
  - Only rerun passes if the previous thing changed something
llvm-svn: 8490 
							
						 
						
							2003-09-12 15:36:03 +00:00  
				
					
						
							
							
								 
						
							
								cce81be1e1 
								
							 
						 
						
							
							
								
								Simplify code  
							
							... 
							
							
							
							Implement InstCombine/mul.ll:test9
llvm-svn: 8488 
							
						 
						
							2003-09-11 22:24:54 +00:00  
				
					
						
							
							
								 
						
							
								217ca0bcb9 
								
							 
						 
						
							
							
								
								Apostrophes are only used for possession and quoting.  
							
							... 
							
							
							
							llvm-svn: 8473 
							
						 
						
							2003-09-11 16:58:31 +00:00  
				
					
						
							
							
								 
						
							
								5d8a12e094 
								
							 
						 
						
							
							
								
								Integrate functionality of the mem2reg pass directly into this pass to make  
							
							... 
							
							
							
							the combination more effective
llvm-svn: 8471 
							
						 
						
							2003-09-11 16:45:55 +00:00  
				
					
						
							
							
								 
						
							
								bb9d03b9c0 
								
							 
						 
						
							
							
								
								Renamed DominatorTree::Node::getNode() -> getBlock()  
							
							... 
							
							
							
							llvm-svn: 8469 
							
						 
						
							2003-09-11 16:26:13 +00:00  
				
					
						
							
							
								 
						
							
								9b8d339f6e 
								
							 
						 
						
							
							
								
								Spell `definite' correctly.  
							
							... 
							
							
							
							llvm-svn: 8467 
							
						 
						
							2003-09-11 15:32:37 +00:00  
				
					
						
							
							
								 
						
							
								250f976eb3 
								
							 
						 
						
							
							
								
								Spell `definitely' correctly.  
							
							... 
							
							
							
							llvm-svn: 8466 
							
						 
						
							2003-09-11 15:31:17 +00:00  
				
					
						
							
							
								 
						
							
								2158052ac4 
								
							 
						 
						
							
							
								
								Unwind instructions are intrinsically alive, just like returns  
							
							... 
							
							
							
							llvm-svn: 8462 
							
						 
						
							2003-09-10 20:38:14 +00:00  
				
					
						
							
							
								 
						
							
								10a032abf1 
								
							 
						 
						
							
							
								
								Update for new UnifyFunction... API  
							
							... 
							
							
							
							Remove using decl
llvm-svn: 8458 
							
						 
						
							2003-09-10 20:35:33 +00:00  
				
					
						
							
							
								 
						
							
								3b30e93e27 
								
							 
						 
						
							
							
								
								Remove #include  
							
							... 
							
							
							
							llvm-svn: 8457 
							
						 
						
							2003-09-10 20:35:21 +00:00  
				
					
						
							
							
								 
						
							
								f941396cce 
								
							 
						 
						
							
							
								
								Expand the pass to unify all of the unwind blocks as well  
							
							... 
							
							
							
							llvm-svn: 8456 
							
						 
						
							2003-09-10 20:34:51 +00:00  
				
					
						
							
							
								 
						
							
								216c7b8aed 
								
							 
						 
						
							
							
								
								Fix spell-o's  
							
							... 
							
							
							
							llvm-svn: 8431 
							
						 
						
							2003-09-10 05:29:43 +00:00  
				
					
						
							
							
								 
						
							
								4e621cd861 
								
							 
						 
						
							
							
								
								Spelling fixes.  I think that "cannonical" is ok, but "canonical" appears to  
							
							... 
							
							
							
							be the canonical form for the word
llvm-svn: 8430 
							
						 
						
							2003-09-10 05:24:46 +00:00  
				
					
						
							
							
								 
						
							
								36257f049e 
								
							 
						 
						
							
							
								
								Fix up file header  
							
							... 
							
							
							
							llvm-svn: 8428 
							
						 
						
							2003-09-10 05:10:34 +00:00  
				
					
						
							
							
								 
						
							
								4ace48e0ca 
								
							 
						 
						
							
							
								
								Spell `occurrence' correctly.  
							
							... 
							
							
							
							llvm-svn: 8425 
							
						 
						
							2003-09-09 21:54:45 +00:00  
				
					
						
							
							
								 
						
							
								04ecefe232 
								
							 
						 
						
							
							
								
								Eliminate support for the llvm.unwind intrinisic, using the Unwind instruction instead  
							
							... 
							
							
							
							llvm-svn: 8411 
							
						 
						
							2003-09-08 19:44:26 +00:00  
				
					
						
							
							
								 
						
							
								caa12cfa75 
								
							 
						 
						
							
							
								
								Should invokify is always true  
							
							... 
							
							
							
							llvm-svn: 8409 
							
						 
						
							2003-09-08 19:00:30 +00:00  
				
					
						
							
							
								 
						
							
								9c58cf6d03 
								
							 
						 
						
							
							
								
								Add support for the unwind instruction  
							
							... 
							
							
							
							llvm-svn: 8408 
							
						 
						
							2003-09-08 18:54:55 +00:00  
				
					
						
							
							
								 
						
							
								01a8391236 
								
							 
						 
						
							
							
								
								Do not hoist volatile loads  
							
							... 
							
							
							
							llvm-svn: 8399 
							
						 
						
							2003-09-08 18:17:14 +00:00  
				
					
						
							
							
								 
						
							
								6181cac0dc 
								
							 
						 
						
							
							
								
								Correct comments  
							
							... 
							
							
							
							Don't include InstLoops.h
Don't export factory functions for these passes
llvm-svn: 8373 
							
						 
						
							2003-09-05 19:43:19 +00:00  
				
					
						
							
							
								 
						
							
								f1f7f2c477 
								
							 
						 
						
							
							
								
								Prototype for creator function got moved  
							
							... 
							
							
							
							llvm-svn: 8315 
							
						 
						
							2003-09-01 20:45:33 +00:00  
				
					
						
							
							
								 
						
							
								ffc2d16f21 
								
							 
						 
						
							
							
								
								Final cleanup: remove dead code  
							
							... 
							
							
							
							llvm-svn: 8291 
							
						 
						
							2003-09-01 18:01:36 +00:00  
				
					
						
							
							
								 
						
							
								267f20475b 
								
							 
						 
						
							
							
								
								Not only is this a lot smaller, it actually works if there is already a  
							
							... 
							
							
							
							function with the right name in the module.
llvm-svn: 8290 
							
						 
						
							2003-09-01 16:53:46 +00:00  
				
					
						
							
							
								 
						
							
								5b8addab9b 
								
							 
						 
						
							
							
								
								Dead files  
							
							... 
							
							
							
							llvm-svn: 8289 
							
						 
						
							2003-09-01 16:49:57 +00:00  
				
					
						
							
							
								 
						
							
								d4a1af7d49 
								
							 
						 
						
							
							
								
								If "These should be used only by the auto-parallelization pass", we might as  
							
							... 
							
							
							
							well put them INTO the auto-par pass.
llvm-svn: 8288 
							
						 
						
							2003-09-01 16:49:38 +00:00  
				
					
						
							
							
								 
						
							
								685dc1ea98 
								
							 
						 
						
							
							
								
								Moved all of the cilkifier stuff into lib/Transforms/IPO, as it really is not  
							
							... 
							
							
							
							support stuff.
llvm-svn: 8287 
							
						 
						
							2003-09-01 16:45:30 +00:00  
				
					
						
							
							
								 
						
							
								6c6ba71cea 
								
							 
						 
						
							
							
								
								Minor cleanups  
							
							... 
							
							
							
							Do not #include Parallelize.h, it's just a subset of Cilkifier.h
llvm-svn: 8285 
							
						 
						
							2003-09-01 16:42:16 +00:00  
				
					
						
							
							
								 
						
							
								8ef1b88aef 
								
							 
						 
						
							
							
								
								Change the RaiseAllocations pass to be a Pass instead of a BasicBlock pass.  
							
							... 
							
							
							
							This makes it more efficient: it doesn't have to scan the whole program, so
it performs work proportional to the number of malloc/free calls in the
program, not the size of the program.
llvm-svn: 8280 
							
						 
						
							2003-09-01 03:14:56 +00:00  
				
					
						
							
							
								 
						
							
								1c884e18e1 
								
							 
						 
						
							
							
								
								Fix bug: TailDuplicate/2003-08-31-UnreachableBlocks.ll  
							
							... 
							
							
							
							llvm-svn: 8276 
							
						 
						
							2003-08-31 21:17:44 +00:00  
				
					
						
							
							
								 
						
							
								d075cc282b 
								
							 
						 
						
							
							
								
								Heavily refactor code:  
							
							... 
							
							
							
							* Separate the policy decisions into a derived class [InlineSimple]
  * Move the inlining mechanics into a base class [Inliner]
  * Change the inliner to be an SCCPass, making it more structured and
    eventually pipelinable with other SCC passes
llvm-svn: 8257 
							
						 
						
							2003-08-31 19:10:30 +00:00  
				
					
						
							
							
								 
						
							
								75444c751f 
								
							 
						 
						
							
							
								
								Add accessor function  
							
							... 
							
							
							
							llvm-svn: 8253 
							
						 
						
							2003-08-31 16:30:07 +00:00  
				
					
						
							
							
								 
						
							
								0a3f8d5dcd 
								
							 
						 
						
							
							
								
								Initial checkin of the -prune-eh pass, a very simple exception handling removal pass  
							
							... 
							
							
							
							llvm-svn: 8250 
							
						 
						
							2003-08-31 02:47:32 +00:00  
				
					
						
							
							
								 
						
							
								c817458b66 
								
							 
						 
						
							
							
								
								ScalarRepl does not modify the CFG.  Say so!  
							
							... 
							
							
							
							llvm-svn: 8243 
							
						 
						
							2003-08-31 00:45:13 +00:00  
				
					
						
							
							
								 
						
							
								2887328770 
								
							 
						 
						
							
							
								
								Use new interface, simplifies code  
							
							... 
							
							
							
							llvm-svn: 8242 
							
						 
						
							2003-08-31 00:22:27 +00:00  
				
					
						
							
							
								 
						
							
								25bc3f86de 
								
							 
						 
						
							
							
								
								Use the new interface, simplifies code  
							
							... 
							
							
							
							NOTE that these two files are _BUGGY_ and need to be fixed, just not by me  :)
llvm-svn: 8241 
							
						 
						
							2003-08-31 00:21:59 +00:00  
				
					
						
							
							
								 
						
							
								ea27751e4b 
								
							 
						 
						
							
							
								
								Use the new interface, simplifies code  
							
							... 
							
							
							
							Delete a bunch of commented out code
llvm-svn: 8240 
							
						 
						
							2003-08-31 00:21:05 +00:00  
				
					
						
							
							
								 
						
							
								8e6ac1bf10 
								
							 
						 
						
							
							
								
								Use the new interface, simplifies code  
							
							... 
							
							
							
							llvm-svn: 8239 
							
						 
						
							2003-08-31 00:20:36 +00:00  
				
					
						
							
							
								 
						
							
								66cc0141b0 
								
							 
						 
						
							
							
								
								Fix bug where we considered function types equivalent even if they had differing numbers of arguments  
							
							... 
							
							
							
							llvm-svn: 8178 
							
						 
						
							2003-08-28 16:42:50 +00:00  
				
					
						
							
							
								 
						
							
								df741d62de 
								
							 
						 
						
							
							
								
								Fix bug: SCCP/2003-08-26-InvokeHandling.ll  
							
							... 
							
							
							
							llvm-svn: 8152 
							
						 
						
							2003-08-27 01:08:35 +00:00  
				
					
						
							
							
								 
						
							
								be8d6816d0 
								
							 
						 
						
							
							
								
								Remove special casing  
							
							... 
							
							
							
							llvm-svn: 8144 
							
						 
						
							2003-08-25 22:34:15 +00:00  
				
					
						
							
							
								 
						
							
								4f05103ad2 
								
							 
						 
						
							
							
								
								Fix bug: Linker/2003-08-23-GlobalVarLinking.ll  
							
							... 
							
							
							
							llvm-svn: 8130 
							
						 
						
							2003-08-24 19:30:20 +00:00  
				
					
						
							
							
								 
						
							
								3ba0f88a0a 
								
							 
						 
						
							
							
								
								Implement: Linker/2003-08-24-InheritPtrSize.ll  
							
							... 
							
							
							
							llvm-svn: 8129 
							
						 
						
							2003-08-24 19:26:42 +00:00  
				
					
						
							
							
								 
						
							
								3f5823f131 
								
							 
						 
						
							
							
								
								Implement SimplifyCFG/InvokeEliminate.ll  
							
							... 
							
							
							
							llvm-svn: 8126 
							
						 
						
							2003-08-24 18:36:16 +00:00  
				
					
						
							
							
								 
						
							
								0f98032fd8 
								
							 
						 
						
							
							
								
								rethrow is really the language independent primitive here.  "throw" can be written  
							
							... 
							
							
							
							in terms of it and llvm.exc.setcurrent.
Rework the intrinsics.
llvm-svn: 8111 
							
						 
						
							2003-08-24 12:24:11 +00:00  
				
					
						
							
							
								 
						
							
								d367d0553e 
								
							 
						 
						
							
							
								
								Inline invoke instructions as well as call instructions  
							
							... 
							
							
							
							llvm-svn: 8107 
							
						 
						
							2003-08-24 06:59:28 +00:00  
				
					
						
							
							
								 
						
							
								0cc265e6bf 
								
							 
						 
						
							
							
								
								*** Implement inlining of Invoke instructions!  
							
							... 
							
							
							
							llvm-svn: 8106 
							
						 
						
							2003-08-24 06:59:16 +00:00  
				
					
						
							
							
								 
						
							
								9c5bfd0f80 
								
							 
						 
						
							
							
								
								Big diff for a small change: delete inlined functions if all callees have  
							
							... 
							
							
							
							inlined the function.
Implements: Inline/inline_dce.ll
llvm-svn: 8101 
							
						 
						
							2003-08-24 05:03:14 +00:00  
				
					
						
							
							
								 
						
							
								fc3fe5cd75 
								
							 
						 
						
							
							
								
								Implement: Inline/cfg_preserve_test.ll  
							
							... 
							
							
							
							llvm-svn: 8099 
							
						 
						
							2003-08-24 04:06:56 +00:00  
				
					
						
							
							
								 
						
							
								c54d608377 
								
							 
						 
						
							
							
								
								Implement SimplifyCFG/2003-08-17-FoldSwitch.ll:test5  
							
							... 
							
							
							
							llvm-svn: 8093 
							
						 
						
							2003-08-23 23:18:19 +00:00  
				
					
						
							
							
								 
						
							
								f1b1c5ec2f 
								
							 
						 
						
							
							
								
								Fix bug: LowerSwitch/2003-08-23-EmptySwitch.ll  
							
							... 
							
							
							
							llvm-svn: 8087 
							
						 
						
							2003-08-23 22:54:34 +00:00  
				
					
						
							
							
								 
						
							
								02da0ef418 
								
							 
						 
						
							
							
								
								Do not consider any types that exist in the global symbol table!  
							
							... 
							
							
							
							llvm-svn: 8084 
							
						 
						
							2003-08-23 21:32:24 +00:00  
				
					
						
							
							
								 
						
							
								f38c0483ba 
								
							 
						 
						
							
							
								
								Fix bug: Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll  
							
							... 
							
							
							
							llvm-svn: 8083 
							
						 
						
							2003-08-23 21:25:54 +00:00  
				
					
						
							
							
								 
						
							
								31de50ab44 
								
							 
						 
						
							
							
								
								Implement Linker/2003-08-23-GlobalVarLinking.ll, which should fix 176.gcc  
							
							... 
							
							
							
							llvm-svn: 8080 
							
						 
						
							2003-08-23 20:31:10 +00:00  
				
					
						
							
							
								 
						
							
								bb4dd7ed34 
								
							 
						 
						
							
							
								
								Fix bug: TailDup/2003-08-23-InvalidatedPointers.ll  
							
							... 
							
							
							
							llvm-svn: 8078 
							
						 
						
							2003-08-23 20:08:30 +00:00  
				
					
						
							
							
								 
						
							
								6fc0ee9901 
								
							 
						 
						
							
							
								
								Fix bug: FunctionResolve/2003-08-23-ArgumentWarning.ll  
							
							... 
							
							
							
							llvm-svn: 8076 
							
						 
						
							2003-08-23 20:03:05 +00:00  
				
					
						
							
							
								 
						
							
								954a6095d7 
								
							 
						 
						
							
							
								
								Fix typeo  
							
							... 
							
							
							
							llvm-svn: 8059 
							
						 
						
							2003-08-22 20:16:48 +00:00  
				
					
						
							
							
								 
						
							
								1a8a45977a 
								
							 
						 
						
							
							
								
								The process of linking types can cause their addresses to become invalid.  For this reason, we must use TypeHandles!  
							
							... 
							
							
							
							llvm-svn: 8057 
							
						 
						
							2003-08-22 19:12:55 +00:00  
				
					
						
							
							
								 
						
							
								f872d41f55 
								
							 
						 
						
							
							
								
								Implement Linker/2003-08-20-OpaqueTypeResolve.ll  
							
							... 
							
							
							
							Hopefully this will fix the 176.gcc spec test as well.
llvm-svn: 8051 
							
						 
						
							2003-08-22 06:07:12 +00:00  
				
					
						
							
							
								 
						
							
								be372b91e1 
								
							 
						 
						
							
							
								
								The word `dependent' has no `a'.  
							
							... 
							
							
							
							llvm-svn: 8030 
							
						 
						
							2003-08-21 22:14:26 +00:00  
				
					
						
							
							
								 
						
							
								015d98e940 
								
							 
						 
						
							
							
								
								Unless we CANNOT merge the arguments, do so  
							
							... 
							
							
							
							llvm-svn: 7999 
							
						 
						
							2003-08-20 23:50:38 +00:00  
				
					
						
							
							
								 
						
							
								a34c477b05 
								
							 
						 
						
							
							
								
								Fix grammar, add comment  
							
							... 
							
							
							
							llvm-svn: 7967 
							
						 
						
							2003-08-18 22:54:06 +00:00  
				
					
						
							
							
								 
						
							
								7eb05a170a 
								
							 
						 
						
							
							
								
								Spell `necessary' correctly.  
							
							... 
							
							
							
							llvm-svn: 7944 
							
						 
						
							2003-08-18 14:43:39 +00:00  
				
					
						
							
							
								 
						
							
								821deeeffa 
								
							 
						 
						
							
							
								
								Implement folding of switch instructions.  
							
							... 
							
							
							
							Implements SimplifyCFG/2003-08-17-FoldSwitch.ll
llvm-svn: 7923 
							
						 
						
							2003-08-17 20:21:14 +00:00  
				
					
						
							
							
								 
						
							
								031340a551 
								
							 
						 
						
							
							
								
								Fix bug: SimplifyCFG/2003-08-17-BranchFoldOrdering.ll  
							
							... 
							
							
							
							llvm-svn: 7921 
							
						 
						
							2003-08-17 19:41:53 +00:00  
				
					
						
							
							
								 
						
							
								4b7e3364c7 
								
							 
						 
						
							
							
								
								The fixme is irrelevant: if that happens, the LLVM bytecode is malformed.  
							
							... 
							
							
							
							This fixes testcase: SimplifyCFG/2003-08-17-BranchFold.ll
llvm-svn: 7919 
							
						 
						
							2003-08-17 19:34:55 +00:00  
				
					
						
							
							
								 
						
							
								8c14ba96ca 
								
							 
						 
						
							
							
								
								Factory methods for function passes now return type FunctionPass *.  
							
							... 
							
							
							
							llvm-svn: 7839 
							
						 
						
							2003-08-14 06:09:32 +00:00  
				
					
						
							
							
								 
						
							
								cbf0839a03 
								
							 
						 
						
							
							
								
								Fix FIXME by removing FIXME  
							
							... 
							
							
							
							llvm-svn: 7832 
							
						 
						
							2003-08-13 22:15:04 +00:00  
				
					
						
							
							
								 
						
							
								3ac7c26a1c 
								
							 
						 
						
							
							
								
								Implement instcombine optimizations:  
							
							... 
							
							
							
							(A <setcc1> B) logicalop (A <setcc2> B)  -> (A <setcc3> B) or true or false
Where setcc[123] is one of the 6 setcc instructions, and logicalop is one of: And, Or, Xor
llvm-svn: 7828 
							
						 
						
							2003-08-13 20:16:26 +00:00  
				
					
						
							
							
								 
						
							
								b8b97505ba 
								
							 
						 
						
							
							
								
								Generalize some of the add tests to allow for reassociation to take place  
							
							... 
							
							
							
							llvm-svn: 7825 
							
						 
						
							2003-08-13 19:01:45 +00:00  
				
					
						
							
							
								 
						
							
								89207943a1 
								
							 
						 
						
							
							
								
								Factory methods for FunctionPasses now return type FunctionPass *.  
							
							... 
							
							
							
							llvm-svn: 7823 
							
						 
						
							2003-08-13 18:18:15 +00:00  
				
					
						
							
							
								 
						
							
								8ac196dd3b 
								
							 
						 
						
							
							
								
								Assign arguments different ranks so they get grouped together  
							
							... 
							
							
							
							llvm-svn: 7813 
							
						 
						
							2003-08-13 16:16:26 +00:00  
				
					
						
							
							
								 
						
							
								35364c8408 
								
							 
						 
						
							
							
								
								Removing the pool allocator from the main CVS tree.  
							
							... 
							
							
							
							Use the poolalloc module in CVS from now on.
llvm-svn: 7810 
							
						 
						
							2003-08-13 15:36:15 +00:00  
				
					
						
							
							
								 
						
							
								d07283a2ad 
								
							 
						 
						
							
							
								
								Implement InstCombine/2003-08-12-AllocaNonNull.ll  
							
							... 
							
							
							
							llvm-svn: 7807 
							
						 
						
							2003-08-13 05:38:46 +00:00  
				
					
						
							
							
								 
						
							
								c992add9fe 
								
							 
						 
						
							
							
								
								Do not cannonicalize (X != 0) into (cast X to bool)  
							
							... 
							
							
							
							llvm-svn: 7806 
							
						 
						
							2003-08-13 05:33:12 +00:00  
				
					
						
							
							
								 
						
							
								ede3fe05c5 
								
							 
						 
						
							
							
								
								Change cannonicalization rules: add X,X is represented as multiplies, multiplies  
							
							... 
							
							
							
							of a power of two are represented as a shift.
llvm-svn: 7803 
							
						 
						
							2003-08-13 04:18:28 +00:00  
				
					
						
							
							
								 
						
							
								709a16a0bc 
								
							 
						 
						
							
							
								
								Give std::map<BasicBlock *, BasicBlock *> the short name BBMap, because  
							
							... 
							
							
							
							it's used 7 different times.
Rename `getBackEdges' to `findAndInstrumentBackEdges', for clarity.
Remove some excess whitespace and commented-out code.
Use shorter forms of CallInst ctors.
Do not make `reopt_threshold' visible to the LLVM program, and do not
 pass it to the call to `reoptimizerInitialize'.  Don't pass the
 GlobalVariable representing it to any of our helper methods.
 `reopt_threshold' is an internal parameter of the reoptimizer, which
 InstLoops does not need to know about.
llvm-svn: 7794 
							
						 
						
							2003-08-12 22:00:24 +00:00  
				
					
						
							
							
								 
						
							
								deaa0dd71a 
								
							 
						 
						
							
							
								
								Allow pulling logical operations through shifts.  
							
							... 
							
							
							
							This implements InstCombine/shift.ll:test14*
llvm-svn: 7793 
							
						 
						
							2003-08-12 21:53:41 +00:00  
				
					
						
							
							
								 
						
							
								98b3ecddec 
								
							 
						 
						
							
							
								
								Fix bug: Reassociate/2003-08-12-InfiniteLoop.ll  
							
							... 
							
							
							
							llvm-svn: 7792 
							
						 
						
							2003-08-12 21:45:24 +00:00  
				
					
						
							
							
								 
						
							
								58c7eb60ec 
								
							 
						 
						
							
							
								
								Assign finer grained ranks, make sure to reassociate top-level after reassociating bottom level  
							
							... 
							
							
							
							llvm-svn: 7787 
							
						 
						
							2003-08-12 20:14:27 +00:00  
				
					
						
							
							
								 
						
							
								01d5639515 
								
							 
						 
						
							
							
								
								Simplify code  
							
							... 
							
							
							
							llvm-svn: 7783 
							
						 
						
							2003-08-12 19:17:27 +00:00  
				
					
						
							
							
								 
						
							
								812aab7727 
								
							 
						 
						
							
							
								
								Implement testcases InstCombine/or.ll:test16/test17  
							
							... 
							
							
							
							llvm-svn: 7782 
							
						 
						
							2003-08-12 19:11:07 +00:00  
				
					
						
							
							
								 
						
							
								46d9b22e90 
								
							 
						 
						
							
							
								
								Bug fix: Some nodes pointed to by globals may not be marked incomplete and need to be tracked to find pool arguments  
							
							... 
							
							
							
							llvm-svn: 7763 
							
						 
						
							2003-08-12 00:45:13 +00:00  
				
					
						
							
							
								 
						
							
								603e0076c0 
								
							 
						 
						
							
							
								
								Fix handling of 'free' if it has absolutely no prototype  
							
							... 
							
							
							
							llvm-svn: 7721 
							
						 
						
							2003-08-11 15:05:08 +00:00  
				
					
						
							
							
								 
						
							
								449670a8f7 
								
							 
						 
						
							
							
								
								Fixed a segfault in gccld.  
							
							... 
							
							
							
							The original code does not work because the value from WorkList.end() is
invalidated once WorkList.erase() is called.  To ensure proper functionality,
we must ensure that WorkList.erase() is always called before WorkList.end().
llvm-svn: 7673 
							
						 
						
							2003-08-07 14:43:13 +00:00  
				
					
						
							
							
								 
						
							
								0b83080595 
								
							 
						 
						
							
							
								
								Added code for pool allocating only the pool-allocatable data structures in the presence of collapsed nodes + a couple of bug fixes  
							
							... 
							
							
							
							llvm-svn: 7662 
							
						 
						
							2003-08-07 05:29:28 +00:00  
				
					
						
							
							
								 
						
							
								c592c9f8a3 
								
							 
						 
						
							
							
								
								Remove unnecessary use of NonCopyable  
							
							... 
							
							
							
							llvm-svn: 7641 
							
						 
						
							2003-08-06 17:16:24 +00:00  
				
					
						
							
							
								 
						
							
								dc3c9a8545 
								
							 
						 
						
							
							
								
								Fixed minor bug in SafeToHoist and made some changes suggested by Chris.  
							
							... 
							
							
							
							llvm-svn: 7614 
							
						 
						
							2003-08-05 20:39:02 +00:00  
				
					
						
							
							
								 
						
							
								57c03df032 
								
							 
						 
						
							
							
								
								Fixed LICM bug that hoists trapping instructions that are not guaranteed to execute.  
							
							... 
							
							
							
							llvm-svn: 7612 
							
						 
						
							2003-08-05 18:45:46 +00:00  
				
					
						
							
							
								 
						
							
								adc5a89a3b 
								
							 
						 
						
							
							
								
								Minor changes:  
							
							... 
							
							
							
							* Expand most tabs into spaces
  * Move #define DEBUG_TYPE to top of file to avoid warning
llvm-svn: 7611 
							
						 
						
							2003-08-05 18:44:12 +00:00  
				
					
						
							
							
								 
						
							
								0383a65103 
								
							 
						 
						
							
							
								
								Major bug fixes including a memory leak and tracking some exceptional conditions. Also added support for including global and indirect call information in the DS graphs used by the pool allocation  
							
							... 
							
							
							
							llvm-svn: 7605 
							
						 
						
							2003-08-05 17:01:54 +00:00  
				
					
						
							
							
								 
						
							
								edc8c54e16 
								
							 
						 
						
							
							
								
								Fix bug: SimplifyCFG/2003-08-05-InvokeCrash.ll  
							
							... 
							
							
							
							Fix bug: SimplifyCFG/2003-08-05-MishandleInvoke.ll
llvm-svn: 7599 
							
						 
						
							2003-08-05 16:27:44 +00:00  
				
					
						
							
							
								 
						
							
								8abcd56c74 
								
							 
						 
						
							
							
								
								DEBUG got moved to Support/Debug.h  
							
							... 
							
							
							
							llvm-svn: 7492 
							
						 
						
							2003-08-01 22:15:03 +00:00  
				
					
						
							
							
								 
						
							
								ab780dfab5 
								
							 
						 
						
							
							
								
								Instcombine: (A >> c1) << c2 for signed integers  
							
							... 
							
							
							
							llvm-svn: 7295 
							
						 
						
							2003-07-24 18:38:56 +00:00  
				
					
						
							
							
								 
						
							
								3204d4ed4e 
								
							 
						 
						
							
							
								
								Reorganization of code, no functional changes.  
							
							... 
							
							
							
							Now it shoudl be a bit more efficient
llvm-svn: 7292 
							
						 
						
							2003-07-24 17:52:58 +00:00  
				
					
						
							
							
								 
						
							
								dfae8be3c9 
								
							 
						 
						
							
							
								
								Allow folding several instructions into casts, which can simplify a lot  
							
							... 
							
							
							
							of codes.  For example,
short kernel (short t1) {
  t1 >>= 8; t1 <<= 8;
  return t1;
}
became:
short %kernel(short %t1.1) {
        %tmp.3 = shr short %t1.1, ubyte 8               ; <short> [#uses=1]
        %tmp.5 = cast short %tmp.3 to int               ; <int> [#uses=1]
        %tmp.7 = shl int %tmp.5, ubyte 8                ; <int> [#uses=1]
        %tmp.8 = cast int %tmp.7 to short               ; <short> [#uses=1]
        ret short %tmp.8
}
before, now it becomes:
short %kernel(short %t1.1) {
        %tmp.3 = shr short %t1.1, ubyte 8               ; <short> [#uses=1]
        %tmp.8 = shl short %tmp.3, ubyte 8              ; <short> [#uses=1]
        ret short %tmp.8
}
which will become:
short %kernel(short %t1.1) {
        %tmp.3 = and short %t1.1, 0xFF00
        ret short %tmp.3
}
This implements cast-set.ll:test4 and test5
llvm-svn: 7290 
							
						 
						
							2003-07-24 17:35:25 +00:00  
				
					
						
							
							
								 
						
							
								727c03a665 
								
							 
						 
						
							
							
								
								Minor cleanups  
							
							... 
							
							
							
							llvm-svn: 7289 
							
						 
						
							2003-07-24 17:31:56 +00:00  
				
					
						
							
							
								 
						
							
								e9340228c9 
								
							 
						 
						
							
							
								
								Fix bug: FunctionResolve/2003-07-23-CPR-Reference.ll  
							
							... 
							
							
							
							This fixes a long time annoyance which caused prototypes for bzero, bcopy,
bcmp, fputs, and fputs_unlocked to never get deleted.  Grr.
llvm-svn: 7285 
							
						 
						
							2003-07-23 22:03:18 +00:00  
				
					
						
							
							
								 
						
							
								bfb1d03159 
								
							 
						 
						
							
							
								
								Add comments  
							
							... 
							
							
							
							llvm-svn: 7283 
							
						 
						
							2003-07-23 21:41:57 +00:00  
				
					
						
							
							
								 
						
							
								9763859e8d 
								
							 
						 
						
							
							
								
								Remove explicit check for: not (not X) = X, it is already handled because xor is commutative  
							
							... 
							
							
							
							- InstCombine: (X & C1) ^ C2 --> (X & C1) | C2 iff (C1&C2) == 0
  - InstCombine: (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
llvm-svn: 7282 
							
						 
						
							2003-07-23 21:37:07 +00:00  
				
					
						
							
							
								 
						
							
								33217db4d9 
								
							 
						 
						
							
							
								
								InstCombine: (X ^ C1) & C2 --> (X & C2) iff (C1&C2) == 0  
							
							... 
							
							
							
							llvm-svn: 7272 
							
						 
						
							2003-07-23 19:36:21 +00:00  
				
					
						
							
							
								 
						
							
								16464b36ff 
								
							 
						 
						
							
							
								
								- InstCombine: (X | C1) & C2 --> X & C2 iff C1 & C1 == 0  
							
							... 
							
							
							
							- InstCombine: (X | C) & C --> C
  - InstCombine: (X | C1) & C2 --> (X | (C1&C2)) & C2
llvm-svn: 7269 
							
						 
						
							2003-07-23 19:25:52 +00:00  
				
					
						
							
							
								 
						
							
								8f0d15601a 
								
							 
						 
						
							
							
								
								IC: (X & C1) | C2 --> (X | C2) & (C1|C2)  
							
							... 
							
							
							
							IC: (X ^ C1) | C2 --> (X | C2) ^ (C1&~C2)
We are now guaranteed that all 'or's will be inside of 'and's, and all 'and's
will be inside of 'xor's, if the second operands are constants.
llvm-svn: 7264 
							
						 
						
							2003-07-23 18:29:44 +00:00  
				
					
						
							
							
								 
						
							
								49b47ae565 
								
							 
						 
						
							
							
								
								IC: (X ^ C1) & C2 --> (X & C2) ^ (C1&C2)  
							
							... 
							
							
							
							Minor code cleanup
llvm-svn: 7262 
							
						 
						
							2003-07-23 17:57:01 +00:00  
				
					
						
							
							
								 
						
							
								cfbce7c880 
								
							 
						 
						
							
							
								
								InstCombine: (X ^ 4) == 8  --> X == 12  
							
							... 
							
							
							
							llvm-svn: 7260 
							
						 
						
							2003-07-23 17:26:36 +00:00  
				
					
						
							
							
								 
						
							
								d492a0b7b4 
								
							 
						 
						
							
							
								
								IC: (X & 5) == 13 --> false  
							
							... 
							
							
							
							IC: (X | 8) == 4  --> false
llvm-svn: 7257 
							
						 
						
							2003-07-23 17:02:11 +00:00  
				
					
						
							
							
								 
						
							
								6077c3195f 
								
							 
						 
						
							
							
								
								Simplify code by using ConstantInt::getRawValue instead of checking to see  
							
							... 
							
							
							
							whether the constant is signed or unsigned, then casting
llvm-svn: 7252 
							
						 
						
							2003-07-23 15:22:26 +00:00  
				
					
						
							
							
								 
						
							
								d78ebd0c6b 
								
							 
						 
						
							
							
								
								Fix bug: TailDup/2003-07-22-InfiniteLoop.ll  
							
							... 
							
							
							
							llvm-svn: 7243 
							
						 
						
							2003-07-23 03:32:41 +00:00  
				
					
						
							
							
								 
						
							
								bdb0ce0605 
								
							 
						 
						
							
							
								
								- InstCombine (cast (xor A, B) to bool) ==> (setne A, B)  
							
							... 
							
							
							
							- InstCombine (cast (and X, (1 << size(X)-1)) to bool) ==> x < 0
llvm-svn: 7241 
							
						 
						
							2003-07-22 21:46:59 +00:00  
				
					
						
							
							
								 
						
							
								d6dcbc6ce8 
								
							 
						 
						
							
							
								
								Added code that checks to see if a global variable is external before replacing  
							
							... 
							
							
							
							a load of the global variable with the variable's constant value.
llvm-svn: 7216 
							
						 
						
							2003-07-21 19:42:57 +00:00  
				
					
						
							
							
								 
						
							
								1db75a0f7c 
								
							 
						 
						
							
							
								
								Added check for inlinable function  
							
							... 
							
							
							
							llvm-svn: 7206 
							
						 
						
							2003-07-18 20:55:26 +00:00  
				
					
						
							
							
								 
						
							
								89233e1c9a 
								
							 
						 
						
							
							
								
								A pass to combine multiple backedges that go to same target  
							
							... 
							
							
							
							llvm-svn: 7201 
							
						 
						
							2003-07-18 16:08:32 +00:00  
				
					
						
							
							
								 
						
							
								0643ceafcf 
								
							 
						 
						
							
							
								
								Dinakar and I fixed a bug where we were trying to get the initializer of  
							
							... 
							
							
							
							an external constant.  Since external constants don't have initializers, we
were failing on an assert() call in llvm/GlobalVariable.h.
llvm-svn: 7193 
							
						 
						
							2003-07-17 19:06:55 +00:00  
				
					
						
							
							
								 
						
							
								ac83df769b 
								
							 
						 
						
							
							
								
								Trace loads and stores as they happen (stores were being  
							
							... 
							
							
							
							remembered in valuesStoredInFunction, but never traced at function return,
and that's too late to be finding the error anyway).
Stores trace both the value and the address being stored to,
but after some experience I think only values should be traced.
The pointer hash table just fills up far too quickly if every
store address were traced.
llvm-svn: 7169 
							
						 
						
							2003-07-11 21:57:43 +00:00  
				
					
						
							
							
								 
						
							
								b3d794a2c9 
								
							 
						 
						
							
							
								
								Added functionality to instrmentation pass  
							
							... 
							
							
							
							llvm-svn: 7161 
							
						 
						
							2003-07-10 21:55:57 +00:00  
				
					
						
							
							
								 
						
							
								3ef61afb76 
								
							 
						 
						
							
							
								
								Merged in autoconf branch.  This provides configuration via the autoconf  
							
							... 
							
							
							
							system.
llvm-svn: 7014 
							
						 
						
							2003-06-30 21:59:07 +00:00  
				
					
						
							
							
								 
						
							
								6e69c28229 
								
							 
						 
						
							
							
								
								Eliminate using declarations, adjust for new DSGraph API  
							
							... 
							
							
							
							llvm-svn: 6992 
							
						 
						
							2003-06-30 03:14:44 +00:00  
				
					
						
							
							
								 
						
							
								fbfcf01b98 
								
							 
						 
						
							
							
								
								Allow the inlining limit to be controlled from the command line!  
							
							... 
							
							
							
							llvm-svn: 6929 
							
						 
						
							2003-06-28 15:57:04 +00:00  
				
					
						
							
							
								 
						
							
								eaae578820 
								
							 
						 
						
							
							
								
								Add support to globaldce for deleting dead function prototypes  
							
							... 
							
							
							
							llvm-svn: 6918 
							
						 
						
							2003-06-26 05:41:18 +00:00  
				
					
						
							
							
								 
						
							
								fd5d323ea9 
								
							 
						 
						
							
							
								
								When internalizing global ctor/dtor list, also mark it constant.  This is gross, but  
							
							... 
							
							
							
							until DSA is working all of the time and is totally reliable, we do this.
llvm-svn: 6917 
							
						 
						
							2003-06-26 05:30:40 +00:00  
				
					
						
							
							
								 
						
							
								0f1d8a3947 
								
							 
						 
						
							
							
								
								Add support for elimination of load instruction from global constants  
							
							... 
							
							
							
							llvm-svn: 6912 
							
						 
						
							2003-06-26 05:06:25 +00:00  
				
					
						
							
							
								 
						
							
								35236d8477 
								
							 
						 
						
							
							
								
								Instcombine:  X * -1 -> -X  
							
							... 
							
							
							
							llvm-svn: 6904 
							
						 
						
							2003-06-25 17:09:20 +00:00  
				
					
						
							
							
								 
						
							
								b396afde26 
								
							 
						 
						
							
							
								
								Fix bug: Mem2Reg/2003-06-26-IterativePromote.ll  
							
							... 
							
							
							
							llvm-svn: 6901 
							
						 
						
							2003-06-25 14:58:56 +00:00  
				
					
						
							
							
								 
						
							
								2ab04f7a41 
								
							 
						 
						
							
							
								
								Add argument to DAE to allow operation on non-internal functions  
							
							... 
							
							
							
							llvm-svn: 6895 
							
						 
						
							2003-06-25 04:12:49 +00:00  
				
					
						
							
							
								 
						
							
								ee967711e9 
								
							 
						 
						
							
							
								
								Fix bug: ADCE/2003-06-24-BadSuccessor.ll  
							
							... 
							
							
							
							llvm-svn: 6891 
							
						 
						
							2003-06-24 23:02:45 +00:00  
				
					
						
							
							
								 
						
							
								834105502d 
								
							 
						 
						
							
							
								
								Do not mark ALL terminators live if any instruciton in the block is live.  We only  
							
							... 
							
							
							
							want to mark it live if it is an unconditional branch.  This fixes bug:
ADCE/2002-05-28-Crash.ll and makes this pass _much_ more useful.
llvm-svn: 6887 
							
						 
						
							2003-06-24 21:49:45 +00:00  
				
					
						
							
							
								 
						
							
								7e270580c8 
								
							 
						 
						
							
							
								
								Fix bug: SCCP/2003-06-24-OverdefinedPHIValue.ll  
							
							... 
							
							
							
							llvm-svn: 6883 
							
						 
						
							2003-06-24 20:29:52 +00:00  
				
					
						
							
							
								 
						
							
								f7544873de 
								
							 
						 
						
							
							
								
								Fix bug: TailDup/2003-06-24-Simpleloop.ll  
							
							... 
							
							
							
							llvm-svn: 6881 
							
						 
						
							2003-06-24 19:48:06 +00:00  
				
					
						
							
							
								 
						
							
								55d4bda861 
								
							 
						 
						
							
							
								
								Implement new transforms:  
							
							... 
							
							
							
							Replace (cast (sub A, B) to bool) -> (setne A, B)
  Replace (cast (add A, B) to bool) -> (setne A, -B)
llvm-svn: 6873 
							
						 
						
							2003-06-23 21:59:52 +00:00  
				
					
						
							
							
								 
						
							
								bf2c46254a 
								
							 
						 
						
							
							
								
								avoid dividing by zero when dealing with zero sized types (like [0 x double])  
							
							... 
							
							
							
							llvm-svn: 6862 
							
						 
						
							2003-06-23 17:36:49 +00:00  
				
					
						
							
							
								 
						
							
								92963de6fa 
								
							 
						 
						
							
							
								
								Add paranoia checking  
							
							... 
							
							
							
							llvm-svn: 6856 
							
						 
						
							2003-06-22 20:46:00 +00:00  
				
					
						
							
							
								 
						
							
								268c1392da 
								
							 
						 
						
							
							
								
								Test change  
							
							... 
							
							
							
							llvm-svn: 6852 
							
						 
						
							2003-06-22 20:25:27 +00:00  
				
					
						
							
							
								 
						
							
								a5434caa5c 
								
							 
						 
						
							
							
								
								Initial checkin of Tail duplication pass.  
							
							... 
							
							
							
							llvm-svn: 6846 
							
						 
						
							2003-06-22 20:10:28 +00:00  
				
					
						
							
							
								 
						
							
								d0d51605b2 
								
							 
						 
						
							
							
								
								Instcombine cast (getelementptr Ptr, 0, 0, 0) to ... into: cast Ptr to ...  
							
							... 
							
							
							
							This fixes type safety problems in a variety of benchmarks that were confusing
DSA.
llvm-svn: 6837 
							
						 
						
							2003-06-21 23:12:02 +00:00  
				
					
						
							
							
								 
						
							
								0024dff76f 
								
							 
						 
						
							
							
								
								Fix the build.  :(  
							
							... 
							
							
							
							llvm-svn: 6797 
							
						 
						
							2003-06-20 14:36:52 +00:00  
				
					
						
							
							
								 
						
							
								d01460495e 
								
							 
						 
						
							
							
								
								Changes to privatize NodeType  
							
							... 
							
							
							
							llvm-svn: 6795 
							
						 
						
							2003-06-19 21:15:26 +00:00  
				
					
						
							
							
								 
						
							
								970c33abb1 
								
							 
						 
						
							
							
								
								Implement the functionality of InstCombine/call.ll  
							
							... 
							
							
							
							llvm-svn: 6783 
							
						 
						
							2003-06-19 17:00:31 +00:00  
				
					
						
							
							
								 
						
							
								bbe2dab909 
								
							 
						 
						
							
							
								
								Remove a bunch of complicated code.  The functionality is implemented in instcombine instead  
							
							... 
							
							
							
							llvm-svn: 6782 
							
						 
						
							2003-06-19 16:59:19 +00:00  
				
					
						
							
							
								 
						
							
								5d3c145d4e 
								
							 
						 
						
							
							
								
								Handle arguments passed in through the va_arg area  
							
							... 
							
							
							
							llvm-svn: 6769 
							
						 
						
							2003-06-18 16:25:51 +00:00  
				
					
						
							
							
								 
						
							
								13bf28c00a 
								
							 
						 
						
							
							
								
								Initial checkin of DAE pass  
							
							... 
							
							
							
							llvm-svn: 6759 
							
						 
						
							2003-06-17 22:21:05 +00:00  
				
					
						
							
							
								 
						
							
								2a8c301c9f 
								
							 
						 
						
							
							
								
								Don't corrupt memory when removing an instruction from the program, but  
							
							... 
							
							
							
							not the worklist
llvm-svn: 6733 
							
						 
						
							2003-06-17 03:57:18 +00:00  
				
					
						
							
							
								 
						
							
								dc62f1e021 
								
							 
						 
						
							
							
								
								Fix bug: ADCE/2003-06-11-InvalidCFG.ll  
							
							... 
							
							
							
							This was because we were deleting large chunks of functions without an exit block, because the post-dominance
information was not useful.  This broke crafty and twolf.
llvm-svn: 6698 
							
						 
						
							2003-06-16 12:10:45 +00:00  
				
					
						
							
							
								 
						
							
								706548fca7 
								
							 
						 
						
							
							
								
								Fix bug: LevelRaise/2003-06-07-EmptyArrayTest.ll  
							
							... 
							
							
							
							llvm-svn: 6669 
							
						 
						
							2003-06-07 21:45:42 +00:00  
				
					
						
							
							
								 
						
							
								bf2be2163b 
								
							 
						 
						
							
							
								
								Fix compilation problem on GCC 2.9x  
							
							... 
							
							
							
							llvm-svn: 6667 
							
						 
						
							2003-06-07 20:29:58 +00:00  
				
					
						
							
							
								 
						
							
								45789aca97 
								
							 
						 
						
							
							
								
								Fix bug: InstCombine/2003-06-05-BranchInvertInfLoop.ll  
							
							... 
							
							
							
							llvm-svn: 6630 
							
						 
						
							2003-06-05 20:12:51 +00:00  
				
					
						
							
							
								 
						
							
								2fd8edd659 
								
							 
						 
						
							
							
								
								Fixed a bug so initialization code is always inserted in main  
							
							... 
							
							
							
							llvm-svn: 6622 
							
						 
						
							2003-06-05 06:02:46 +00:00  
				
					
						
							
							
								 
						
							
								3cc301834e 
								
							 
						 
						
							
							
								
								Use a constant expr GEP instead of an actual instruction  
							
							... 
							
							
							
							llvm-svn: 6620 
							
						 
						
							2003-06-05 04:48:18 +00:00  
				
					
						
							
							
								 
						
							
								a485efa141 
								
							 
						 
						
							
							
								
								Make this work with counter > 127  
							
							... 
							
							
							
							llvm-svn: 6613 
							
						 
						
							2003-06-04 20:08:47 +00:00  
				
					
						
							
							
								 
						
							
								c318ca1a51 
								
							 
						 
						
							
							
								
								Made changes suggested by Chris  
							
							... 
							
							
							
							llvm-svn: 6606 
							
						 
						
							2003-06-04 08:03:57 +00:00  
				
					
						
							
							
								 
						
							
								e967b348bf 
								
							 
						 
						
							
							
								
								Clean up previous code.  
							
							... 
							
							
							
							Add new combination to turn seteq X, 0 -> not(cast X to bool)
llvm-svn: 6604 
							
						 
						
							2003-06-04 05:10:11 +00:00  
				
					
						
							
							
								 
						
							
								9eef8a78b4 
								
							 
						 
						
							
							
								
								Implement combination of boolean not with branch  
							
							... 
							
							
							
							llvm-svn: 6599 
							
						 
						
							2003-06-04 04:46:00 +00:00  
				
					
						
							
							
								 
						
							
								791ac1a4c8 
								
							 
						 
						
							
							
								
								Implement xform: (X != 0) -> (bool)X  
							
							... 
							
							
							
							llvm-svn: 6506 
							
						 
						
							2003-06-01 03:35:25 +00:00  
				
					
						
							
							
								 
						
							
								03a2134253 
								
							 
						 
						
							
							
								
								Added the #(internal functions) to output  
							
							... 
							
							
							
							llvm-svn: 6502 
							
						 
						
							2003-06-01 02:40:49 +00:00  
				
					
						
							
							
								 
						
							
								2b1329611b 
								
							 
						 
						
							
							
								
								Fix bug: FunctionResolve/2003-05-31-AllInternalDecls.ll  
							
							... 
							
							
							
							llvm-svn: 6486 
							
						 
						
							2003-05-31 21:57:06 +00:00  
				
					
						
							
							
								 
						
							
								080436820e 
								
							 
						 
						
							
							
								
								Fix bug: FuncResolve/2003-05-31-InternalDecl.ll  
							
							... 
							
							
							
							Count resolutions correctly.
llvm-svn: 6482 
							
						 
						
							2003-05-31 21:08:45 +00:00  
				
					
						
							
							
								 
						
							
								709c1d469b 
								
							 
						 
						
							
							
								
								Simplify funcresolve a bit more  
							
							... 
							
							
							
							llvm-svn: 6480 
							
						 
						
							2003-05-31 20:44:46 +00:00  
				
					
						
							
							
								 
						
							
								5ef98de61c 
								
							 
						 
						
							
							
								
								Fix bug: FunctionResolve/2003-05-31-FuncPointerResolve.ll  
							
							... 
							
							
							
							llvm-svn: 6479 
							
						 
						
							2003-05-31 20:33:31 +00:00  
				
					
						
							
							
								 
						
							
								e2d74c1c81 
								
							 
						 
						
							
							
								
								Fixed comment width, changed arg to be const, fixed indentation, removed unnecessary includes.  
							
							... 
							
							
							
							llvm-svn: 6476 
							
						 
						
							2003-05-31 20:01:37 +00:00  
				
					
						
							
							
								 
						
							
								0078d9c5bb 
								
							 
						 
						
							
							
								
								Okay totally give up on trying to optimize aggregates that cannot be completely  
							
							... 
							
							
							
							broken up into their elements.  Too many programs break because of this.
llvm-svn: 6440 
							
						 
						
							2003-05-30 19:22:14 +00:00  
				
					
						
							
							
								 
						
							
								d847be0539 
								
							 
						 
						
							
							
								
								add a check that allows the SRoA pass to avoid breaking programs, even if their  
							
							... 
							
							
							
							behavior is technically undefined
llvm-svn: 6438 
							
						 
						
							2003-05-30 18:09:57 +00:00  
				
					
						
							
							
								 
						
							
								71e56e278c 
								
							 
						 
						
							
							
								
								Added the CloneTrace function which clones traces. It takes a vector of basic blocks, removes  
							
							... 
							
							
							
							internal phi nodes, and returns a new vector of basic blocks.
llvm-svn: 6431 
							
						 
						
							2003-05-30 15:50:18 +00:00  
				
					
						
							
							
								 
						
							
								38d88c07f4 
								
							 
						 
						
							
							
								
								Fix bug: ScalarRepl/2003-05-30-MultiLevel.ll  
							
							... 
							
							
							
							llvm-svn: 6428 
							
						 
						
							2003-05-30 05:26:30 +00:00  
				
					
						
							
							
								 
						
							
								6e5398d69d 
								
							 
						 
						
							
							
								
								Fix bug: ScalarRepl/2003-05-29-ArrayFail.ll  
							
							... 
							
							
							
							llvm-svn: 6425 
							
						 
						
							2003-05-30 04:15:41 +00:00  
				
					
						
							
							
								 
						
							
								04c1382291 
								
							 
						 
						
							
							
								
								Added support for function pointers  
							
							... 
							
							
							
							llvm-svn: 6420 
							
						 
						
							2003-05-29 22:42:44 +00:00  
				
					
						
							
							
								 
						
							
								6c81ebc97d 
								
							 
						 
						
							
							
								
								Add comment  
							
							... 
							
							
							
							llvm-svn: 6415 
							
						 
						
							2003-05-29 20:26:30 +00:00  
				
					
						
							
							
								 
						
							
								f789f29aaa 
								
							 
						 
						
							
							
								
								Eliminate unnecessary ->get calls that are now automatically handled.  
							
							... 
							
							
							
							llvm-svn: 6397 
							
						 
						
							2003-05-29 15:12:27 +00:00  
				
					
						
							
							
								 
						
							
								530d4bffbf 
								
							 
						 
						
							
							
								
								* Separate all of the grunt work of inlining out into the Utils library.  
							
							... 
							
							
							
							* Make the function inliner _significantly_ smarter.  :)
llvm-svn: 6396 
							
						 
						
							2003-05-29 15:11:31 +00:00  
				
					
						
							
							
								 
						
							
								3442844742 
								
							 
						 
						
							
							
								
								Fix bug: Instcombine/2003-05-27-ConstExprCrash.ll  
							
							... 
							
							
							
							llvm-svn: 6352 
							
						 
						
							2003-05-27 16:40:51 +00:00  
				
					
						
							
							
								 
						
							
								c16b210349 
								
							 
						 
						
							
							
								
								* Actually USE the statistic that we made  
							
							... 
							
							
							
							* Implement SRoA for arrays
llvm-svn: 6349 
							
						 
						
							2003-05-27 16:09:27 +00:00  
				
					
						
							
							
								 
						
							
								fb41a50d15 
								
							 
						 
						
							
							
								
								Implementation of the simple "scalar replacement of aggregates" transformation  
							
							... 
							
							
							
							llvm-svn: 6346 
							
						 
						
							2003-05-27 15:45:27 +00:00  
				
					
						
							
							
								 
						
							
								196897c424 
								
							 
						 
						
							
							
								
								Fix bug: InstCombine/2003-05-26-CastMiscompile.ll  
							
							... 
							
							
							
							llvm-svn: 6338 
							
						 
						
							2003-05-26 23:41:32 +00:00  
				
					
						
							
							
								 
						
							
								8d0a71aff8 
								
							 
						 
						
							
							
								
								Remove using declarations  
							
							... 
							
							
							
							llvm-svn: 6306 
							
						 
						
							2003-05-22 22:00:07 +00:00  
				
					
						
							
							
								 
						
							
								224ae025ef 
								
							 
						 
						
							
							
								
								Make the list accept comma separated names  
							
							... 
							
							
							
							llvm-svn: 6295 
							
						 
						
							2003-05-22 20:27:13 +00:00  
				
					
						
							
							
								 
						
							
								ad44cd840b 
								
							 
						 
						
							
							
								
								* Revert to old behavior of ignoring a module if it doesn't contain a main  
							
							... 
							
							
							
							function and no symbols were explicitly marked to be externalized.
* Add new -internalize-public-api-list option that can be used if the symbol
  list is small, and making a new file is annoying.
llvm-svn: 6289 
							
						 
						
							2003-05-22 19:48:00 +00:00  
				
					
						
							
							
								 
						
							
								44457bb5ea 
								
							 
						 
						
							
							
								
								Add option to internalize to allow it to read a file to determine which symbols  
							
							... 
							
							
							
							should not be internalized
llvm-svn: 6288 
							
						 
						
							2003-05-22 19:34:49 +00:00  
				
					
						
							
							
								 
						
							
								471bd76281 
								
							 
						 
						
							
							
								
								Minor cleanups.  
							
							... 
							
							
							
							This hunk:
-    } else if (Src->getNumOperands() == 2 && Src->use_size() == 1) {
+    } else if (Src->getNumOperands() == 2) {
Allows GEP folding to be more aggressive, which reduces the number of instructions
and can dramatically speed up BasicAA in some cases.
llvm-svn: 6286 
							
						 
						
							2003-05-22 19:07:21 +00:00  
				
					
						
							
							
								 
						
							
								fa58d79cf2 
								
							 
						 
						
							
							
								
								Fix bug: FunctionResolve/2003-05-21-MissingArguments.ll  
							
							... 
							
							
							
							llvm-svn: 6273 
							
						 
						
							2003-05-21 20:51:52 +00:00  
				
					
						
							
							
								 
						
							
								373086db75 
								
							 
						 
						
							
							
								
								Hopefully, the final fix for `[Pp]ropogate'.  
							
							... 
							
							
							
							llvm-svn: 6251 
							
						 
						
							2003-05-20 21:01:22 +00:00  
				
					
						
							
							
								 
						
							
								e5838c4d72 
								
							 
						 
						
							
							
								
								s/convertable/convertible/g  
							
							... 
							
							
							
							llvm-svn: 6248 
							
						 
						
							2003-05-20 18:45:36 +00:00  
				
					
						
							
							
								 
						
							
								652e7bf8a8 
								
							 
						 
						
							
							
								
								Fix long standing bug  
							
							... 
							
							
							
							llvm-svn: 6232 
							
						 
						
							2003-05-15 18:25:13 +00:00  
				
					
						
							
							
								 
						
							
								25fa9718cb 
								
							 
						 
						
							
							
								
								Fix Bug: Linker/2003-05-15-TypeProblem.ll  
							
							... 
							
							
							
							llvm-svn: 6225 
							
						 
						
							2003-05-15 16:30:55 +00:00  
				
					
						
							
							
								 
						
							
								58ea8ff469 
								
							 
						 
						
							
							
								
								Fix major problem with appending linkage changes  
							
							... 
							
							
							
							llvm-svn: 6185 
							
						 
						
							2003-05-14 12:11:51 +00:00  
				
					
						
							
							
								 
						
							
								f779becc5a 
								
							 
						 
						
							
							
								
								Implement linkage of appending global variables!  
							
							... 
							
							
							
							llvm-svn: 6178 
							
						 
						
							2003-05-13 21:33:43 +00:00  
				
					
						
							
							
								 
						
							
								0895025b30 
								
							 
						 
						
							
							
								
								Fix bug: LoopPreheaders/2003-05-12-PreheaderExitOfChild.ll  
							
							... 
							
							
							
							llvm-svn: 6153 
							
						 
						
							2003-05-12 22:04:34 +00:00  
				
					
						
							
							
								 
						
							
								b02697210e 
								
							 
						 
						
							
							
								
								Handle va_arg instruction correctly  
							
							... 
							
							
							
							llvm-svn: 6030 
							
						 
						
							2003-05-08 02:50:13 +00:00  
				
					
						
							
							
								 
						
							
								fce555a981 
								
							 
						 
						
							
							
								
								Don't inline functions that take variable numbers of arguments!  
							
							... 
							
							
							
							llvm-svn: 6024 
							
						 
						
							2003-05-08 02:36:43 +00:00  
				
					
						
							
							
								 
						
							
								d9bd5a0443 
								
							 
						 
						
							
							
								
								Remove using decl  
							
							... 
							
							
							
							llvm-svn: 6023 
							
						 
						
							2003-05-08 02:34:52 +00:00  
				
					
						
							
							
								 
						
							
								caa1de250b 
								
							 
						 
						
							
							
								
								Attempt to fix sumant's typesafety issue  
							
							... 
							
							
							
							llvm-svn: 5984 
							
						 
						
							2003-05-02 19:32:04 +00:00  
				
					
						
							
							
								 
						
							
								3666378690 
								
							 
						 
						
							
							
								
								Fix spelling  
							
							... 
							
							
							
							llvm-svn: 5983 
							
						 
						
							2003-05-02 19:26:34 +00:00  
				
					
						
							
							
								 
						
							
								df7cc91159 
								
							 
						 
						
							
							
								
								Fix Bug: LowerSwitch/2003-05-01-PHIProblem.ll  
							
							... 
							
							
							
							llvm-svn: 5979 
							
						 
						
							2003-05-01 22:21:21 +00:00  
				
					
						
							
							
								 
						
							
								802c63d964 
								
							 
						 
						
							
							
								
								Fix bug: LevelRaise/2003-05-01-CallCast.ll  
							
							... 
							
							
							
							llvm-svn: 5975 
							
						 
						
							2003-05-01 21:02:53 +00:00  
				
					
						
							
							
								 
						
							
								dd65d863a9 
								
							 
						 
						
							
							
								
								Fix another case where constexprs could cause a crash  
							
							... 
							
							
							
							llvm-svn: 5972 
							
						 
						
							2003-04-30 22:34:06 +00:00  
				
					
						
							
							
								 
						
							
								9244df60d3 
								
							 
						 
						
							
							
								
								Fix constant folding of constexprs  
							
							... 
							
							
							
							llvm-svn: 5971 
							
						 
						
							2003-04-30 22:19:10 +00:00  
				
					
						
							
							
								 
						
							
								fcd1fe4f12 
								
							 
						 
						
							
							
								
								Create constant expression casts instead of constant instructions if possible  
							
							... 
							
							
							
							llvm-svn: 5968 
							
						 
						
							2003-04-28 01:25:38 +00:00  
				
					
						
							
							
								 
						
							
								9810b94850 
								
							 
						 
						
							
							
								
								Fix several bugs:  
							
							... 
							
							
							
							* Warnings were emitted all of the time and were really annoying
  * Functions could not be resolved unless they had external linkage.  Linkonce
    linkage was not allowed
  * ConstantPointerRef's were not handled when linking functions
    we now actually handle cast (CPR) to X -> cast (NewCPR) to X
llvm-svn: 5967 
							
						 
						
							2003-04-28 01:23:29 +00:00  
				
					
						
							
							
								 
						
							
								4a6c3e79b0 
								
							 
						 
						
							
							
								
								Avoid naming things exactly the same  
							
							... 
							
							
							
							llvm-svn: 5966 
							
						 
						
							2003-04-27 22:55:56 +00:00  
				
					
						
							
							
								 
						
							
								b68a34eb3f 
								
							 
						 
						
							
							
								
								Fix bug: ADCE/2003-04-25-PHIPostDominateProblem.ll  
							
							... 
							
							
							
							llvm-svn: 5952 
							
						 
						
							2003-04-25 22:53:27 +00:00  
				
					
						
							
							
								 
						
							
								3c98276168 
								
							 
						 
						
							
							
								
								Fix major problem with PHI node traversal: rechecking PHIs should go into  
							
							... 
							
							
							
							the visit function.  The worklist is for when their lattice value changes.
llvm-svn: 5927 
							
						 
						
							2003-04-25 03:35:10 +00:00  
				
					
						
							
							
								 
						
							
								cccc5c76c8 
								
							 
						 
						
							
							
								
								Minor non-functional changes:  
							
							... 
							
							
							
							* Spell propagate right
  * Improve performance of phi node handling
  * Delete using directive
  * Other minor changes
llvm-svn: 5920 
							
						 
						
							2003-04-25 02:50:03 +00:00  
				
					
						
							
							
								 
						
							
								3a2fe67908 
								
							 
						 
						
							
							
								
								Fix bug: mem2reg/2003-04-24-MultipleIdenticalSuccessors.ll  
							
							... 
							
							
							
							llvm-svn: 5919 
							
						 
						
							2003-04-25 00:54:58 +00:00  
				
					
						
							
							
								 
						
							
								c1f9206c8c 
								
							 
						 
						
							
							
								
								Make the levelraise pass be well behaved w.r.t the TargetData that the current  
							
							... 
							
							
							
							PassMAnager provides.
llvm-svn: 5896 
							
						 
						
							2003-04-24 18:25:27 +00:00  
				
					
						
							
							
								 
						
							
								364437e6a3 
								
							 
						 
						
							
							
								
								Fix iterator invalidation problem  
							
							... 
							
							
							
							llvm-svn: 5895 
							
						 
						
							2003-04-24 17:52:20 +00:00  
				
					
						
							
							
								 
						
							
								b57ed83e28 
								
							 
						 
						
							
							
								
								Make sure that the cloned module retains the type symbol table entries!  
							
							... 
							
							
							
							llvm-svn: 5894 
							
						 
						
							2003-04-24 17:15:33 +00:00  
				
					
						
							
							
								 
						
							
								0aebf8f80a 
								
							 
						 
						
							
							
								
								Make sure to preserve endiannes and pointer size when cloning modules!  
							
							... 
							
							
							
							llvm-svn: 5892 
							
						 
						
							2003-04-24 15:54:40 +00:00  
				
					
						
							
							
								 
						
							
								21a8e8a2c9 
								
							 
						 
						
							
							
								
								Fix Bug: Linker/2003-04-23-LinkOnceLost.ll  
							
							... 
							
							
							
							llvm-svn: 5879 
							
						 
						
							2003-04-23 18:38:39 +00:00  
				
					
						
							
							
								 
						
							
								889f620841 
								
							 
						 
						
							
							
								
								Remove unnecesary &*'s  
							
							... 
							
							
							
							llvm-svn: 5872 
							
						 
						
							2003-04-23 16:37:45 +00:00  
				
					
						
							
							
								 
						
							
								1b094a0f2e 
								
							 
						 
						
							
							
								
								New pass to lower switch instructions to branch instructions  
							
							... 
							
							
							
							llvm-svn: 5865 
							
						 
						
							2003-04-23 16:23:59 +00:00  
				
					
						
							
							
								 
						
							
								1f45f4e4d8 
								
							 
						 
						
							
							
								
								Minor cleanups  
							
							... 
							
							
							
							llvm-svn: 5863 
							
						 
						
							2003-04-23 16:18:14 +00:00  
				
					
						
							
							
								 
						
							
								c6ce4dafbe 
								
							 
						 
						
							
							
								
								Add warning when linking modules with disagreeing target properties  
							
							... 
							
							
							
							llvm-svn: 5845 
							
						 
						
							2003-04-22 19:13:20 +00:00  
				
					
						
							
							
								 
						
							
								d36ad926f2 
								
							 
						 
						
							
							
								
								Preserve the new moduleID field  
							
							... 
							
							
							
							llvm-svn: 5835 
							
						 
						
							2003-04-22 18:02:26 +00:00  
				
					
						
							
							
								 
						
							
								4522f446c1 
								
							 
						 
						
							
							
								
								Fix bug: 2003-01-30-LinkerRename.ll  
							
							... 
							
							
							
							llvm-svn: 5828 
							
						 
						
							2003-04-21 21:15:04 +00:00  
				
					
						
							
							
								 
						
							
								4adb8536d9 
								
							 
						 
						
							
							
								
								Fix linking a function with qualifiers to a external function declaration:  
							
							... 
							
							
							
							Fixed bug: Linker/2003-04-21-Linkage.ll
llvm-svn: 5827 
							
						 
						
							2003-04-21 21:07:05 +00:00  
				
					
						
							
							
								 
						
							
								46371cc500 
								
							 
						 
						
							
							
								
								Fix bug where use still existed in dead code  
							
							... 
							
							
							
							llvm-svn: 5824 
							
						 
						
							2003-04-21 19:15:26 +00:00  
				
					
						
							
							
								 
						
							
								defe5c72e8 
								
							 
						 
						
							
							
								
								Implement: FunctionResolve/2003-04-18-ForwardDeclGlobal.ll  
							
							... 
							
							
							
							llvm-svn: 5816 
							
						 
						
							2003-04-19 00:15:27 +00:00  
				
					
						
							
							
								 
						
							
								5f5d985583 
								
							 
						 
						
							
							
								
								Fix bug: Mem2reg/2003-04-18-DeadBlockProblem.ll  
							
							... 
							
							
							
							llvm-svn: 5810 
							
						 
						
							2003-04-18 19:25:22 +00:00  
				
					
						
							
							
								 
						
							
								424132aa57 
								
							 
						 
						
							
							
								
								Global constants CAN be external  
							
							... 
							
							
							
							llvm-svn: 5808 
							
						 
						
							2003-04-18 04:34:29 +00:00  
				
					
						
							
							
								 
						
							
								e9f4232a70 
								
							 
						 
						
							
							
								
								Refactor CloneFunction to expose the new CloneBasicBlock function  
							
							... 
							
							
							
							llvm-svn: 5806 
							
						 
						
							2003-04-18 03:50:09 +00:00