aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/DataStructure.cpp
AgeCommit message (Collapse)Author
2003-02-01Remove dead nodes more efficientlyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5462 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01Improve efficiency of aliveness traversal codeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)Chris Lattner
This change provides a small (3%) but consistent speedup git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5460 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01Remove using declarationsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-31Remove globals on the bottom up pass which do not contain any informationChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-29Use and implement API for graph traversalsChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23* Eliminate boolean arguments in favor of using enumsChris Lattner
* T-D pass now eliminates unreachable globals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5419 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22Fix analysis of the Burg programChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5401 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06Fix several related bugs in DSNode::mergeWith() caused by theVikram S. Adve
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
2002-12-05Cute bug fix: when moving links from N to this, some links could haveVikram S. Adve
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
2002-11-27Fix logical error in TD pass: we should clear Mod/Ref bits of each callerVikram S. Adve
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
2002-11-25Keep global nodes in each DS Graph (by forcing them to be marked live).Vikram S. Adve
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4831 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18Add peak memory usage measurement stuffChris Lattner
Add structure padding optimizations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4749 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-12Fix two bugs:Chris Lattner
* 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
2002-11-11Elimiante calls to a node with nothing in it.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4695 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11Mark stuff reachable by _AUX_ calls as incomplete in the BU graphChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4690 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11Use call site mergeWith method to simplify codeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4687 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10Fix a bug that could trigger when varargs call sites had non-matching number ↵Chris Lattner
of arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4683 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10* Dramatically rework liveness evaluation.Chris Lattner
* 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
2002-11-09eliminate the ability to remove global nodes from deadNodeElminate... for now.Chris Lattner
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
2002-11-09Move maskNodeTypes to header fileChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4661 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09Clean up DSGraph::removeDeadNodes interfaceChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4660 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09Make removeTriviallyDeadNodes a private interface of DSGraphChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4659 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09Add initial support for a globals graphChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4656 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09Tighten up array handlingChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4655 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-09Fix warning & release buildChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4648 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08Fold arrays down to a single element. This causes huge wins on some benchmarksChris Lattner
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
2002-11-08Allow specification of whether the call sites should be copied, AND whetherChris Lattner
the aux call sites should be copied git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4639 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08- Add a bunch of checking to make sure that dead nodes are not used after theyChris Lattner
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
2002-11-08Use DSNodeHandleMap instead to be safeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4622 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08Add flushChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4619 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07Instead of using a bool that constant has to be explained, use a selfChris Lattner
explanitory enum instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4600 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07Implement a new mergeInGraph method, which basically factors code out ofChris Lattner
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
2002-11-07Rename DataStructureAnalysis namespace to DSChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4596 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-07Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, andChris Lattner
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
2002-11-07Move printouts to be wrapped in DEBUG() macrosChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4588 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06Make PointerSize & Shift be enumsChris Lattner
Fix problem with recursive merging git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4570 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-06Dramatically simplify internal DSNode representation, get implementationChris Lattner
*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
2002-11-05Attempted fixes to the mergemap to make it work better.Chris Lattner
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
2002-11-04Change the "Cannot merge two portions of the same node yet" from an assertionChris Lattner
into a "oh crap, lets collapse" case git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4530 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03Rename ValueMap to ScalarMapChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4516 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03Rename NewNode flag to HeapNodeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4515 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02Stop representing scalars as explicit nodes in the graph. Now the onlyChris Lattner
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
2002-10-31 * Minor optimization: when merging nodes, merge the smaller one into theChris Lattner
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
2002-10-31This fixes all kinds of problems with array handling. There are still bugs toChris Lattner
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
2002-10-21Delete unused arguments to DSGraph::cloneInto methodChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21Add another copy ctor formChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4251 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21As it turns out, we don't need a fully generic mapping copy ctor, we just needChris Lattner
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
2002-10-21Remove some unneccesary 'using' directivesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21Fix bug with prior checkinChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4242 91177308-0d34-0410-b5e6-96231b3b80d8