aca912d793 
								
							 
						 
						
							
							
								
								simplify code, fit in 80 cols.  
							
							... 
							
							
							
							llvm-svn: 50015 
							
						 
						
							2008-04-21 00:23:14 +00:00  
				
					
						
							
							
								 
						
							
								e9ecc68d8f 
								
							 
						 
						
							
							
								
								API changes for class Use size reduction, wave 1.  
							
							... 
							
							
							
							Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277 
							
						 
						
							2008-04-06 20:25:17 +00:00  
				
					
						
							
							
								 
						
							
								11fc6f8765 
								
							 
						 
						
							
							
								
								Update the block cloner which fixes bugpoint on code using unwind_to (phew!)  
							
							... 
							
							
							
							and also update the cloning interface's major user, the loop optimizations.
llvm-svn: 48088 
							
						 
						
							2008-03-09 05:24:34 +00:00  
				
					
						
							
							
								 
						
							
								f3ebc3f3d2 
								
							 
						 
						
							
							
								
								Remove attribution from file headers, per discussion on llvmdev.  
							
							... 
							
							
							
							llvm-svn: 45418 
							
						 
						
							2007-12-29 20:36:04 +00:00  
				
					
						
							
							
								 
						
							
								b0dd27ee91 
								
							 
						 
						
							
							
								
								Make LoopInfoBase more generic, in preparation for having MachineLoopInfo.  This involves a small interface change.  
							
							... 
							
							
							
							llvm-svn: 44348 
							
						 
						
							2007-11-27 03:43:35 +00:00  
				
					
						
							
							
								 
						
							
								4a15e04aee 
								
							 
						 
						
							
							
								
								Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators  
							
							... 
							
							
							
							can have uses too.  Wouldn't it be nice if invoke didn't exist? :)
llvm-svn: 43426 
							
						 
						
							2007-10-29 02:30:37 +00:00  
				
					
						
							
							
								 
						
							
								ca831a829d 
								
							 
						 
						
							
							
								
								Move Split<...>() into DomTreeBase.  This should make the #include's of DominatorInternals.h  
							
							... 
							
							
							
							in CodeExtractor and LoopSimplify unnecessary.
Hartmut, could you confirm that this fixes the issues you were seeing?
llvm-svn: 43115 
							
						 
						
							2007-10-18 05:13:52 +00:00  
				
					
						
							
							
								 
						
							
								2f842e613f 
								
							 
						 
						
							
							
								
								Fixed linker errors (unresolved externals: split<>(...)) when compiling with VC++. Please review.  
							
							... 
							
							
							
							llvm-svn: 43081 
							
						 
						
							2007-10-17 18:37:09 +00:00  
				
					
						
							
							
								 
						
							
								b5933bbbd5 
								
							 
						 
						
							
							
								
								Use SmallVector instead of std::vector.  
							
							... 
							
							
							
							llvm-svn: 41207 
							
						 
						
							2007-08-21 00:31:24 +00:00  
				
					
						
							
							
								 
						
							
								c7ba225705 
								
							 
						 
						
							
							
								
								remove some dead lines  
							
							... 
							
							
							
							llvm-svn: 40859 
							
						 
						
							2007-08-06 06:21:06 +00:00  
				
					
						
							
							
								 
						
							
								a273d1cd3a 
								
							 
						 
						
							
							
								
								Verify loop info.  
							
							... 
							
							
							
							llvm-svn: 40062 
							
						 
						
							2007-07-19 18:02:32 +00:00  
				
					
						
							
							
								 
						
							
								1e2a12019f 
								
							 
						 
						
							
							
								
								Fix reference to iterator invalidated by an erase operation.  Uncovered  
							
							... 
							
							
							
							by _GLIBCXX_DEBUG.
llvm-svn: 37796 
							
						 
						
							2007-06-29 02:53:16 +00:00  
				
					
						
							
							
								 
						
							
								d5258a23a5 
								
							 
						 
						
							
							
								
								Move code to update dominator information after basic block is split  
							
							... 
							
							
							
							from LoopSimplify.cpp to Dominator.cpp
