summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/DataStructure.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()Chris Lattner2004-06-171-2/+2
| | | | llvm-svn: 14201
* Wrapped code and comments at 80 cols; doxygenified some comments.Misha Brukman2004-04-291-16/+17
| | | | llvm-svn: 13264
* Fix a tiny bug that caused an incorrect assertion failure poolallocatingChris Lattner2004-03-131-4/+6
| | | | | | boxed-sim. llvm-svn: 12358
* implement new methodChris Lattner2004-03-091-0/+24
| | | | llvm-svn: 12264
* Fix a bug handling globals that are constants, but are still externalChris Lattner2004-03-081-1/+1
| | | | llvm-svn: 12208
* Implement a FIXME, improving the efficiency of DSA on povray.Chris Lattner2004-03-041-2/+16
| | | | | | | This reduces CBU time from 145s -> 122s (debug build), reduces # allocated nodes from 129420 to 116477. llvm-svn: 12125
* Fix BU datastructures with povray!Chris Lattner2004-03-041-11/+25
| | | | | | | | The problem was that we were merging a field of a node with a value that was deleted. Thanks to bugpoint for reducing povray to a nice small 3 function example. :) llvm-svn: 12116
* Only clone nodes that are needed in the caller, don't clone ALL aux calls. ↵Chris Lattner2004-03-041-20/+48
| | | | | | | | This improves povray from having ~600K nodes and 300K call nodes to 65K nodes and 25K call nodes. llvm-svn: 12109
* Fix a DSA bug that caused DSA to generate incredibly huge graphs and take ↵Chris Lattner2004-03-031-1/+34
| | | | | | | | | | forever to do it on povray. The problem is that we were not copying globals from callees to callers unless the existed in both graphs. We should have copied them in the case where the global pointed to a node that was copied as well. llvm-svn: 12104
* Deinline methods, add fast exitChris Lattner2004-03-031-0/+27
| | | | llvm-svn: 12102
* Fix a node mapping problem that was causing the pool allocator to locally ↵Chris Lattner2004-03-031-0/+3
| | | | | | | | allocate nodes that were globally live, thus breaking programs. llvm-svn: 12094
* Only clone global nodes between graphs if both graphs have the global.Chris Lattner2004-02-271-13/+6
| | | | llvm-svn: 11928
* Fix typoChris Lattner2004-02-261-1/+1
| | | | llvm-svn: 11864
* The node doesn't have to be _no_ node flags, it just has to be complete andChris Lattner2004-02-261-2/+3
| | | | | | not have any globals. llvm-svn: 11863
* Two changes:Chris Lattner2004-02-251-1/+4
| | | | | | | | | | | | | 1. Functions do not make things incomplete, only variables 2. Constant global variables no longer need to be marked incomplete, because we are guaranteed that the initializer for the global will be in the graph we are hacking on now. This makes resolution of indirect calls happen a lot more in the bu pass, supports things like vtables and the C counterparts (giant constant arrays of function pointers), etc... Testcase here: test/Regression/Analysis/DSGraph/constant_globals.ll llvm-svn: 11852
* Simplify the dead node elimination stuffChris Lattner2004-02-251-10/+12
| | | | | | | | | | Make the incompleteness marker faster by looping directly over the globals instead of over the scalars to find the globals Fix a bug where we didn't mark a global incomplete if it didn't have any outgoing edges. This wouldn't break any current clients but is still wrong. llvm-svn: 11848
* Use isNull instead of getNode() to test for existence of a node, this is ↵Chris Lattner2004-02-221-6/+11
| | | | | | | | | cheaper. FIX MAJOR BUG, whereby we didn't merge null edges correctly. Correcting this fixes poolallocation on 175.vpr, and possibly others. llvm-svn: 11695
* Fix an iterator invalidation problem which was causing some nodes to not beChris Lattner2004-02-211-20/+19
| | | | | | correctly merged over! llvm-svn: 11693
OpenPOWER on IntegriCloud