summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure
Commit message (Collapse)AuthorAgeFilesLines
...
* Instead of cloning the globals for main into the globals graph at the end ofChris Lattner2004-02-211-17/+11
| | | | | | | | | BU propagation, clone the globals into the GG of EACH FUNCTION that finishes processing! The GlobalsGraph *must* include all globals and effects from all functions in the program. Fixing this makes pool allocation work better on 175.vpr, but it still ultimately crashes. llvm-svn: 11686
* There is no need to merge the globals graph into the function graphs at theChris Lattner2004-02-202-10/+3
| | | | | | | | end of the BU and CBU passes. The globals will be marked incomplete, so it doesn't matter if they are missing some info, and merging isn't guaranteed to bring everything in anyway! llvm-svn: 11684
* Add two missing returns, which caused us to be very pessimistic about theChris Lattner2004-02-202-2/+3
| | | | | | printf and scanf families! llvm-svn: 11683
* Add support for some string functions, the scanf family, and sprintfChris Lattner2004-02-201-4/+66
| | | | llvm-svn: 11673
* When we complete the bottom-up pass, make sure to merge the globals in ↵Chris Lattner2004-02-171-0/+17
| | | | | | | | 'main' into the globals graph. llvm-svn: 11562
* Only spit out warning for functions that take pointers, not for sin and the likeChris Lattner2004-02-161-5/+25
| | | | | | Add more special case handling for stdio functions. I feel dirty, how about you? llvm-svn: 11506
* memset and bcopy and now unified by the llvm.memset intrinsicChris Lattner2004-02-161-14/+5
| | | | llvm-svn: 11503
* No need to scan zero initializers. This should make DSA a bit faster.Chris Lattner2004-02-151-0/+2
| | | | llvm-svn: 11471
* Add support for a bunch more functionsChris Lattner2004-02-131-0/+56
| | | | llvm-svn: 11395
* Add support for fopen/fclose. Specifically with fopen, we were marking all ↵Chris Lattner2004-02-131-0/+27
| | | | | | | | | | of the operands as incomplete, though fopen is known to only read them. This just adds fclose for symmetry, though it doesn't gain anything. This makes the dsgraphs for 181.mcf much more precise. llvm-svn: 11390
* Restructure code to handle memcpy/memmoveChris Lattner2004-02-131-28/+33
| | | | llvm-svn: 11374
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-6/+6
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Add one that I missedChris Lattner2004-02-081-0/+1
| | | | llvm-svn: 11179
* Instead of callign removeTriviallyDeadNodes on the global graph every timeChris Lattner2004-02-084-8/+13
| | | | | | | | | removeDeadNodes is called, only call it at the end of the pass being run. This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is pretty big. This is only possible because of the automatic garbage collection done on forwarding nodes. llvm-svn: 11178
* Remove another unneeded call.Chris Lattner2004-02-081-1/+0
| | | | llvm-svn: 11177
* This call is no longer needed now that merging does not produce garbageChris Lattner2004-02-081-1/+0
| | | | llvm-svn: 11176
* Substantially improve the DSA code by removing 'forwarding' nodes fromChris Lattner2004-02-081-1/+5
| | | | | | | | | DSGraphs while they are forwarding. When the last reference to the forwarding node is dropped, the forwarding node is autodeleted. This should simplify removeTriviallyDead nodes, and is only (efficiently) possible because we are using an ilist of dsnodes now. llvm-svn: 11175
* Bugfix for ilist conversion. The ilist wants to make an 'end' node which hasChris Lattner2004-02-081-1/+1
| | | | | | G == 0 llvm-svn: 11174
* Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>Chris Lattner2004-02-081-19/+17
| | | | llvm-svn: 11173
* Change to use node_iterators instead of direct access to NodesChris Lattner2004-02-081-34/+43
| | | | llvm-svn: 11171
* getNodes() is gone, use node_begin/end insteadChris Lattner2004-02-073-15/+18
| | | | | | | Rename stats from dsnode -> dsa Add a new stat llvm-svn: 11167
* There is no need to clone over nodes that are going to be dead anywayChris Lattner2004-02-071-3/+5
| | | | llvm-svn: 11157
* Avoid referencing deleted DSgraphs when merging an SCC into a larger SCC. ThisChris Lattner2004-01-311-9/+11
| | | | | | fixes the crash in 176.gcc. llvm-svn: 11033
* Forward method request to chained aa implementationChris Lattner2004-01-302-0/+8
| | | | llvm-svn: 11024
* Fix a bug aflicting 265.gapChris Lattner2004-01-291-4/+18
| | | | llvm-svn: 11006
* Minor bugfixesChris Lattner2004-01-291-8/+12
| | | | llvm-svn: 11005
* Rename DSGraph::ScalarMapTy -> DSScalarMapChris Lattner2004-01-282-9/+9
| | | | llvm-svn: 11001
* Fix a bugChris Lattner2004-01-281-1/+1
| | | | llvm-svn: 11000
* Eliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,Chris Lattner2004-01-281-4/+1
| | | | | | | moving it to the start of removeDeadNodes. This speeds up DSA by 2s on perlbmk from 41s llvm-svn: 10999
* In the TD pass, iterate over globals directly instead of through the whole ↵Chris Lattner2004-01-281-9/+8
| | | | | | | | scalar map. This saves 5s in the TD pass, from 22->17s on perlbmk llvm-svn: 10998
* In the TD pass, don't iterate over the scalar map to find the globals, ↵Chris Lattner2004-01-281-3/+2
| | | | | | | | | iterate over the globals directly. This doesn't save any substantial time, however, because the globals graph only contains globals! llvm-svn: 10997
* In updateFromGlobalsGraph, instead of iterating over all of the scalars in theChris Lattner2004-01-281-8/+7
| | | | | | | | function to find the globals, iterate over all of the globals directly. This speeds the function up from 14s to 6.3s on perlbmk, reducing DSA time from 53->46s. llvm-svn: 10996
* Minor tweaks, eliminate useless integer pruning optimziation, turn onChris Lattner2004-01-281-4/+6
| | | | | | timers by default llvm-svn: 10993
* Further reduce the number of nodes cloned with getClonedNH, using merge instead.Chris Lattner2004-01-281-1/+1
| | | | | | | | This reduces the number of nodes allocated, then immediately merged and DNE'd from 2193852 to 1298049. unfortunately this only speeds DSA up by ~1.5s (of 53s), because it's spending most of its time waddling through the scalar map :( llvm-svn: 10992
* Add a timer, fix a minor bug.Chris Lattner2004-01-281-4/+12
| | | | | | Also, use RC::merge when possible, reducing the number of nodes allocated, then immediately merged away from 2985444 to 2193852 on perlbmk. llvm-svn: 10991
* Another bugfix, disable "spurious" output.Chris Lattner2004-01-281-1/+4
| | | | | | You gotta love spurious llvm-svn: 10990
* fix bug in previous checkinChris Lattner2004-01-271-1/+0
| | | | llvm-svn: 10989
* * Add a new commandline argument to control the "global roots hack". DefaultChris Lattner2004-01-271-454/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it to be off. If it looks like it's completely unnecessary after testing, I will remove it completely (which is the hope). * Callers of the DSNode "copy ctor" can not choose to not copy links. * Make node collapsing not create a garbage node in some cases, avoiding a memory allocation, and a subsequent DNE. * When merging types, allow two functions of different types to be merged without collapsing. * Use DSNodeHandle::isNull more often instead of DSNodeHandle::getNode() == 0, as it is much more efficient. *** Implement the new, more efficient reachability cloner class In addition to only cloning nodes that are reachable from interesting roots, this also fixes the huge inefficiency we had where we cloned lots of nodes, only to merge them away immediately after they were cloned. Now we only actually allocate a node if there isn't one to merge it into. * Eliminate the now-obsolete cloneReachable* and clonePartiallyInto methods * Rewrite updateFromGlobalsGraph to use the reachability cloner * Rewrite mergeInGraph to use the reachability cloner * Disable the scalar map scanning code in removeTriviallyDeadNodes. In large SCC's, this is extremely expensive. We need a better data structure for the scalar map, because we really want to scan the unique node handles, not ALL of the scalars. * Remove the incorrect SANER_CODE_FOR_CHECKING_IF_ALL_REFERRERS_ARE_FROM_SCALARMAP code. * Move the code for eliminating integer nodes from the trivially dead eliminator to the dead node eliminator. * removeDeadNodes no longer uses removeTriviallyDeadNodes, as it contains a superset of the node removal power. * Only futz around with the globals graph in removeDeadNodes if it is modified llvm-svn: 10987
* Rewrite to use the reachability cloner interface. Also, make this much moreChris Lattner2004-01-271-58/+39
| | | | | | | | efficient in the case where a function calls into the same graph multiple times (ie, it either contains multiple calls to the same function, or multiple calls to functions in the same SCC graph) llvm-svn: 10986
* minor cleanupsChris Lattner2004-01-272-7/+5
| | | | llvm-svn: 10985
* Get clone flags right, so we don't build InlinedGlobals only to clear themChris Lattner2004-01-272-8/+5
| | | | llvm-svn: 10984
* Initial support for implementing clonePartiallyInto in terms of ↵Chris Lattner2004-01-234-60/+128
| | | | | | cloneReachableSubgraph, though this support is currently disabled. llvm-svn: 10970
* Eliminated the CompletedNodes argument to the cloneReachable* methods. ThisChris Lattner2004-01-222-43/+21
| | | | | | | | map was only used to implement a marginal GlobalsGraph optimization, and it actually slows the analysis down (due to the overhead of keeping it), so just eliminate it entirely. llvm-svn: 10955
* Ok, I'm tired of pulling out all my timers to check stuff in, just do it.Chris Lattner2004-01-221-0/+18
| | | | llvm-svn: 10954
* Bug fix: X.mergeWith(Y) was not updating Y if Y was a null node handle!Chris Lattner2004-01-221-2/+9
| | | | llvm-svn: 10953
* Start implementing DSGraph::clonePartiallyInto and implement mergeInGraphChris Lattner2004-01-221-66/+176
| | | | | | | | | | | in terms of it. Though clonePartiallyInto is not cloning partial graphs yet, this change dramatically speeds up inlining of graphs with many scalars. For example, this change speeds up the BU pass on 253.perlbmk from 69s to 36s, because it avoids iteration over the scalar map, which can get pretty large. llvm-svn: 10951
* Allow disabling of ALL printing overhead when performing timingsChris Lattner2004-01-221-0/+5
| | | | llvm-svn: 10948
* Do not depend on index type to determine whether it is a structure or ↵Chris Lattner2003-11-251-11/+12
| | | | | | sequential index llvm-svn: 10221
* Implement a small optimization to handling of GEP's that are equivalent to ↵Chris Lattner2003-11-141-0/+18
| | | | | | | | casts. This results in substantially reduced collapsing for some testcases llvm-svn: 10002
* Trying to get the dsgraph for an external function is bad for DSA's healthChris Lattner2003-11-131-11/+12
| | | | llvm-svn: 9979
OpenPOWER on IntegriCloud