llvm-svn: 37689 
							
						 
						
							2007-06-21 17:23:45 +00:00  
				
					
						
							
							
								 
						
							
								78b9c68164 
								
							 
						 
						
							
							
								
								Add and use DominatorTreeBase::findNearestCommonDominator().  
							
							... 
							
							
							
							llvm-svn: 37545 
							
						 
						
							2007-06-11 23:31:22 +00:00  
				
					
						
							
							
								 
						
							
								536ac4dca7 
								
							 
						 
						
							
							
								
								Simplify.  
							
							... 
							
							
							
							llvm-svn: 37542 
							
						 
						
							2007-06-11 21:45:31 +00:00  
				
					
						
							
							
								 
						
							
								d18054afcf 
								
							 
						 
						
							
							
								
								simplify  
							
							... 
							
							
							
							llvm-svn: 37541 
							
						 
						
							2007-06-11 21:25:31 +00:00  
				
					
						
							
							
								 
						
							
								ab2eee89a4 
								
							 
						 
						
							
							
								
								Simplify.  Dominator Tree is required so always available.  
							
							... 
							
							
							
							llvm-svn: 37540 
							
						 
						
							2007-06-11 21:18:00 +00:00  
				
					
						
							
							
								 
						
							
								becc466451 
								
							 
						 
						
							
							
								
								Update LoopSimplify to require and preserve DominatorTree only.  
							
							... 
							
							
							
							Now LoopSimplify does not require nor preserve ETForest.
llvm-svn: 37512 
							
						 
						
							2007-06-08 01:50:32 +00:00  
				
					
						
							
							
								 
						
							
								ebc5b96735 
								
							 
						 
						
							
							
								
								s/DominatorTree::createNewNode/DominatorTree::addNewBlock/g  
							
							... 
							
							
							
							llvm-svn: 37415 
							
						 
						
							2007-06-04 16:43:25 +00:00  
				
					
						
							
							
								 
						
							
								bdd1aaef10 
								
							 
						 
						
							
							
								
								s/llvm::DominatorTreeBase::DomTreeNode/llvm::DomTreeNode/g  
							
							... 
							
							
							
							llvm-svn: 37407 
							
						 
						
							2007-06-04 00:32:22 +00:00  
				
					
						
							
							
								 
						
							
								0e8aa7b69a 
								
							 
						 
						
							
							
								
								s/DominatorTreeBase::Node/DominatorTreeBase:DomTreeNode/g  
							
							... 
							
							
							
							llvm-svn: 37403 
							
						 
						
							2007-06-03 06:26:14 +00:00  
				
					
						
							
							
								 
						
							
								e7da2d6ac3 
								
							 
						 
						
							
							
								
								Fix typo in comment.  
							
							... 
							
							
							
							llvm-svn: 36873 
							
						 
						
							2007-05-06 13:37:16 +00:00  
				
					
						
							
							
								 
						
							
								8c78a0bff0 
								
							 
						 
						
							
							
								
								Drop 'const'  
							
							... 
							
							
							
							llvm-svn: 36662 
							
						 
						
							2007-05-03 01:11:54 +00:00  
				
					
						
							
							
								 
						
							
								e95c6ad802 
								
							 
						 
						
							
							
								
								Use 'static const char' instead of 'static const int'.  
							
							... 
							
							
							
							Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.
llvm-svn: 36652 
							
						 
						
							2007-05-02 21:39:20 +00:00  
				
					
						
							
							
								 
						
							
								09f162ca6a 
								
							 
						 
						
							
							
								
								Do not use typeinfo to identify pass in pass manager.  
							
							... 
							
							
							
							llvm-svn: 36632 
							
						 
						
							2007-05-01 21:15:47 +00:00  
				
					
						
							
							
								 
						
							
								83a3adcc3f 
								
							 
						 
						
							
							
								
								Avoid recursion.  
							
							... 
							
							
							
							llvm-svn: 36272 
							
						 
						
							2007-04-20 20:04:37 +00:00  
				
					
						
							
							
								 
						
							
								f35a1dbc7a 
								
							 
						 
						
							
							
								
								Remove ImmediateDominator analysis.  The same information can be obtained from DomTree.  A lot of code for  
							
							... 
							
							
							
							constructing ImmediateDominator is now folded into DomTree construction.
