9864df96ba 
								
							 
						 
						
							
							
								
								Add comment  
							
							... 
							
							
							
							llvm-svn: 16400 
							
						 
						
							2004-09-19 01:05:16 +00:00  
				
					
						
							
							
								 
						
							
								6455c51ab6 
								
							 
						 
						
							
							
								
								Fix the inliner to always delete any edges from the external call node to  
							
							... 
							
							
							
							a function being deleted.  Due to optimizations done while inlining, there
can be edges from the external call node to a function node that were not
apparent any longer.
This fixes the compiler crash while compiling 175.vpr
llvm-svn: 16399 
							
						 
						
							2004-09-18 21:37:03 +00:00  
				
					
						
							
							
								 
						
							
								37b6c4f2d2 
								
							 
						 
						
							
							
								
								Convert this pass to be a CallGraphSCCPass instead of a Pass, which eliminates  
							
							... 
							
							
							
							the worklist and makes it more efficient.  This does not change functionality
at all.
llvm-svn: 16390 
							
						 
						
							2004-09-18 00:34:13 +00:00  
				
					
						
							
							
								 
						
							
								5065b240c8 
								
							 
						 
						
							
							
								
								Fix typo in comment  
							
							... 
							
							
							
							llvm-svn: 16384 
							
						 
						
							2004-09-17 03:58:39 +00:00  
				
					
						
							
							
								 
						
							
								7c16caa336 
								
							 
						 
						
							
							
								
								Changes For Bug 352  
							
							... 
							
							
							
							Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137 
							
						 
						
							2004-09-01 22:55:40 +00:00  
				
					
						
							
							
								 
						
							
								14c198d09a 
								
							 
						 
						
							
							
								
								If we are linking two global variables and they have the same size, do not  
							
							... 
							
							
							
							spew warnings, even if the types don't match.
llvm-svn: 15933 
							
						 
						
							2004-08-20 00:30:39 +00:00  
				
					
						
							
							
								 
						
							
								6139134715 
								
							 
						 
						
							
							
								
								Implement test/Regression/Transforms/GlobalConstifier/phi-select.llx  
							
							... 
							
							
							
							This allows more globals to be marked constant, particularly global arrays.
llvm-svn: 15735 
							
						 
						
							2004-08-14 20:57:17 +00:00  
				
					
						
							
							
								 
						
							
								7386e6333d 
								
							 
						 
						
							
							
								
								"extract" the block extractor pass from bugpoint (haha)  
							
							... 
							
							
							
							llvm-svn: 15714 
							
						 
						
							2004-08-13 03:05:17 +00:00  
				
					
						
							
							
								 
						
							
								cde351ee30 
								
							 
						 
						
							
							
								
								This patch makes the inliner refuse to inline functions that have alloca  
							
							... 
							
							
							
							instructions in the body of the function (not the entry block).  This fixes
test/Programs/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c
and test/Programs/External/SPEC/CINT2000/176.gcc on zion.
This should obviously be pulled into 1.3.
llvm-svn: 15684 
							
						 
						
							2004-08-12 05:45:09 +00:00  
				
					
						
							
							
								 
						
							
								4956a32c9e 
								
							 
						 
						
							
							
								
								Fix another really nasty regression that Anshu pointed out.  In cases where  
							
							... 
							
							
							
							dangling constant users were removed from a function, causing it to be dead,
we never removed the call graph edge from the external node to the function.
In most cases, this didn't cause a problem (by luck).  This should definitely
go into 1.3
llvm-svn: 15570 
							
						 
						
							2004-08-08 03:29:50 +00:00  
				
					
						
							
							
								 
						
							
								63b38bd2ed 
								
							 
						 
						
							
							
								
								Fix #includes of i*.h => Instructions.h as per PR403.  
							
							... 
							
							
							
							llvm-svn: 15334 
							
						 
						
							2004-07-29 17:30:56 +00:00  
				
					
						
							
							
								 
						
							
								ec67df0ed1 
								
							 
						 
						
							
							
								
								Ignore instructions that are in trivially dead functions.  This allows us  
							
							... 
							
							
							
							to constify 14 globals instead of 4 in a trivial C++ testcase.
