aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/TopDownClosure.cpp
AgeCommit message (Collapse)Author
2006-12-13Remove DSA.John Criswell
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32550 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06Detemplatize the Statistic class. The only type it is instantiated withChris Lattner
is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17Replace DEBUG(std::cerr with DOUT. Removed some iostream #includes.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31811 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-07debug type for DSA TDAndrew Lenharth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-13Move some warnings to debug mode.Andrew Lenharth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30933 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22Add explicit iostream #includesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25513 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21Remove trailing whitespaceMisha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02fix some VC compilation problems, thanks to Jeff C for pointing this out!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21044 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02use a callee_iterator typedef.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02Change the ActualCallees callgraph from hash_multimap<Instruction,Function>Chris Lattner
to std::set<std::pair<Inst,Func>> to avoid duplicate entries. This speeds up the CompleteBU pass from 1.99s to .15s on povray and the eqgraph passes from 1.5s to .16s on the same. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24Fix a crash while promoting a value out of a loop from a global variableChris Lattner
when using ds-aa git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20802 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22When making a clone of a DSGraph from the BU pass, make sure to remember thatChris Lattner
this clone is supposed to be used for *ALL* of the functions in the SCC. This fixes the memory explosion problem the TD pass was having, reducing the memory growth from 24MB -> 3.5MB on povray and 270MB ->8.3MB on perlbmk! This obviously also speeds up the TD pass *a lot*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20763 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22add some timers, don't clone aux nodesChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20752 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21Enhance the TD pass to build composite graphs when we have indirect callChris Lattner
sites that target multiple callees. If we have a function table, for example, with N callees, and M callers call through it, we used to have to perform O(M*N) graph inlinings. Now we perform O(M+N) inlinings. This speeds up the td pass on perlbmk from 36.26s to 25.75s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20743 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21'note to self'Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21Change the way that the TD pass inlines graphs. Instead of inlining eachChris Lattner
graph into all of the functions it calls when we visit a graph, change it so that the graph visitor inlines all of the callers of a graph into the current graph when it visits it. While we're at it, inline global information from the GG instead of from each of the callers. The GG contains a superset of the info that the callers do anyway, and this way we only need to do it one time (not one for each caller). This speeds up the TD pass substantially on several programs, and there is still room for improvement. For example, the TD pass used to take 147s on perlbmk, it now takes 36s. On povray, we went from about 5s to 1.97s. 134.perl is down from ~1s for Loc+BU+TD to .6s. The TD pass needs a lot of improvement though, which will occur with later patches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20Don't strip modref bits when inlining down the call graph. This fixesChris Lattner
the DSGraph/2003-06-30-TopDownResolve.ll regression from last night. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20717 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20This call is always a noop, remove it.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20Make use of simpler DSNode methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20702 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19Create an equivalence class of global variables that DSA will never be ableChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20696 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15Start using retnodes_* for iteration.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20618 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04Fix the Regression/Transforms/DSAnalysis/recursion.ll regression.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-31Fix some scary bugs that VC++ detected.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19941 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30* Make some methods more const correct.Chris Lattner
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19939 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-24Make -ds-aa more useful, allowing it to be updated as xforms hack on the ↵Chris Lattner
program. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19818 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner
from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01Changes For Bug 352Reid Spencer
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/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07Move all of the DSA headers into the Analysis/DataStructure subdir.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14663 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-29Wrapped code and comments at 80 cols; doxygenified some comments.Misha Brukman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13264 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08Instead of callign removeTriviallyDeadNodes on the global graph every timeChris Lattner
removeDeadNodes is called, only call it at the end of the pass being run. This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is pretty big. This is only possible because of the automatic garbage collection done on forwarding nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11178 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08Remove another unneeded call.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11177 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28In the TD pass, iterate over globals directly instead of through the whole ↵Chris Lattner
scalar map. This saves 5s in the TD pass, from 22->17s on perlbmk git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10998 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28In the TD pass, don't iterate over the scalar map to find the globals, ↵Chris Lattner
iterate over the globals directly. This doesn't save any substantial time, however, because the globals graph only contains globals! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10997 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27Rewrite to use the reachability cloner interface. Also, make this much moreChris Lattner
efficient in the case where a function calls into the same graph multiple times (ie, it either contains multiple calls to the same function, or multiple calls to functions in the same SCC graph) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22Eliminated the CompletedNodes argument to the cloneReachable* methods. ThisChris Lattner
map was only used to implement a marginal GlobalsGraph optimization, and it actually slows the analysis down (due to the overhead of keeping it), so just eliminate it entirely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10955 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12Fine-grainify namespaces for this libraryChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9948 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08This doesn't use DSCallSiteIteratorChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9809 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20Added LLVM project notice to the top of every C++ source file.John Criswell
Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20Functions reachable from the arguments of unresolvable call nodes shouldChris Lattner
not have their arguments marked complete git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20Do not mark incoming arguments to functions complete if the function is ↵Chris Lattner
pointed to by a global in the globals graph git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8637 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20Switch from using CallInst's to represent call sites to using the LLVMChris Lattner
CallSite class. Now we can represent function calls by invoke instructions too! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01DEBUG got moved to Support/Debug.hChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-16(1) Rematerialize nodes from the globals graph into the current graphVikram S. Adve
after all callers are inlined into the current graph. (2) Optimize the way a graph is inlined into its callees in the TD phase: (a) Use DSGraph::cloneReachableSubgraph to clone only a subgraph at each call site, for faster inlining. (b) Clone separately for the same callee at different call sites, since only the reachable subgraph is being cloned, not the entire caller graph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7188 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02Remove space at end of lineChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7084 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02Fix how we are handling unreachable functions. This DRAMATICALLY improves ↵Chris Lattner
efficiency git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7082 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02Try using trivially dead deletionChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7075 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02Complete rewrite of td passChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7064 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01Rework TD pass to work with the precise call graph constructed by the BU phaseChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7031 91177308-0d34-0410-b5e6-96231b3b80d8