This is part of the ongoing work for PR217.
llvm-svn: 36063 
							
						 
						
							2007-04-15 08:47:27 +00:00  
				
					
						
							
							
								 
						
							
								3c7867935e 
								
							 
						 
						
							
							
								
								Re-constify things that don't break the build.  Last patch in this  
							
							... 
							
							
							
							series, I promise.
llvm-svn: 35848 
							
						 
						
							2007-04-09 23:38:18 +00:00  
				
					
						
							
							
								 
						
							
								f1ca1376d3 
								
							 
						 
						
							
							
								
								Unconst-ify stuff that broke the build.  
							
							... 
							
							
							
							llvm-svn: 35843 
							
						 
						
							2007-04-09 23:08:26 +00:00  
				
					
						
							
							
								 
						
							
								5917716146 
								
							 
						 
						
							
							
								
								Const-ify some parameters, and some cosmetic cleanups.  No functionality  
							
							... 
							
							
							
							change.
llvm-svn: 35842 
							
						 
						
							2007-04-09 22:54:50 +00:00  
				
					
						
							
							
								 
						
							
								e0ef5ac6bd 
								
							 
						 
						
							
							
								
								Tabs -> Spaces  
							
							... 
							
							
							
							llvm-svn: 35841 
							
						 
						
							2007-04-09 22:31:43 +00:00  
				
					
						
							
							
								 
						
							
								83efbc84f7 
								
							 
						 
						
							
							
								
								Improve some _slow_ behavior introduced in my patches the last few days.  
							
							... 
							
							
							
							llvm-svn: 35839 
							
						 
						
							2007-04-09 22:25:09 +00:00  
				
					
						
							
							
								 
						
							
								ae39ca037a 
								
							 
						 
						
							
							
								
								Cleanup some from my DomSet-removal changes.  Add a new  
							
							... 
							
							
							
							isReachableFromEntry
test to ETForest to factor a common test out of code.
llvm-svn: 35786 
							
						 
						
							2007-04-09 00:52:49 +00:00  
				
					
						
							
							
								 
						
							
								e6c64466c7 
								
							 
						 
						
							
							
								
								Remove DominatorSet usage from LoopSimplify. Patch from Owen Anderson.  
							
							... 
							
							
							
							llvm-svn: 35757 
							
						 
						
							2007-04-08 01:04:30 +00:00  
				
					
						
							
							
								 
						
							
								f7ebea1b9f 
								
							 
						 
						
							
							
								
								Add DomSet back, and revert the changes to LoopSimplify.  Apparently the  
							
							... 
							
							
							
							ETForest updating mechanisms don't work as I thought they did.  These changes
will be reapplied once the issue is worked out.
llvm-svn: 35741 
							
						 
						
							2007-04-07 18:23:27 +00:00  
				
					
						
							
							
								 
						
							
								706e97049d 
								
							 
						 
						
							
							
								
								Completely purge DomSet from LoopSimplify.  This is part of the  
							
							... 
							
							
							
							continuing work on PR1171.
llvm-svn: 35730 
							
						 
						
							2007-04-07 06:56:47 +00:00  
				
					
						
							
							
								 
						
							
								910419596e 
								
							 
						 
						
							
							
								
								Expunge a bunch of uses of DomSet from LoopSimplify.  Many more remain.  
							
							... 
							
							
							
							This is the beginning of work for PR1171.
llvm-svn: 35720 
							
						 
						
							2007-04-07 04:37:14 +00:00  
				
					
						
							
							
								 
						
							
								1758cb50de 
								
							 
						 
						
							
							
								
								LoopSimplify::FindPHIToPartitionLoops()  
							
							... 
							
							
							
							Use ETForest instead of DominatorSet.
llvm-svn: 35221 
							
						 
						
							2007-03-20 20:18:12 +00:00  
				
					
						
							
							
								 
						
							
								45f966d80f 
								
							 
						 
						
							
							
								
								switch more statistics over to STATISTIC, eliminating static ctors.  Also,  
							
							... 
							
							
							
							delete some dead ones.