llvm-svn: 15027 
							
						 
						
							2004-07-20 03:58:07 +00:00  
				
					
						
							
							
								 
						
							
								e2774757fe 
								
							 
						 
						
							
							
								
								Fix a performance regression from the CPR patch, simplify code  
							
							... 
							
							
							
							llvm-svn: 14974 
							
						 
						
							2004-07-18 21:34:16 +00:00  
				
					
						
							
							
								 
						
							
								d47504d9db 
								
							 
						 
						
							
							
								
								Strip out and simplify some code.  This also fixes the regression last  
							
							... 
							
							
							
							night compiling cfrac.  It did not realize that code like this:
int G; int *H = &G;
takes the address of G.
llvm-svn: 14973 
							
						 
						
							2004-07-18 19:56:20 +00:00  
				
					
						
							
							
								 
						
							
								199aeb7f59 
								
							 
						 
						
							
							
								
								Avoid an unnecessary isa<Constant>.  
							
							... 
							
							
							
							llvm-svn: 14963 
							
						 
						
							2004-07-18 08:31:18 +00:00  
				
					
						
							
							
								 
						
							
								9238d78dc3 
								
							 
						 
						
							
							
								
								Remove useless statistic, fix some slightly broken logic  
							
							... 
							
							
							
							llvm-svn: 14958 
							
						 
						
							2004-07-18 07:22:58 +00:00  
				
					
						
							
							
								 
						
							
								2da5eee33c 
								
							 
						 
						
							
							
								
								Fix a rather serious bug in previous checkin  
							
							... 
							
							
							
							llvm-svn: 14957 
							
						 
						
							2004-07-18 06:56:58 +00:00  
				
					
						
							
							
								 
						
							
								cb3fb5d4f5 
								
							 
						 
						
							
							
								
								bug 122:  
							
							... 
							
							
							
							- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953 
							
						 
						
							2004-07-18 00:44:37 +00:00  
				
					
						
							
							
								 
						
							
								ef784f01dd 
								
							 
						 
						
							
							
								
								bug 122:  
							
							... 
							
							
							
							- Minimize redundant isa<GlobalValue> usage
llvm-svn: 14948 
							
						 
						
							2004-07-18 00:32:14 +00:00  
				
					
						
							
							
								 
						
							
								5f6815980b 
								
							 
						 
						
							
							
								
								bug 122:  
							
							... 
							
							
							
							- Replace ConstantPointerRef usage with GlobalValue usage
- Rename methods to get ride of ConstantPointerRef usage
llvm-svn: 14945 
							
						 
						
							2004-07-18 00:25:04 +00:00  
				
					
						
							
							
								 
						
							
								83cae64faf 
								
							 
						 
						
							
							
								
								bug 122:  
							
							... 
							
							
							
							- Excise dead CPR procesing.
llvm-svn: 14944 
							
						 
						
							2004-07-18 00:23:51 +00:00  
				
					
						
							
							
								 
						
							
								3b11d3b294 
								
							 
						 
						
							
							
								
								Remove unused file  
							
							... 
							
							
							
							llvm-svn: 14460 
							
						 
						
							2004-06-28 00:46:58 +00:00  
				
					
						
							
							
								 
						
							
								924882f775 
								
							 
						 
						
							
							
								
								These passes are long dead/obsolete.  They never worked in the first place  
							
							... 
							
							
							
							and are a maintenence burden.  Nuke nuke nuke
llvm-svn: 14457 
							
						 
						
							2004-06-28 00:44:18 +00:00  
				
					
						
							
							
								 
						
							
								ddc90adca3 
								
							 
						 
						
							
							
								
								File depends on DSA, moved to lib/Analysis/DataStructure  
							
							... 
							
							
							
							llvm-svn: 14325 
							
						 
						
							2004-06-22 18:11:38 +00:00  
				
					
						
							
							
								 
						
							
								1c676f76b6 
								
							 
						 
						
							
							
								
								Make order of argument addition deterministic.  In particular, the layout  
							
							... 
							
							
							
							of ConstantInt objects in memory used to determine which order arguments
were added in in some cases.
llvm-svn: 14276 
							
						 
						
							2004-06-21 00:07:58 +00:00  
				
					
						
							
							
								 
						
							
								7d30a6c145 
								
							 
						 
						
							
							
								
								Fix the inliner to be deterministic, not letting its output depend on the  
							
							... 
							
							
							
							relative location of Function objects in memory.
