summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/DataStructure.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Silence VC++ warnings.Chris Lattner2005-01-121-11/+13
| | | | llvm-svn: 19506
* Move method out of line for better ICC supportChris Lattner2004-12-081-0/+11
| | | | | | Add some ifdefs for some stuff I like to be able to toggle easily llvm-svn: 18665
* Improve commentChris Lattner2004-10-311-2/+4
| | | | llvm-svn: 17375
* Add more paranoid assertions :)Chris Lattner2004-10-311-0/+12
| | | | llvm-svn: 17367
* Fix three bugs:Chris Lattner2004-10-301-9/+12
| | | | | | | | | | | | | | | | 1. Calls to external global VARIABLES should not be treated as a call to an external function 2. Efficiently deleting an element from a vector by using std::swap with the back, then pop_back is NOT a good way to keep the vector sorted. 3. Our hope of having stuff get deleted by making them redundant just won't work. In particular, if we have three calls in sequence that should be merged: A, B, C first we unify B into A. To be sure that they appeared identical (so B would be erased) we set B = A. On the next step, we unified C into A and set C = A. Unfortunately, this is no guarantee that C = B, so we would fail to delete the dead call. Switch to a more explicit scheme. llvm-svn: 17357
* * Add a methodChris Lattner2004-10-301-16/+28
| | | | | | | | | * change some uses of NH.getNode() in a bool context to use !NH.isNull() * Fix a bunch of places where we depended on the (undefined) order of evaluation of arguments to function calls to ensure that getNode() was called before getOffset(). In practice, this was NOT happening. llvm-svn: 17354
* Changes For Bug 352Reid Spencer2004-09-011-6/+6
| | | | | | | | 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
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-291-1/+1
| | | | llvm-svn: 15334
* Disable some code that isn't helping mattersChris Lattner2004-07-081-1/+6
| | | | llvm-svn: 14682
* Move all of the DSA headers into the Analysis/DataStructure subdir.Chris Lattner2004-07-071-1/+1
| | | | llvm-svn: 14663
* As much as I hate to say it, the whole setNode interface for DSNodeHandlesChris Lattner2004-07-071-9/+6
| | | | | | | | | | | | is HOPELESSLY broken. The problem is that the embedded getNode call can change the offset of the node handle in unpredictable ways. As it turns out, all of the clients of this method really want to set both the node and the offset, thus it is more efficient (and less buggy) to just do both of them in one method call. This fixes some obscure bugs handling non-forwarded node handles. llvm-svn: 14660
* Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA onChris Lattner2004-06-231-2/+1
| | | | | | several mallocbench programs, including perl. llvm-svn: 14342
OpenPOWER on IntegriCloud