llvm-svn: 32694 
							
						 
						
							2006-12-19 22:17:40 +00:00  
				
					
						
							
							
								 
						
							
								700b873130 
								
							 
						 
						
							
							
								
								Detemplatize the Statistic class.  The only type it is instantiated with  
							
							... 
							
							
							
							is 'unsigned'.
llvm-svn: 32279 
							
						 
						
							2006-12-06 17:46:33 +00:00  
				
					
						
							
							
								 
						
							
								de46e48420 
								
							 
						 
						
							
							
								
								For PR786:  
							
							... 
							
							
							
							Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.
llvm-svn: 31380 
							
						 
						
							2006-11-02 20:25:50 +00:00  
				
					
						
							
							
								 
						
							
								6bd6da4097 
								
							 
						 
						
							
							
								
								Be far more careful when splitting a loop header, either to form a preheader  
							
							... 
							
							
							
							or when splitting loops with a common header into multiple loops.  In particular
the old code would always insert the preheader before the old loop header.  This
is disasterous in cases where the loop hasn't been rotated.  For example, it can
produce code like:
        .. outside the loop...
        jmp LBB1_2      #bb13.outer
LBB1_1: #bb1
        movsd 8(%esp,%esi,8), %xmm1
        mulsd (%edi), %xmm1
        addsd %xmm0, %xmm1
        addl $24, %edi
        incl %esi
        jmp LBB1_3      #bb13
LBB1_2: #bb13.outer
        leal (%edx,%eax,8), %edi
        pxor %xmm1, %xmm1
        xorl %esi, %esi
LBB1_3: #bb13
        movapd %xmm1, %xmm0
        cmpl $4, %esi
        jl LBB1_1       #bb1
Note that the loop body is actually LBB1_1 + LBB1_3, which means that the
loop now contains an uncond branch WITHIN it to jump around the inserted
loop header (LBB1_2).  Doh.
This patch changes the preheader insertion code to insert it in the right
spot, producing this code:
        ... outside the loop, fall into the header ...
LBB1_1: #bb13.outer
        leal (%edx,%eax,8), %esi
        pxor %xmm0, %xmm0
        xorl %edi, %edi
        jmp LBB1_3      #bb13
LBB1_2: #bb1
        movsd 8(%esp,%edi,8), %xmm0
        mulsd (%esi), %xmm0
        addsd %xmm1, %xmm0
        addl $24, %esi
        incl %edi
LBB1_3: #bb13
        movapd %xmm0, %xmm1
        cmpl $4, %edi
        jl LBB1_2       #bb1
Totally crazy, no branch in the loop! :)
llvm-svn: 30587 
							
						 
						
							2006-09-23 08:19:21 +00:00  
				
					
						
							
							
								 
						
							
								608cd05e3f 
								
							 
						 
						
							
							
								
								Teach UpdateDomInfoForRevectoredPreds to handle revectored preds that are not  
							
							... 
							
							
							
							reachable, making it general purpose enough for use by InsertPreheaderForLoop.
Eliminate custom dominfo updating code in InsertPreheaderForLoop, using
UpdateDomInfoForRevectoredPreds instead.
llvm-svn: 30586 
							
						 
						
							2006-09-23 07:40:52 +00:00  
				
					
						
							
							
								 
						
							
								c2d3d3112e 
								
							 
						 
						
							
							
								
								eliminate RegisterOpt.  It does the same thing as RegisterPass.  
							
							... 
							
							
							
							llvm-svn: 29925 
							
						 
						
							2006-08-27 22:42:52 +00:00  
				
					
						
							
							
								 
						
							
								3d27be1333 
								
							 
						 
						
							
							
								
								s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|  
							
							... 
							
							
							
							llvm-svn: 29911 
							
						 
						
							2006-08-27 12:54:02 +00:00  
				
					
						
							
							
								 
						
							
								f18b396cc2 
								
							 
						 
						
							
							
								
								Don't attempt to split subloops out of a loop with a huge number of backedges.  
							
							... 
							
							
							
							Not only will this take huge amounts of compile time, the resultant loop nests
