Commit Graph

624 Commits

Author SHA1 Message Date
Chris Lattner
47c97513a8 This file is hopelessly out of date
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:14:00 +00:00
Chris Lattner
758fefc0f0 Final cleanup: remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 18:01:36 +00:00
Chris Lattner
273328e8e0 Not only is this a lot smaller, it actually works if there is already a
function with the right name in the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:53:46 +00:00
Chris Lattner
09a670587a If "These should be used only by the auto-parallelization pass", we might as
well put them INTO the auto-par pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:49:38 +00:00
Chris Lattner
60a3518cf9 Moved all of the cilkifier stuff into lib/Transforms/IPO, as it really is not
support stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8287 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:45:30 +00:00
Chris Lattner
aa9214524d Minor cleanups
Do not #include Parallelize.h, it's just a subset of Cilkifier.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8285 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:42:16 +00:00
Chris Lattner
5714c97400 Replace M with F when refering to functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8274 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 20:36:52 +00:00
Chris Lattner
55b2eb3ef8 Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 20:01:57 +00:00
Chris Lattner
729d73d425 Don't explicitly use the SCC class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8271 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:55:06 +00:00
Chris Lattner
56ef49f5c6 Remove dead var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8270 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:54:57 +00:00
Chris Lattner
9f2a06e76d The SCC::HasLoop method is now in the main iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:51:38 +00:00
Chris Lattner
fe8d8806f7 Remove explicit passing of SCC's around as objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8267 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:46:48 +00:00
Chris Lattner
95008bca9e Move the getAnalysisUsage method from the header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8264 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:40:57 +00:00
Chris Lattner
6c5fd8e055 The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:35:16 +00:00
Chris Lattner
0c0023b754 Minor cleanups
Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8260 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:29:52 +00:00
Chris Lattner
8d0a23ab42 Indent classes correctly in the namespace
move bodies out-of-line
Add getAnalysisUsage method for SFGSCC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8259 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:27:11 +00:00
Chris Lattner
23ebd75aff * Cleanups
* Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8258 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:23:41 +00:00
Chris Lattner
4a81067a84 Initial checkin of the CallGraphSCCPass class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 01:54:59 +00:00
Chris Lattner
6666a04c6c There is no reason for this to be a pass!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8214 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 14:43:17 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
169db9d775 Fix the bug that broke the nightly tester in McCat/18-imp last night. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7925 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-17 21:47:33 +00:00
Chris Lattner
7dd46b09c0 Fix bug: LoopPreheaders/2003-08-15-PreheadersFail.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-16 20:57:16 +00:00
Vikram S. Adve
891bd82e79 Improvement to the previous fix: branch following a delay slot of
another delayed instr. would cause the later sanity-check (assertion)
in PhyRegAlloc.cpp to fail, even though there is really no error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7848 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-14 20:45:56 +00:00
Vikram S. Adve
88d962aa58 For an instruction with delay slots, mark all live values before
the instruction as being live before/after the delay slot
instructions as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7795 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-12 22:19:59 +00:00
Chris Lattner
8043127860 Remove unnecessary use of NonCopyable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7641 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 17:16:24 +00:00
Chris Lattner
7ddb0139ad Add more verbose comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 18:38:37 +00:00
Sumant Kowshik
108421a8e5 Added function mergeInGlobalsGraph which merges in the entire globals graph with the graph of a function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7606 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:04:41 +00:00
Chris Lattner
6806f5614d DEBUG got moved to Support/Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7492 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:15:03 +00:00
Vikram S. Adve
7a81a0fd13 Don't require a BB to look-up live variables, unless they may need to
be recomputed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7388 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 19:42:32 +00:00
Chris Lattner
1f2bbaa9cb Fix another minor bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7340 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 23:00:05 +00:00
Chris Lattner
e7e221ad24 Dont' try to parse the colon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7323 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:49:29 +00:00
Chris Lattner
f2d0134118 Add a more general check-flags which can be used to ensure arbitrary flags are set
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7322 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 20:45:40 +00:00
Chris Lattner
c07736a397 Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7252 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:22:26 +00:00
Chris Lattner
bfcdf14d83 Fit code into 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:17:01 +00:00
Chris Lattner
28a128e37a Eliminate old-style cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7248 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:16:40 +00:00
Vikram S. Adve
40c600e8f3 Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7227 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-22 12:08:58 +00:00
Brian Gaeke
1d2ba44224 Fix typo in call to isUnresolvableFunc, which was breaking the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7194 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-17 19:07:46 +00:00
Vikram S. Adve
1da1d32fc7 Rematerialize nodes from the globals graph into the current graph
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
2003-07-16 21:42:03 +00:00
Vikram S. Adve
03e19ddaf7 (1) Rematerialize nodes from the globals graph into the current graph
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-16 21:40:28 +00:00
Vikram S. Adve
78bbec7fcb Implement 2 important changes: (1) rematerialization from the globals graph,
and (2) faster inlining by cloning only reachable nodes.  In particular:
(1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
    to clone the subgraph reachable from a set of root nodes, into the
    current graph, merging the global nodes into thos in the current graph.
    The TD pass now uses this for faster inlining, and so does the
    next function.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
    globals graph into the current graph in both BU and TD passes.
(3) `I' flags are removed from all nodes in the globals graph, because they
    are difficult to maintain correctly and are not needed anyway.
(4) Aux. function calls are only removed to the globals graph if they
    will never be resovled.  (This is what fixed gap.)  The immediate
    reason is that if we took these out of a function (and moved them to
    the globals graph) we would need to rematerialize these nodes into the
    function graph for every function in the BU pass.  The longer term
    problem is that we would need to find a way to remove them from the
    globals graph iff they have been resolved on all paths through the
    call graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7187 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-16 21:36:31 +00:00
Vikram S. Adve
2e1de5ed59 Factor out the test for unresolvable external functions into
isUnresolvableFunc() (I thought I needed this externally.
I don't, but it's still nicer this way.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7186 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-16 21:25:17 +00:00
Misha Brukman
1ba3138cdc The word separate' only has one e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7174 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-14 17:26:34 +00:00
Chris Lattner
5bfccb9def Reuse the values if they are constants: this is important so that we index into the right structure field
This fixes bug: BasicAA/2003-07-03-BasicAACrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7093 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-03 06:42:38 +00:00
Chris Lattner
85cfe01a5e Remove globals more aggressively from graphs.
Fix a bug where we removed nodes that were marked U.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7090 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-03 02:03:53 +00:00
Chris Lattner
7079386e02 INCLUDE_PARENT_GRAPH is required!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7088 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:57:05 +00:00
Chris Lattner
10c45d6cd5 Disable incorrect mustalias code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7087 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:56:51 +00:00
Chris Lattner
61691c5d85 Remove space at end of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7084 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:44:15 +00:00
Chris Lattner
6c87461fe6 Fix how we are handling unreachable functions. This DRAMATICALLY improves efficiency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7082 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:42:48 +00:00
Chris Lattner
d391d70361 Keep track of how many inlinings are performed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7076 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 20:24:42 +00:00
Chris Lattner
47030f8a72 Try using trivially dead deletion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7075 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 19:49:11 +00:00