aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DataStructure/EquivClassGraphs.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace DEBUG(std::cerr with DOUT. Removed some iostream #includes.Bill Wendling2006-11-171-20/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31811 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-11-021-2/+0
| | | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner2006-08-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead variableChris Lattner2006-05-121-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28249 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit iostream #includesChris Lattner2006-01-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25513 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spacesMisha Brukman2005-04-221-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21439 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-26/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
* EquivClassGraphs is now in DataStructure.hChris Lattner2005-04-021-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21042 91177308-0d34-0410-b5e6-96231b3b80d8
* use a callee_iterator typedef.Chris Lattner2005-04-021-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21038 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the ActualCallees callgraph from hash_multimap<Instruction,Function>Chris Lattner2005-04-021-4/+4
| | | | | | | | | | 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
* don't bother |'ing in 0'sChris Lattner2005-03-241-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20815 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the dead ctor is gone, nothing uses the old node mapping exported byChris Lattner2005-03-221-6/+2
| | | | | | | cloneInto: make it an internally used mapping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20760 91177308-0d34-0410-b5e6-96231b3b80d8
* now that the second argument is always this->ReturnNodes, don't bother ↵Chris Lattner2005-03-221-3/+5
| | | | | | passing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20758 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the second argument to cloneIntoChris Lattner2005-03-221-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20754 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some pointless assertsChris Lattner2005-03-201-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20713 91177308-0d34-0410-b5e6-96231b3b80d8
* Create an equivalence class of global variables that DSA will never be ableChris Lattner2005-03-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Switch to use the new interface for the EquivalenceClasses class, and fixChris Lattner2005-03-191-59/+63
| | | | | | | a bug involving SCC's who have multiple members that are part of an EC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20678 91177308-0d34-0410-b5e6-96231b3b80d8
* do not bother inlining nullary functions without return values. The onlyChris Lattner2005-03-181-0/+3
| | | | | | | | | | effect these calls can have is due to global variables, and these passes all use the globals graph to capture their effect anyway. This speeds up the BU pass very slightly on perlbmk, reducing the number of dsnodes allocated from 98913 to 96423. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20676 91177308-0d34-0410-b5e6-96231b3b80d8
* make sure to mark nodes in the globals graph incomplete after computing itChris Lattner2005-03-151-0/+1
| | | | | | | so that external globals (and whatever they point to) are marked incomplete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20628 91177308-0d34-0410-b5e6-96231b3b80d8
* fix crashes when we only have a prototype for main.Chris Lattner2005-03-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20627 91177308-0d34-0410-b5e6-96231b3b80d8
* Finally fix (the right way) the problem where functions like this:Chris Lattner2005-03-151-0/+24
| | | | | | | | | | | | void foo() { G = 1; } would have an empty DSGraph even though G (a global) is directly used in the function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20619 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using retnodes_* for iteration.Chris Lattner2005-03-151-12/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20618 91177308-0d34-0410-b5e6-96231b3b80d8
* avoid varialbe name collisionsChris Lattner2005-03-151-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20606 91177308-0d34-0410-b5e6-96231b3b80d8
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-2/+2
| | | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
* rename method, add counterpartChris Lattner2005-03-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20593 91177308-0d34-0410-b5e6-96231b3b80d8
* add a method to compute a commonly used mapping.Chris Lattner2005-03-141-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20588 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to remove incomplete markers before we add to them! :)Chris Lattner2005-03-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20585 91177308-0d34-0410-b5e6-96231b3b80d8
* After finishing BU analysis, move all global variables from the globalsChris Lattner2005-03-131-3/+24
| | | | | | | graph into main and mark them complete. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20583 91177308-0d34-0410-b5e6-96231b3b80d8
* ADd support for printing eqgraphs.Chris Lattner2005-03-131-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20582 91177308-0d34-0410-b5e6-96231b3b80d8
* remove this from the PA namespace, leaving it in the llvm nsChris Lattner2005-03-121-8/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20574 91177308-0d34-0410-b5e6-96231b3b80d8
* Move this from the pool allocator project to here, where it logically belongs.Chris Lattner2005-03-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20570 91177308-0d34-0410-b5e6-96231b3b80d8
* Make things more const-correct, adjust to changes in DSA interfaces.Chris Lattner2005-01-301-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19940 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this build in release modeChris Lattner2004-11-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17684 91177308-0d34-0410-b5e6-96231b3b80d8
* Graphs that are part of equivalence sets can be multi-function SCC'sChris Lattner2004-11-021-3/+8
| | | | | | | | themselves. Make sure to update DSInfo correctly. This fixes a testcase reduced from Prolangs-C++/objects git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17439 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly handle new SCC's found as a result of merging EQ graphs do toChris Lattner2004-11-021-5/+18
| | | | | | | | function pointer equivalences. This fixes many problems, including a testcase reduced Prolangs-C++/objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17437 91177308-0d34-0410-b5e6-96231b3b80d8
* Substantially cleanup/speedup the eq graphs pass by walking the callgraphChris Lattner2004-11-021-45/+41
| | | | | | | | a DSGraph at a time instead of a function at a time. This is also more correct, though it doesn't seem to fix any programs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17435 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2004-11-021-25/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17428 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove more dead methodsChris Lattner2004-11-011-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17413 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename FoldedGraph -> DSInfo to be consistent with other passesChris Lattner2004-11-011-4/+4
| | | | | | | delete some dead methods git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17410 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the EquivClassGraphArgsInfo class, and the map that held it.Chris Lattner2004-11-011-7/+8
| | | | | | | We only need one instance of the vector that it contains at a time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17407 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the cloneGraph methodChris Lattner2004-11-011-8/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17405 91177308-0d34-0410-b5e6-96231b3b80d8
* * Do not refer to ActualCallees in CBU, when we can do it locally.Chris Lattner2004-10-311-27/+40
| | | | | | | | | | | | | | | | | | * *DO NOT* print CBU graphs when asked to print our own. This is just FREAKING confusing and misleading: it's better to not print anything. * Simplify and clean up some code * Add some more paranoia assertion checking code that I found to track down this bug: * Fix a nasty bug that was causing us to crash on Prolangs-C++/objects, where we were missing processing some graphs. This hunk is the bugfix: - if (!I->isExternal() && !FoldedGraphsMap.count(I)) + if (!I->isExternal() && !ValMap.count(I)) urg! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17386 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify graph traversal, improve grammarChris Lattner2004-10-311-10/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17383 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not do horrible things to the CBU graphs. In particular, we do NOT ownChris Lattner2004-10-311-44/+35
| | | | | | | | | | | | the CBU graphs, copy them instead of hacking on the CBU graphs. Also, instead of forwarding request from ECGraphs clients to the CBU graphs clients, service them ourselves. Finally, remove a broken "optimization" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix another bug in Prolangs-C++/objectsChris Lattner2004-10-311-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17372 91177308-0d34-0410-b5e6-96231b3b80d8
* Only call getNodeForValue on pointer arguments! this fixes a problem runningChris Lattner2004-10-311-5/+11
| | | | | | | on Prolangs-C++/objects git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17368 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups:Chris Lattner2004-10-121-23/+20
| | | | | | | | | * fit in 80 lines * Eliminate extra namespaces * Drop llvm:: git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16935 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this buildChris Lattner2004-10-111-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16919 91177308-0d34-0410-b5e6-96231b3b80d8
* Moving headersChris Lattner2004-07-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14661 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete rewrite of the code that merges DS graphs for equivalence classesVikram S. Adve2004-05-231-0/+428
of functions called at a common call site. The rewrite inlines the resulting graphs bottom-up on the SCCs of the CBU call graph. It also simplifies the merging of equivalence classes by exploiting the fact that functions in non-trivial SCCs are already merged. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13645 91177308-0d34-0410-b5e6-96231b3b80d8