won't be useful for optimization.  This reduces loopsimplify time on
Transforms/LoopSimplify/2006-08-11-LoopSimplifyLongTime.ll from ~32s to ~0.4s
with a debug build of llvm on a 2.7Ghz G5.
llvm-svn: 29647 
							
						 
						
							2006-08-12 05:25:00 +00:00  
				
					
						
							
							
								 
						
							
								85d9944f9a 
								
							 
						 
						
							
							
								
								Reimplement the loopsimplify code which deletes edges from unreachable  
							
							... 
							
							
							
							blocks that target loop blocks.
Before, the code was run once per loop, and depended on the number of
predecessors each block in the loop had.  Unfortunately, scanning preds can
be really slow when huge numbers of phis exist or when phis with huge numbers
of inputs exist.
Now, the code is run once per function and scans successors instead of preds,
which is far faster.  In addition, the new code is simpler and is goto free,
woo.
This change speeds up a nasty testcase Duraid provided me from taking hours to
taking ~72s with a debug build.  The functionality this implements is already
tested in the testsuite as Transforms/CodeExtractor/2004-03-13-LoopExtractorCrash.ll.
llvm-svn: 29644 
							
						 
						
							2006-08-12 04:51:20 +00:00  
				
					
						
							
							
								 
						
							
								996795b0dd 
								
							 
						 
						
							
							
								
								Use hidden visibility to make symbols in an anonymous namespace get  
							
							... 
							
							
							
							dropped.  This shrinks libllvmgcc.dylib another 67K
llvm-svn: 28975 
							
						 
						
							2006-06-28 23:17:24 +00:00  
				
					
						
							
							
								 
						
							
								9c5693fb2a 
								
							 
						 
						
							
							
								
								Canonicalize inner loops before outer loops.  Inner loop canonicalization  
							
							... 
							
							
							
							can provide work for the outer loop to canonicalize.
This fixes a case that breaks unswitching.
llvm-svn: 26189 
							
						 
						
							2006-02-14 23:06:02 +00:00  
				
					
						
							
							
								 
						
							
								cffbbee8d1 
								
							 
						 
						
							
							
								
								When splitting exit edges to canonicalize loops, make sure to put the new  
							
							... 
							
							
							
							block in the appropriate loop nest.
Third time is the charm, right?
llvm-svn: 26187 
							
						 
						
							2006-02-14 22:34:08 +00:00  
				
					
						
							
							
								 
						
							
								02f53ad3a2 
								
							 
						 
						
							
							
								
								Revert my last patch.  It too breaks stuff  
							
							... 
							
							
							
							llvm-svn: 26128 
							
						 
						
							2006-02-12 01:59:10 +00:00  
				
					
						
							
							
								 
						
							
								35248e06bc 
								
							 
						 
						
							
							
								
								Fix for my previously reverted patch  
							
							... 
							
							
							
							llvm-svn: 26126 
							
						 
						
							2006-02-11 21:24:54 +00:00  
				
					
						
							
							
								 
						
							
								b24ce3a2a8 
								
							 
						 
						
							
							
								
								revert my previous change, it exposed other problems.  
							
							... 
							
							
							
							llvm-svn: 26121 
							
						 
						
							2006-02-11 08:47:47 +00:00  
				
					
						
							
							
								 
						
							
								05bf90dddf 
								
							 
						 
						
							
							
								
								Make this check stricter.  Disallow loop exit blocks from being shared by  
							
							... 
							
							
							
							loops and their subloops.
llvm-svn: 26118 
							
						 
						
							2006-02-11 02:13:17 +00:00  
				
					
						
							
							
								 
						
							
								a6ae101afa 
								
							 
						 
						
							
							
								
								remove dead expr  
							
							... 
							
							
							
							llvm-svn: 26116 
							
						 
						
							2006-02-11 01:43:37 +00:00  
				
					
						
							
							
								 
						
							
								cda4aa6eb4 
								
							 
						 
						
							
							
								
								Teach loopsimplify to update et-forest.  Patch contributed by Daniel Berlin!  
							
							... 
							
							
							
							llvm-svn: 25153 
							
						 
						
							2006-01-09 08:03:08 +00:00  
				
					
						
							
							
								 
						
							
								2b8cbf319c 
								
							 
						 
						
							
							
								
								Update Visual Studio projects to reflect moved file.  
							
							... 
							
							
							
							llvm-svn: 23998 
							
						 
						
							2005-10-26 05:36:51 +00:00