aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DataStructure/DataStructure.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix analysis of the Burg programChris Lattner2003-01-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5401 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several related bugs in DSNode::mergeWith() caused by theVikram S. Adve2002-12-061-90/+102
| | | | | | | | | | fact that the incoming nodes may be merged away at intermediate steps. Use an extra level of indirection via DSNodeHandles to track the nodes being merged. All this now happens in a static helper function MergeNodes(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4947 91177308-0d34-0410-b5e6-96231b3b80d8
* Cute bug fix: when moving links from N to this, some links could haveVikram S. Adve2002-12-051-14/+23
| | | | | | | | been missed if node *this got merged away due to recursive merging! Also, links were not moved correctly if a node is collapsed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4933 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix logical error in TD pass: we should clear Mod/Ref bits of each callerVikram S. Adve2002-11-271-2/+7
| | | | | | | | before inlining their graphs into a function. To support this, added flags to CloneFlags to strip/keep Mod/Ref bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4836 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep global nodes in each DS Graph (by forcing them to be marked live).Vikram S. Adve2002-11-251-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4831 91177308-0d34-0410-b5e6-96231b3b80d8
* Add peak memory usage measurement stuffChris Lattner2002-11-181-40/+64
| | | | | | | Add structure padding optimizations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4749 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two bugs:Chris Lattner2002-11-121-27/+27
| | | | | | | | | | | * The globals vector was getting broken and unsorted, this caused vortex to get badly pessimized * Node offset handling was being handled really poorly, and in particular we were not merging types with offsets right. This causes several graphs to be non-merged. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4699 91177308-0d34-0410-b5e6-96231b3b80d8
* Elimiante calls to a node with nothing in it.Chris Lattner2002-11-111-36/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4695 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark stuff reachable by _AUX_ calls as incomplete in the BU graphChris Lattner2002-11-111-9/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4690 91177308-0d34-0410-b5e6-96231b3b80d8
* Use call site mergeWith method to simplify codeChris Lattner2002-11-111-5/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4687 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug that could trigger when varargs call sites had non-matching number ↵Chris Lattner2002-11-101-2/+9
| | | | | | of arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4683 91177308-0d34-0410-b5e6-96231b3b80d8
* * Dramatically rework liveness evaluation.Chris Lattner2002-11-101-172/+167
| | | | | | | | | | * Implement the first step of the Globals graph: Deleting nodes from function graphs. In practice, these nodes need to be moved to the globals graph, but this will be taken care of later. Note that the graphs computed right now are not strictly correct! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4681 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the ability to remove global nodes from deadNodeElminate... for now.Chris Lattner2002-11-091-28/+4
| | | | | | | | This slows stuff down a bit, but it should get much better before it gets any worse. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4666 91177308-0d34-0410-b5e6-96231b3b80d8
* Move maskNodeTypes to header fileChris Lattner2002-11-091-11/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4661 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up DSGraph::removeDeadNodes interfaceChris Lattner2002-11-091-19/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4660 91177308-0d34-0410-b5e6-96231b3b80d8
* Make removeTriviallyDeadNodes a private interface of DSGraphChris Lattner2002-11-091-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4659 91177308-0d34-0410-b5e6-96231b3b80d8
* Add initial support for a globals graphChris Lattner2002-11-091-24/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4656 91177308-0d34-0410-b5e6-96231b3b80d8
* Tighten up array handlingChris Lattner2002-11-091-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4655 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warning & release buildChris Lattner2002-11-091-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4648 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold arrays down to a single element. This causes huge wins on some benchmarksChris Lattner2002-11-081-0/+10
| | | | | | | | for example: 197.parser (64M->14M), 164.gzip (14M->2.7M). The actual graphs represented should not change at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4643 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow specification of whether the call sites should be copied, AND whetherChris Lattner2002-11-081-2/+11
| | | | | | | the aux call sites should be copied git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4639 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add a bunch of checking to make sure that dead nodes are not used after theyChris Lattner2002-11-081-12/+40
| | | | | | | | | | are marked DEAD. This helped track down some bugs - Fix a bunch of bugs where we were doing work on nodes after they became dead - Add support for aux function call sites - Add support for not cloning call sites git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4633 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DSNodeHandleMap instead to be safeChris Lattner2002-11-081-11/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4622 91177308-0d34-0410-b5e6-96231b3b80d8
* Add flushChris Lattner2002-11-081-27/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4619 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of using a bool that constant has to be explained, use a selfChris Lattner2002-11-071-6/+5
| | | | | | | explanitory enum instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4600 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a new mergeInGraph method, which basically factors code out ofChris Lattner2002-11-071-0/+52
| | | | | | | | | | | | | the BU class. This will be used by the IPModRef class to do stuff, eventually perhaps the TD pass will use it also. Speaking of the TD pass, this also eliminates the self recursive case, which was broken, and couldn't occur anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4599 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename DataStructureAnalysis namespace to DSChris Lattner2002-11-071-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4596 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, andChris Lattner2002-11-071-2/+2
| | | | | | | | The problem was merging two unsized types like function's, ie int (int*) with int (uint *) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4594 91177308-0d34-0410-b5e6-96231b3b80d8
* Move printouts to be wrapped in DEBUG() macrosChris Lattner2002-11-071-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4588 91177308-0d34-0410-b5e6-96231b3b80d8
* Make PointerSize & Shift be enumsChris Lattner2002-11-061-6/+1
| | | | | | | Fix problem with recursive merging git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4570 91177308-0d34-0410-b5e6-96231b3b80d8
* Dramatically simplify internal DSNode representation, get implementationChris Lattner2002-11-061-268/+236
| | | | | | | | *FULLY OPERATIONAL* and safe. We are now capable of completely analyzing at LEAST the Olden benchmarks + 181.mcf git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4562 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempted fixes to the mergemap to make it work better.Chris Lattner2002-11-051-15/+28
| | | | | | | Ended up disabling merge map merging completely. It shall be removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4550 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the "Cannot merge two portions of the same node yet" from an assertionChris Lattner2002-11-041-6/+13
| | | | | | | into a "oh crap, lets collapse" case git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4530 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ValueMap to ScalarMapChris Lattner2002-11-031-27/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4516 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename NewNode flag to HeapNodeChris Lattner2002-11-031-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4515 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop representing scalars as explicit nodes in the graph. Now the onlyChris Lattner2002-11-021-34/+30
| | | | | | | | | | nodes in the graph are memory objects, which is very nice. This also greatly reduces the size and memory footprint for DSGraphs. For example, the local DSGraph for llu went from 65 to 13 nodes with this change. As a side bonus, dot seems to lay out the graphs slightly better too. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4488 91177308-0d34-0410-b5e6-96231b3b80d8
* * Minor optimization: when merging nodes, merge the smaller one into theChris Lattner2002-10-311-3/+13
| | | | | | | | larger one. * Handle the case where we are merging two nodes of different size better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4476 91177308-0d34-0410-b5e6-96231b3b80d8
* This fixes all kinds of problems with array handling. There are still bugs toChris Lattner2002-10-311-52/+164
| | | | | | | | | | | | | | | | | be fixed, but we are getting much closer now. * Make DSNode::TypeRec a full fledged DSTypeRec type. * Add methods used to update and access the typerecords elements * Add methods to query if and to cause a node to be completely folded * DSGraph construction doesn't use the allocation type for anything at all, now nodes get their type information based on how they are used. * Fixed a bug with global value handling introduced in the last checkin * GEP support is now much better, arrays are handled correctly. The array flag is now updated in type records. There are still cases that are not handled yet (we do not detect pessimizations), but getting much closer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4465 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unused arguments to DSGraph::cloneInto methodChris Lattner2002-10-211-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
* Add another copy ctor formChris Lattner2002-10-211-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4251 91177308-0d34-0410-b5e6-96231b3b80d8
* As it turns out, we don't need a fully generic mapping copy ctor, we just needChris Lattner2002-10-211-19/+1
| | | | | | | | something that maps through a std::map. Since this simplified the client and implementation code, do so now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4250 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unneccesary 'using' directivesChris Lattner2002-10-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4246 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bug with prior checkinChris Lattner2002-10-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4242 91177308-0d34-0410-b5e6-96231b3b80d8
* - Make DSCallSite not inherit from std::vector. Renamed methods slightly.Chris Lattner2002-10-211-30/+56
| | | | | | | | | Make copy ctor have two versions to avoid dealing with conditional template argument. DSCallSite ctor now takes all arguments instead of taking one and being populated later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4240 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code a bit, add comment flyerChris Lattner2002-10-201-10/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4238 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove spurious caller pointer in DSCallSite.Vikram S. Adve2002-10-201-5/+10
| | | | | | | Also add functions to access pointer argument nodes cleanly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4235 91177308-0d34-0410-b5e6-96231b3b80d8
* This function can be staticChris Lattner2002-10-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4234 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a first-class representation for each call site that can beVikram S. Adve2002-10-201-22/+37
| | | | | | | | | | used in the DS graphs. Essentially, what was vector<DSNodeHandle> before is now a DSCallSite with the same vector, plus pointers to the CallInst and the caller Function. The special-purpose class BUDataStructure::CallSite is no longer needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4228 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert typerec to be a structure instead of a pairChris Lattner2002-10-181-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make the DSGraph cloner automatically merge global nodesChris Lattner2002-10-171-4/+15
| | | | | | | | | * BUClosure doesn't have to worry about global nodes * TDClosure now works with global nodes * Reenable DNE on TD pass, now that globals work right git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4220 91177308-0d34-0410-b5e6-96231b3b80d8