llvm-svn: 14260 
							
						 
						
							2004-06-20 04:11:48 +00:00  
				
					
						
							
							
								 
						
							
								1e1abdd6ed 
								
							 
						 
						
							
							
								
								Do not function resolve intrinsics.  This prevents warnings and possible bad  
							
							... 
							
							
							
							things from happening due to
declare bool %llvm.isunordered(double, double)
declare bool %llvm.isunordered(float, float)
llvm-svn: 14219 
							
						 
						
							2004-06-18 05:50:48 +00:00  
				
					
						
							
							
								 
						
							
								6b7275996c 
								
							 
						 
						
							
							
								
								Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()  
							
							... 
							
							
							
							llvm-svn: 14201 
							
						 
						
							2004-06-17 18:19:28 +00:00  
				
					
						
							
							
								 
						
							
								37d2ae92a7 
								
							 
						 
						
							
							
								
								Fix a bug in the -deadtypeelim pass.  The SymbolTable re-write changed it  
							
							... 
							
							
							
							to eliminate the wrong type.
llvm-svn: 13855 
							
						 
						
							2004-05-27 21:16:46 +00:00  
				
					
						
							
							
								 
						
							
								e7e9671cad 
								
							 
						 
						
							
							
								
								Convert to SymbolTable's new iteration interface.  
							
							... 
							
							
							
							llvm-svn: 13754 
							
						 
						
							2004-05-25 08:53:40 +00:00  
				
					
						
							
							
								 
						
							
								6f02714a10 
								
							 
						 
						
							
							
								
								Fix a bug in my previous checkin  
							
							... 
							
							
							
							llvm-svn: 13717 
							
						 
						
							2004-05-24 06:24:46 +00:00  
				
					
						
							
							
								 
						
							
								6754b827c6 
								
							 
						 
						
							
							
								
								Fix cases where we missed inlining some more obvious candidates because the  
							
							... 
							
							
							
							caller was in an SCC.
llvm-svn: 13693 
							
						 
						
							2004-05-23 21:22:17 +00:00  
				
					
						
							
							
								 
						
							
								8d7ff5e3dd 
								
							 
						 
						
							
							
								
								Simplify the interface and remove an unneeded #include  
							
							... 
							
							
							
							llvm-svn: 13692 
							
						 
						
							2004-05-23 21:21:35 +00:00  
				
					
						
							
							
								 
						
							
								254f8f8ad5 
								
							 
						 
						
							
							
								
								Fairly substantial changes to update the alias analysis we are querying as  
							
							... 
							
							
							
							we make the transformation.  This allows us to use interprocedural alias
