summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/DataStructure.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Adjust to the changed StructType interface. In particular, ↵Chris Lattner2004-02-091-6/+6
| | | | | | getElementTypes() is gone. llvm-svn: 11228
* Instead of callign removeTriviallyDeadNodes on the global graph every timeChris Lattner2004-02-081-8/+9
| | | | | | | | | 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
* 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-071-5/+7
| | | | | | | 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
* 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-281-6/+6
| | | | 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 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
* Initial support for implementing clonePartiallyInto in terms of ↵Chris Lattner2004-01-231-57/+122
| | | | | | cloneReachableSubgraph, though this support is currently disabled. llvm-svn: 10970
* Eliminated the CompletedNodes argument to the cloneReachable* methods. ThisChris Lattner2004-01-221-41/+20
| | | | | | | | 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
* Fine-grainify namespaces for this libraryChris Lattner2003-11-121-4/+1
| | | | llvm-svn: 9948
* Add new argument to disable checkingChris Lattner2003-11-121-3/+5
| | | | llvm-svn: 9922
* Don't crash if no ggChris Lattner2003-11-121-1/+1
| | | | llvm-svn: 9913
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-2/+5
| | | | llvm-svn: 9903
* Compute node offsets correctlyChris Lattner2003-11-111-2/+2
| | | | llvm-svn: 9895
* Add new method for computing node mappings. This is used by the pool allocatorChris Lattner2003-11-111-0/+31
| | | | llvm-svn: 9880
* All DSGraphs keep a reference to the targetdata they are created with. This isChris Lattner2003-11-021-9/+14
| | | | | | | | used to eliminate the hard coded, hacked in, sparc specific, global TargetData. Changing the TargetData used to actually match the code fixes problems, and eliminates a crash. llvm-svn: 9659
* Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.llChris Lattner2003-11-021-6/+8
| | | | llvm-svn: 9658
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Remove trivially dead nodes was not removing nodes that were dead due to ↵Chris Lattner2003-09-201-0/+14
| | | | | | forwarding! llvm-svn: 8634
* Switch from using CallInst's to represent call sites to using the LLVMChris Lattner2003-09-201-2/+2
| | | | | | | CallSite class. Now we can represent function calls by invoke instructions too! llvm-svn: 8629
* Fixed spelling and grammar.Misha Brukman2003-09-111-3/+3
| | | | llvm-svn: 8478
* Add more verbose commentChris Lattner2003-08-051-10/+9
| | | | llvm-svn: 7610
* Added function mergeInGlobalsGraph which merges in the entire globals graph ↵Sumant Kowshik2003-08-051-0/+29
| | | | | | with the graph of a function llvm-svn: 7606
* DEBUG got moved to Support/Debug.hChris Lattner2003-08-011-0/+1
| | | | llvm-svn: 7492
* Fix comment.Vikram S. Adve2003-07-221-3/+3
| | | | llvm-svn: 7227
* Implement 2 important changes: (1) rematerialization from the globals graph,Vikram S. Adve2003-07-161-65/+250
| | | | | | | | | | | | | | | | | | | | | | | and (2) faster inlining by cloning only reachable nodes. In particular: (1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes to clone the subgraph reachable from a set of root nodes, into the current graph, merging the global nodes into thos in the current graph. The TD pass now uses this for faster inlining, and so does the next function. (2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the globals graph into the current graph in both BU and TD passes. (3) `I' flags are removed from all nodes in the globals graph, because they are difficult to maintain correctly and are not needed anyway. (4) Aux. function calls are only removed to the globals graph if they will never be resovled. (This is what fixed gap.) The immediate reason is that if we took these out of a function (and moved them to the globals graph) we would need to rematerialize these nodes into the function graph for every function in the BU pass. The longer term problem is that we would need to find a way to remove them from the globals graph iff they have been resolved on all paths through the call graph. llvm-svn: 7187
* Remove globals more aggressively from graphs.Chris Lattner2003-07-031-11/+32
| | | | | | Fix a bug where we removed nodes that were marked U. llvm-svn: 7090
* INCLUDE_PARENT_GRAPH is required!Chris Lattner2003-07-021-21/+4
| | | | llvm-svn: 7088
* Add support for ParentGraph only when building in debug modeChris Lattner2003-07-021-8/+48
| | | | | | Minor cleanups, reenable folding of call nodes to external functions llvm-svn: 7061
* Rework TD pass to work with the precise call graph constructed by the BU phaseChris Lattner2003-07-011-0/+3
| | | | llvm-svn: 7031
* Add new methodChris Lattner2003-06-301-0/+17
| | | | llvm-svn: 7007
* Be more const-correctChris Lattner2003-06-301-2/+2
| | | | llvm-svn: 7005
* Fix bug in last checkinChris Lattner2003-06-301-1/+1
| | | | llvm-svn: 7003
* Handle the case where OldNodeMap == &ScalarMap correctlyChris Lattner2003-06-301-12/+7
| | | | llvm-svn: 7000
OpenPOWER on IntegriCloud