aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/DataStructure.cpp
AgeCommit message (Collapse)Author
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
2002-10-21 - Make DSCallSite not inherit from std::vector. Renamed methods slightly.Chris Lattner
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
2002-10-20Simplify code a bit, add comment flyerChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4238 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20Remove spurious caller pointer in DSCallSite.Vikram S. Adve
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
2002-10-20This function can be staticChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4234 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20Added a first-class representation for each call site that can beVikram S. Adve
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
2002-10-18Convert typerec to be a structure instead of a pairChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 * Make the DSGraph cloner automatically merge global nodesChris Lattner
* 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
2002-10-17Remove obsolete codeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4218 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03Prune function nodes that are no longer referenced due to inliningChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4036 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-03Handle bug exposed by power benchmarkChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4033 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02* Significant rework of DSNode to support arbitrary aliasing due to mergingChris Lattner
* Now all and any bytes of a DSNode can be merged together individually. This is neccesary to support the full generality of C and support aliasing correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4008 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01Checkin some major reworks of data structure analysis. This is not done,Chris Lattner
nor does it work very well, but I need to get it checked in before I break the tree unintentionally. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3996 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-07Reorder #includes to be rightChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3260 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31Changes to be GCC3.1 friendlyChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30Use a separate globals graph to hold externally visible nodes.Vikram S. Adve
This changes both the bottom-up and top-down propagation so that globals and other external objects do not have to appear in every function, but only in functions in which they are referenced or they can be used to access something else that is referenced. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3170 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27* Standardize how analysis results/passes as printed with the print() virtualChris Lattner
methods * Eliminate AnalysisID: Now it is just a typedef for const PassInfo* * Simplify how AnalysisID's are initialized * Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into the analyses themselves. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26* Add support for different "PassType's"Chris Lattner
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Add support for different "PassType's" * Add new RegisterOpt/RegisterAnalysis templates for registering passes that are to show up in opt or analyze * Register Analyses now * Change optimizations to use RegisterOpt instead of RegisterPass * Remove getPassName implementations from various subclasses git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3112 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18* Inline CopyFunctionCallsListChris Lattner
* Don't clone OrigCallList * Rename removeDeadNodes -> removeTriviallyDeadNodes * Implement new removeDeadNodes method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2970 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18Add support for a top-down propagation pass.Vikram S. Adve
Each DSGraph now keeps a list of pending callers that have not been inlined into the function represented by that graph. It also keeps a copy of the original call nodes before the BU pass eliminates some of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18Implement cast nodes correctly.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2964 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18Lots of bug fixes, add BottomUpClosure, which has bugs, but is a start.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2945 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11* Nodes now keep track of any global variables in themChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2879 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10New implementation of data structure analysis. Only local analysis has beenChris Lattner
implemented so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2871 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-30Fix anand's last checkinChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2804 91177308-0d34-0410-b5e6-96231b3b80d8