analyses successfully.
llvm-svn: 13691 
							
						 
						
							2004-05-23 21:21:17 +00:00  
				
					
						
							
							
								 
						
							
								98aa516a9c 
								
							 
						 
						
							
							
								
								Clarify the logic: the flag is renamed to `deleteFn' to signify it will delete  
							
							... 
							
							
							
							the function instead of isolating it. This also means the condition is reversed.
llvm-svn: 13112 
							
						 
						
							2004-04-22 23:00:51 +00:00  
				
					
						
							
							
								 
						
							
								e0682426f0 
								
							 
						 
						
							
							
								
								Add a flag to choose between isolating a function or deleting the function from  
							
							... 
							
							
							
							the Module. The default behavior keeps functionality as before: the chosen
function is the one that remains.
llvm-svn: 13111 
							
						 
						
							2004-04-22 22:52:22 +00:00  
				
					
						
							
							
								 
						
							
								be8bb804c5 
								
							 
						 
						
							
							
								
								Fix an incredibly nasty iterator invalidation problem.  I am too spoiled by ilists :)  
							
							... 
							
							
							
							Eventually it would be nice if CallGraph maintained an ilist of CallGraphNode's instead
of a vector of pointers to them, but today is not that day.
llvm-svn: 13100 
							
						 
						
							2004-04-21 20:44:33 +00:00  
				
					
						
							
							
								 
						
							
								a9691fe70d 
								
							 
						 
						
							
							
								
								Fix typeo  
							
							... 
							
							
							
							llvm-svn: 13089 
							
						 
						
							2004-04-21 14:23:18 +00:00  
				
					
						
							
							
								 
						
							
								c87784f1fc 
								
							 
						 
						
							
							
								
								REALLY fix PR324: don't delete linkonce functions until after the SCC traversal  
							
							... 
							
							
							
							is done, which avoids invalidating iterators in the SCC traversal routines
llvm-svn: 13088 
							
						 
						
							2004-04-20 22:06:53 +00:00  
				
					
						
							
							
								 
						
							
								514934051a 
								
							 
						 
						
							
							
								
								Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llx  
							
							... 
							
							
							
							llvm-svn: 13080 
							
						 
						
							2004-04-20 20:20:59 +00:00  
				
					
						
							
							
								 
						
							
								d72c3eb54e 
								
							 
						 
						
							
							
								
								Change the ExitBlocks list from being explicitly contained in the Loop  
							
							... 
							
							
							
							structure to being dynamically computed on demand.  This makes updating
loop information MUCH easier.
llvm-svn: 13045 
							
						 
						
							2004-04-18 22:14:10 +00:00  
				
					
						
							
							
								 
						
							
								be43544429 
								
							 
						 
						
							
							
								
								Actually update the call graph as the inliner changes it.  This allows us to  
							
							... 
							
							
							
							execute other CallGraphSCCPasses after the inliner without crashing.
llvm-svn: 12861 
							
						 
						
							2004-04-12 05:37:29 +00:00  
				
					
						
							
							
								 
						
							
								08f201bee5 
								
							 
						 
						
							
							
								
								Stop printing Function*  
							
							... 
							
							
							
							llvm-svn: 12857 
							
						 
						
							2004-04-12 04:06:56 +00:00  
				
					
						
							
							
								 
						
							
								d041dcd92f 
								
							 
						 
						
							
							
								
								Simplify code a bit, and be sure to mark the external node as potentially throwing  
							
							... 
							
							
							
							llvm-svn: 12856 
							
						 
						
							2004-04-12 04:06:38 +00:00  
				
					
						
							
							
								 
						
							
								4d25c86b52 
								
							 
						 
						
							
							
								
								Remove the "really gross hacks" that are there to deal with recursive functions.  
							
							... 
							
							
							
							Now we collect all of the call sites we are interested in inlining, then inline
them.  This entirely avoids issues with trying to inline a call site we got by
inlining another call site.  This also eliminates iterator invalidation issues.
llvm-svn: 12770 
							
						 
						
							2004-04-08 06:34:31 +00:00  
				
					
						
							
							
								 
						
							
								e83693560a 
								
							 
						 
						
							
							
								
								Add statistics to the loop extractor.  The loop extractor has successfully  
							
							... 
							
							
							
							extracted all 63 loops for Olden/bh without crashing and without
miscompiling the program!!!
llvm-svn: 12491 
							
						 
						
							2004-03-18 05:46:10 +00:00  
				
					
						
							
							
								 
						
							
								5bce0c807d 
								
							 
						 
						
							
							
								
								Fix problem with PHI nodes having multiple predecessors from different  
							
							... 
							
							
							
							exit nodes
llvm-svn: 12490 
							
						 
						
							2004-03-18 05:43:18 +00:00  
				
					
						
							
							
								 
						
							
								e9235d2dde 
								
							 
						 
						
							
							
								
								The code extractor needs dominator info.  Provide it  
							
							... 
							
							
							
							llvm-svn: 12483 
							
						 
						
							2004-03-18 03:48:06 +00:00  
				
					
						
							
							
								 
						
							
								95ce36da0d 
								
							 
						 
						
							
							
								
								Restore old inlining heuristic.  As the comment indicates, this is a nasty  
							
							... 
							
							
							
							horrible hack.
llvm-svn: 12423 
							
						 
						
							2004-03-15 06:38:14 +00:00  
				
					
						
							
							
								 
						
							
								2f155d8734 
								
							 
						 
						
							
							
								
								Fix several bugs in the loop extractor.  In particular, subloops were never  
							
							... 
							
							
							
							extracted, and a function that contained a single top-level loop never had
the loop extracted, regardless of how much non-loop code there was.
llvm-svn: 12403 
							
						 
						
							2004-03-15 00:02:02 +00:00