aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DataStructure/BottomUpClosure.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
* Functions reachable from the arguments of unresolvable call nodes shouldChris Lattner2003-09-201-1/+4
| | | | | | | not have their arguments marked complete git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8639 91177308-0d34-0410-b5e6-96231b3b80d8
* The Globals graph must become complete at the end of the BU phase!Chris Lattner2003-09-201-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8638 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch from using CallInst's to represent call sites to using the LLVMChris Lattner2003-09-201-1/+2
| | | | | | | | 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
* DEBUG got moved to Support/Debug.hChris Lattner2003-08-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
* Rematerialize nodes from the globals graph into the current graphVikram S. Adve2003-07-161-3/+9
| | | | | | | | | | | after all callees are inlined into the current graph. NOTE: There's also a major bug fix for the BU pass in DataStructure.cpp, which ensures that resolvable indirect calls are not moved out to the globals graph, so that they are eventually inlined (if possible). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7189 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix how we are handling unreachable functions. This DRAMATICALLY improves ↵Chris Lattner2003-07-021-0/+3
| | | | | | efficiency git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7082 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of how many inlinings are performedChris Lattner2003-07-021-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7076 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the BU closure keep track of which actual calls happenChris Lattner2003-07-021-2/+6
| | | | | | | Minor cleanups git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7059 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2003-07-011-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7027 91177308-0d34-0410-b5e6-96231b3b80d8
* Split CallSiteIterator out into DSCallSiteIterator.h, and generalize it a bitChris Lattner2003-06-301-101/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7006 91177308-0d34-0410-b5e6-96231b3b80d8
* Reimplement the BU closure to collapse all SCC graphs into a single graph.Chris Lattner2003-06-301-242/+52
| | | | | | | Look at all of the code that gets deleted! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7001 91177308-0d34-0410-b5e6-96231b3b80d8
* Revamp DSGraphs so that they can support multiple functions in the sameChris Lattner2003-06-301-11/+11
| | | | | | | DSGraph at one time git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6994 91177308-0d34-0410-b5e6-96231b3b80d8
* Propagate globals graph from the local to bu to td globals graphs. ThisChris Lattner2003-06-281-2/+3
| | | | | | | fixes bug: DSGraph/buglobals.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6947 91177308-0d34-0410-b5e6-96231b3b80d8
* * Changes to make NodeType be private to DSNode.Chris Lattner2003-06-191-1/+1
| | | | | | | | | * Add new MultiObject flag to DSNode which keeps track of whether or not multiple objects have been merged into the node, allowing must-alias info to be tracked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6794 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement optimization for direct function call case. This dramaticallyChris Lattner2003-02-051-16/+28
| | | | | | | | reduces the number of function nodes created and speeds up analysis by about 10% overall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5495 91177308-0d34-0410-b5e6-96231b3b80d8
* Add better debug outputChris Lattner2003-02-031-12/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5476 91177308-0d34-0410-b5e6-96231b3b80d8
* Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)Chris Lattner2003-02-011-8/+9
| | | | | | | 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
* Remove using declarationsChris Lattner2003-02-011-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5456 91177308-0d34-0410-b5e6-96231b3b80d8
* Add functions to the ban listChris Lattner2003-01-311-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5450 91177308-0d34-0410-b5e6-96231b3b80d8
* * Eliminate boolean arguments in favor of using enumsChris Lattner2003-01-231-6/+6
| | | | | | | * T-D pass now eliminates unreachable globals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5419 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix logical error in TD pass: we should clear Mod/Ref bits of each callerVikram S. Adve2002-11-271-4/+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
* Add MaxSCC statisticsChris Lattner2002-11-171-6/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4722 91177308-0d34-0410-b5e6-96231b3b80d8
* Inline graphs from outside the SCC into the SCC before SCC resolution startsChris Lattner2002-11-121-4/+104
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4701 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete rewrite of BU code to use Tarjan's SCC finding algorithm to driveChris Lattner2002-11-111-265/+351
| | | | | | | the algorithm instead of hand coded depth first iteration git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4694 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix infinite loop in the BU algorithm. Unfortunately this dies a seriousChris Lattner2002-11-111-30/+177
| | | | | | | death when handling moderately sized SCC's, but what can you do git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4689 91177308-0d34-0410-b5e6-96231b3b80d8
* * Bottom-Up graphs print the Aux call vectorChris Lattner2002-11-101-16/+42
| | | | | | | | | | | * Significantly improve DEBUG output * Aggressively fold calls together if we inlined a graph that provides call nodes. * Add a bailout if the current graph has over 200 call nodes in it, this is a really whacky case that should never happen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4675 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the ability to remove global nodes from deadNodeElminate... for now.Chris Lattner2002-11-091-1/+1
| | | | | | | | 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
* Add globals graphs to all three passesChris Lattner2002-11-091-11/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4663 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up DSGraph::removeDeadNodes interfaceChris Lattner2002-11-091-7/+1
| | | | 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-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4659 91177308-0d34-0410-b5e6-96231b3b80d8
* ONLY merge in the aux call sites, this causes a HUGE speedupChris Lattner2002-11-081-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4640 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove gunk used by broken TD passChris Lattner2002-11-081-12/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4632 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of using a bool that constant has to be explained, use a selfChris Lattner2002-11-071-2/+2
| | | | | | | 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-44/+4
| | | | | | | | | | | | | 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-7/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4596 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete "StripScalars" argument to cloneInto methodChris Lattner2002-11-061-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4560 91177308-0d34-0410-b5e6-96231b3b80d8
* Give a better error message in an unhandled caseChris Lattner2002-11-041-1/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4521 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ValueMap to ScalarMapChris Lattner2002-11-031-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4516 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, this was not meant to be checked inChris Lattner2002-11-021-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4489 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop representing scalars as explicit nodes in the graph. Now the onlyChris Lattner2002-11-021-13/+11
| | | | | | | | | | 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
* Add a fixmeChris Lattner2002-10-311-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4479 91177308-0d34-0410-b5e6-96231b3b80d8
* The callee is not correct, and confuses the TD pass. Null it out.Chris Lattner2002-10-221-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4259 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete unused arguments to DSGraph::cloneInto methodChris Lattner2002-10-211-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add "ResolvingCaller" to the CallSite record. This keeps track of whichChris Lattner2002-10-211-1/+3
| | | | | | | | | function was finally able to resolve the function call. Adding this allows the TD pass to actually work right! - Temporarily disable dead node pruning. This will be reenabled soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4252 91177308-0d34-0410-b5e6-96231b3b80d8
* - Make DSCallSite not inherit from std::vector. Renamed methods slightly.Chris Lattner2002-10-211-8/+9
| | | | | | | | | 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
* Split some long linesChris Lattner2002-10-201-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4237 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove spurious caller pointer in DSCallSite.Vikram S. Adve2002-10-201-6/+7
| | | | | | | 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
* Avoid extra callSite copyChris Lattner2002-10-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4232 91177308-0d34-0410-b5e6-96231b3b80d8
* Added a first-class representation for each call site that can beVikram S. Adve2002-10-201-11/+12
| | | | | | | | | | 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