summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
Commit message (Collapse)AuthorAgeFilesLines
* Implement test/Regression/Transforms/GlobalConstifier/phi-select.llxChris Lattner2004-08-141-6/+16
| | | | | | This allows more globals to be marked constant, particularly global arrays. llvm-svn: 15735
* "extract" the block extractor pass from bugpoint (haha)Chris Lattner2004-08-131-0/+53
| | | | llvm-svn: 15714
* This patch makes the inliner refuse to inline functions that have allocaChris Lattner2004-08-121-25/+57
| | | | | | | | | | 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
* Fix another really nasty regression that Anshu pointed out. In cases whereChris Lattner2004-08-081-24/+24
| | | | | | | | | | 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
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-296-11/+6
| | | | llvm-svn: 15334
* Ignore instructions that are in trivially dead functions. This allows usChris Lattner2004-07-201-4/+17
| | | | | | to constify 14 globals instead of 4 in a trivial C++ testcase. llvm-svn: 15027
* Fix a performance regression from the CPR patch, simplify codeChris Lattner2004-07-181-14/+6
| | | | llvm-svn: 14974
* Strip out and simplify some code. This also fixes the regression lastChris Lattner2004-07-181-9/+2
| | | | | | | | | | night compiling cfrac. It did not realize that code like this: int G; int *H = &G; takes the address of G. llvm-svn: 14973
* Avoid an unnecessary isa<Constant>.Reid Spencer2004-07-181-3/+1
| | | | llvm-svn: 14963
* Remove useless statistic, fix some slightly broken logicChris Lattner2004-07-181-8/+4
| | | | llvm-svn: 14958
* Fix a rather serious bug in previous checkinChris Lattner2004-07-181-1/+0
| | | | llvm-svn: 14957
* bug 122:Reid Spencer2004-07-184-18/+15
| | | | | | - Replace ConstantPointerRef usage with GlobalValue usage llvm-svn: 14953
* bug 122:Reid Spencer2004-07-182-8/+3
| | | | | | - Minimize redundant isa<GlobalValue> usage llvm-svn: 14948
* bug 122:Reid Spencer2004-07-181-22/+17
| | | | | | | - Replace ConstantPointerRef usage with GlobalValue usage - Rename methods to get ride of ConstantPointerRef usage llvm-svn: 14945
* bug 122:Reid Spencer2004-07-181-30/+1
| | | | | | - Excise dead CPR procesing. llvm-svn: 14944
* Remove unused fileChris Lattner2004-06-281-495/+0
| | | | llvm-svn: 14460
* These passes are long dead/obsolete. They never worked in the first placeChris Lattner2004-06-281-188/+0
| | | | | | and are a maintenence burden. Nuke nuke nuke llvm-svn: 14457
* File depends on DSA, moved to lib/Analysis/DataStructureMisha Brukman2004-06-221-495/+0
| | | | llvm-svn: 14325
* Make order of argument addition deterministic. In particular, the layoutChris Lattner2004-06-211-10/+35
| | | | | | | of ConstantInt objects in memory used to determine which order arguments were added in in some cases. llvm-svn: 14276
* Fix the inliner to be deterministic, not letting its output depend on theChris Lattner2004-06-201-4/+3
| | | | | | relative location of Function objects in memory. llvm-svn: 14260
* Do not function resolve intrinsics. This prevents warnings and possible badChris Lattner2004-06-181-1/+2
| | | | | | | | | things from happening due to declare bool %llvm.isunordered(double, double) declare bool %llvm.isunordered(float, float) llvm-svn: 14219
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-172-3/+3
| | | | llvm-svn: 14201
* Fix a bug in the -deadtypeelim pass. The SymbolTable re-write changed itJohn Criswell2004-05-271-1/+1
| | | | | | to eliminate the wrong type. llvm-svn: 13855
* Convert to SymbolTable's new iteration interface.Reid Spencer2004-05-252-27/+24
| | | | llvm-svn: 13754
* Fix a bug in my previous checkinChris Lattner2004-05-241-0/+1
| | | | llvm-svn: 13717
* Fix cases where we missed inlining some more obvious candidates because theChris Lattner2004-05-231-79/+108
| | | | | | caller was in an SCC. llvm-svn: 13693
* Simplify the interface and remove an unneeded #includeChris Lattner2004-05-231-9/+1
| | | | llvm-svn: 13692
* Fairly substantial changes to update the alias analysis we are querying asChris Lattner2004-05-231-39/+92
| | | | | | | we make the transformation. This allows us to use interprocedural alias analyses successfully. llvm-svn: 13691
* Clarify the logic: the flag is renamed to `deleteFn' to signify it will deleteMisha Brukman2004-04-221-11/+11
| | | | | | the function instead of isolating it. This also means the condition is reversed. llvm-svn: 13112
* Add a flag to choose between isolating a function or deleting the function fromMisha Brukman2004-04-221-6/+29
| | | | | | | the Module. The default behavior keeps functionality as before: the chosen function is the one that remains. llvm-svn: 13111
* Fix an incredibly nasty iterator invalidation problem. I am too spoiled by ↵Chris Lattner2004-04-211-18/+38
| | | | | | | | | 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
* Fix typeoChris Lattner2004-04-211-1/+1
| | | | llvm-svn: 13089
* REALLY fix PR324: don't delete linkonce functions until after the SCC traversalChris Lattner2004-04-202-7/+33
| | | | | | is done, which avoids invalidating iterators in the SCC traversal routines llvm-svn: 13088
* Fix PR324 and testcase: Inline/2004-04-20-InlineLinkOnce.llxChris Lattner2004-04-201-3/+7
| | | | llvm-svn: 13080
* Change the ExitBlocks list from being explicitly contained in the LoopChris Lattner2004-04-181-2/+4
| | | | | | | structure to being dynamically computed on demand. This makes updating loop information MUCH easier. llvm-svn: 13045
* Actually update the call graph as the inliner changes it. This allows us toChris Lattner2004-04-121-1/+20
| | | | | | execute other CallGraphSCCPasses after the inliner without crashing. llvm-svn: 12861
* Stop printing Function*Chris Lattner2004-04-121-1/+1
| | | | llvm-svn: 12857
* Simplify code a bit, and be sure to mark the external node as potentially ↵Chris Lattner2004-04-121-31/+31
| | | | | | throwing llvm-svn: 12856
* Remove the "really gross hacks" that are there to deal with recursive functions.Chris Lattner2004-04-083-84/+55
| | | | | | | | 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
* Add statistics to the loop extractor. The loop extractor has successfullyChris Lattner2004-03-181-0/+6
| | | | | | | extracted all 63 loops for Olden/bh without crashing and without miscompiling the program!!! llvm-svn: 12491
* Fix problem with PHI nodes having multiple predecessors from differentChris Lattner2004-03-181-1/+2
| | | | | | exit nodes llvm-svn: 12490
* The code extractor needs dominator info. Provide itChris Lattner2004-03-181-3/+7
| | | | llvm-svn: 12483
* Restore old inlining heuristic. As the comment indicates, this is a nastyChris Lattner2004-03-151-1/+8
| | | | | | horrible hack. llvm-svn: 12423
* Fix several bugs in the loop extractor. In particular, subloops were neverChris Lattner2004-03-151-8/+48
| | | | | | | 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
* Split into two passes. Now there is the general loop extractor, usable onChris Lattner2004-03-141-6/+24
| | | | | | the command line, and the single loop extractor, usable by bugpoint llvm-svn: 12390
* Passes don't print stuff!Chris Lattner2004-03-141-2/+0
| | | | llvm-svn: 12385
* FunctionPass's should not define their own 'run' method.Chris Lattner2004-03-141-8/+2
| | | | | | | Require 'simplified' loops, not just raw natural loops. This fixes CodeExtractor/2004-03-13-LoopExtractorCrash.ll llvm-svn: 12381
* Move prototype to IPO.h instead of Scalar.hChris Lattner2004-03-141-3/+2
| | | | | | | Make sure that the file interface header (IPO.h) is included first remove dead #incldue llvm-svn: 12375
* Indent anon namespace properly, add copyright blockChris Lattner2004-03-141-19/+20
| | | | llvm-svn: 12373
* Move to the IPO library. Utils shouldn't contain passes.Chris Lattner2004-03-141-0/+68
| | | | llvm-svn: 12372
OpenPOWER on IntegriCloud