summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/DataStructure.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix a problem where we not marking incoming arguments to functions withChris Lattner2005-03-291-1/+2
| | | | | | external linkage as incomplete. llvm-svn: 20927
* Make the spliceFrom case where one graph is completely empty be constant time.Chris Lattner2005-03-251-2/+6
| | | | llvm-svn: 20825
* add a new DSGraph::spliceFrom method, which violently takes the content ofChris Lattner2005-03-241-0/+41
| | | | | | one graph and plops it into another, without breaking a sweat. llvm-svn: 20824
* This replaces the correct but slow code with a more aggressive scc-finderChris Lattner2005-03-241-54/+97
| | | | | | | | based approach to find globals and call sites that need to be copied. This speeds up the BU pass on 176.gcc from 22s back up to 2.3s. Not as good as 1.5s, but at least it's correct :) llvm-svn: 20820
* only look at successors of globals. This gets us down to "only" 22s in theChris Lattner2005-03-241-4/+9
| | | | | | bu pass for 176.gcc llvm-svn: 20818
* Unfortunately, a previous patch was not safe. Revert it, reimplementChris Lattner2005-03-241-40/+93
| | | | | | | something correct. Unfortunately this takes 176.gcc's BU phase back up to 29s from 1.5. This fixes DSGraph/2005-03-24-Global-Arg-Alias.ll llvm-svn: 20817
* turn a dead conditional into an assert.Chris Lattner2005-03-231-9/+5
| | | | llvm-svn: 20787
* Totally gut mergeInGraph. There is absolutely no reason to be mergingChris Lattner2005-03-231-73/+47
| | | | | | | | | | | global roots in from callees to callers. The BU graphs do not have accurate globals information and all of the clients know it. Instead, just make sure the GG is up-to-date, and they will be perfectly satiated. This speeds up the BU pass on 176.gcc from 5.5s to 1.5s, and Loc+BU+TD from 7s to 2.7s. llvm-svn: 20786
* wrap a long lineChris Lattner2005-03-231-1/+2
| | | | llvm-svn: 20785
* Several changes here:Chris Lattner2005-03-221-19/+42
| | | | | | | | | | | | 1. Increase max node size from 64->256 to avoid collapsing an important structure in 181.mcf 2. If we have multiple calls to an indirect call node with an indirect callee, fold these call nodes together, to avoid DSA turning apoc into a flaming fireball of death when analyzing 176.gcc. With this change, 176.gcc now takes ~7s to analyze for loc+bu+td, with 5.7s of that in the BU pass. llvm-svn: 20775
* Don't use operator[], use the new method instead, which is faster. This speedsChris Lattner2005-03-221-1/+1
| | | | | | | up the TD pass about 30% for povray and perlbmk. It's still not clear why copying a 5MB set of graphs turns into a 25MB set of graphs though :( llvm-svn: 20762
* Now that the dead ctor is gone, nothing uses the old node mapping exported byChris Lattner2005-03-221-5/+4
| | | | | | cloneInto: make it an internally used mapping. llvm-svn: 20760
* remove a dead ctorChris Lattner2005-03-221-7/+0
| | | | llvm-svn: 20759
* now that the second argument is always this->ReturnNodes, don't bother ↵Chris Lattner2005-03-221-7/+6
| | | | | | passing it. llvm-svn: 20758
* now that the valuemapping is always the local scalar map, we can eliminateChris Lattner2005-03-221-4/+0
| | | | | | this identity merge. llvm-svn: 20755
* remove the second argument to cloneIntoChris Lattner2005-03-221-6/+7
| | | | llvm-svn: 20754
* move this out of lineChris Lattner2005-03-221-0/+28
| | | | llvm-svn: 20751
* allow passing clone flags down to cloneIntoChris Lattner2005-03-211-2/+3
| | | | llvm-svn: 20748
* make this const correctChris Lattner2005-03-211-2/+2
| | | | llvm-svn: 20741
* Ugh, for some reason, I can't call this unless the reference is const!?!?!?Chris Lattner2005-03-211-2/+2
| | | | llvm-svn: 20732
* The reachability cloner should add arguments to merged calls when the RHS ofChris Lattner2005-03-211-1/+4
| | | | | | the merge has more operands than the LHS. llvm-svn: 20731
* Remove the ability to keep track of inlined globals, which is always dead.Chris Lattner2005-03-201-36/+1
| | | | llvm-svn: 20716
* Add a new DSNode::removeGlobal method.Chris Lattner2005-03-201-0/+9
| | | | llvm-svn: 20710
* Implement new methods for dealing with DSNode global lists, rename uses ofChris Lattner2005-03-201-16/+56
| | | | | | old methods. llvm-svn: 20707
* Create an equivalence class of global variables that DSA will never be ableChris Lattner2005-03-191-27/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | to tell apart anyway, and only track the leader for of these equivalence classes in our graphs. This dramatically reduces the number of GlobalValue*'s that appear in scalar maps, which A) reduces memory usage, by eliminating many many scalarmap entries and B) reduces time for operations that need to execute an operation for each global in the scalar map. As an example, this reduces the memory used to analyze 176.gcc from 1GB to 511MB, which (while it's still way too much) is better because it doesn't hit swap anymore. On eon, this shrinks the local graphs from 14MB to 6.8MB, shrinks the bu+td graphs of povray from 50M to 40M, shrinks the TD graphs of 130.li from 8.8M to 3.6M, etc. This change also speeds up DSA on large programs where this makes a big difference. For example, 130.li goes from 1.17s -> 0.56s, 134.perl goes from 2.14 -> 0.93s, povray goes from 15.63s->7.99s (!!!). This also apparently either fixes the problem that caused DSA to crash on perlbmk and gcc, or it hides it, because DSA now works on these. These both take entirely too much time in the TD pass (147s for perl, 538s for gcc, vs 7.67/5.9s in the bu pass for either one), but this is a known problem that I'll deal with later. llvm-svn: 20696
* remove a bogus optimization. This only works if there are no globals in theChris Lattner2005-03-181-4/+0
| | | | | | | graph, and the combination of a function that does not reference globals, takes not arguments and returns no value is pretty rare. llvm-svn: 20670
* implement a new method.Chris Lattner2005-03-171-0/+36
| | | | llvm-svn: 20668
* Clean up some code, handle null pointer specially to avoid an assertionChris Lattner2005-03-171-6/+10
| | | | llvm-svn: 20660
* Do not create ridiculously huge DSNodes, as described in the comments.Chris Lattner2005-03-171-1/+21
| | | | | | This speeds up the BU pass on 172.mgrid from 62.3 -> 0.1242s. llvm-svn: 20648
* remove use of compat_iterator.Chris Lattner2005-03-161-10/+10
| | | | llvm-svn: 20643
* Fix a crash that happens when mapping something like this:Chris Lattner2005-03-151-6/+12
| | | | | | | | | | | | | { short, short } to short where the second short maps onto the second field of the first struct. In this case, the struct index is not aligned, so we should avoid calling getLink(2), which asserts out. llvm-svn: 20626
* Make computeGGToGMapping compute an invnodemapChris Lattner2005-03-151-9/+11
| | | | llvm-svn: 20622
* Start using retnodes_* for iteration.Chris Lattner2005-03-151-7/+7
| | | | llvm-svn: 20618
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-4/+4
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Don't crash if computing a mapping to a node with zero sizeChris Lattner2005-03-151-0/+2
| | | | llvm-svn: 20595
* rename method, add counterpartChris Lattner2005-03-151-3/+15
| | | | llvm-svn: 20593
* add a method to compute a commonly used mapping.Chris Lattner2005-03-141-0/+13
| | | | llvm-svn: 20588
* regardless of whether or not the client things we should mark globals ↵Chris Lattner2005-03-131-7/+7
| | | | | | | | incomplete, ALWAYS mark them incomplete if they are external! llvm-svn: 20586
* The incoming arguments to main (the argv list) are not complete!Chris Lattner2005-03-131-4/+3
| | | | llvm-svn: 20584
* Replace linear search with logrithmic one.Chris Lattner2005-03-131-4/+1
| | | | llvm-svn: 20580
* make sure to mark nodes returned from functions as incompleteChris Lattner2005-03-121-0/+1
| | | | llvm-svn: 20576
* Fix spelling, patch contributed by Gabor GreifChris Lattner2005-02-271-1/+1
| | | | llvm-svn: 20342
* Fix a bug introduced by revision 1.187 of this file.Chris Lattner2005-02-241-1/+2
| | | | llvm-svn: 20308
* Add a sanity check.Chris Lattner2005-02-151-0/+1
| | | | llvm-svn: 20195
* Add a new method to make it easy to update graphs.Chris Lattner2005-02-151-1/+23
| | | | llvm-svn: 20194
* Use new edge iterators to simplify some code.Chris Lattner2005-02-091-7/+7
| | | | llvm-svn: 20086
* Split mergeInGraph into two methods.Chris Lattner2005-02-041-29/+28
| | | | llvm-svn: 20035
* Refactor getFunctionArgumentsForCall out of mergeInGraph.Chris Lattner2005-02-031-29/+41
| | | | llvm-svn: 20018
* Rename variables to work with VC++'s hokey scoping rules.Chris Lattner2005-01-311-7/+7
| | | | llvm-svn: 19942
* * Make some methods more const correct.Chris Lattner2005-01-301-138/+151
| | | | | | | | | | | | | | | | * Change the FunctionCalls and AuxFunctionCalls vectors into std::lists. This makes many operations on these lists much more natural, and avoids *exteremely* expensive copying of DSCallSites (e.g. moving nodes around between lists, erasing a node from not the end of the vector, etc). With a profile build of analyze, this speeds up BU DS from 25.14s to 12.59s on 176.gcc. I expect that it would help TD even more, but I don't have data for it. This effectively eliminates removeIdenticalCalls and children from the profile, going from 6.53 to 0.27s. llvm-svn: 19939
OpenPOWER on IntegriCloud