Commit Graph

436 Commits

Author SHA1 Message Date
Chris Lattner
32d10ddefa Be a bit more specific in caption
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5469 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-02 16:42:01 +00:00
Chris Lattner
7094b7ae8f Fix a bug where we would delete neccesary calls in bu pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5465 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 06:54:31 +00:00
Chris Lattner
706e7ab871 Fix a bug where we would incorrectly delete globals which had edges to alive nodes in
a graph in the t-d pass.  This slows down the TD pass by quite a bit (1/3), but is
needed for correctness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 06:51:17 +00:00
Chris Lattner
d4400c8297 Delete nodes more efficiently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5463 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 06:41:15 +00:00
Chris Lattner
5e7d0e2691 Remove dead nodes more efficiently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5462 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 06:23:33 +00:00
Chris Lattner
a1220afc3a Improve efficiency of aliveness traversal code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 06:17:02 +00:00
Chris Lattner
41c04f730b Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
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
2003-02-01 04:52:08 +00:00
Chris Lattner
b3416bc9cc Remove using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 04:01:21 +00:00
Chris Lattner
100f87252d Remove globals on the bottom up pass which do not contain any information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-31 23:57:36 +00:00
Chris Lattner
11d71edd0d Add functions to the ban list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5450 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-31 23:57:10 +00:00
Chris Lattner
5c7380e567 Use and implement API for graph traversals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5431 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-29 21:10:20 +00:00
Chris Lattner
3f24d7a2cd free instructions mark their operands as being heap nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5425 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-28 20:59:57 +00:00
Chris Lattner
381977d191 * Eliminate boolean arguments in favor of using enums
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5420 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 22:06:33 +00:00
Chris Lattner
394471f197 * Eliminate boolean arguments in favor of using enums
* T-D pass now eliminates unreachable globals


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5419 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 22:05:33 +00:00
Chris Lattner
787645839a Slight efficiency improvement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5418 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 21:31:16 +00:00
Chris Lattner
6f6fef8c26 Fix analysis of the Burg program
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5401 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 22:00:24 +00:00
Chris Lattner
92ba2aaa58 Rename llvm/Analysis/LiveVar/FunctionLiveVarInfo.h -> llvm/CodeGen/FunctionLiveVarInfo.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5284 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 23:05:08 +00:00
Chris Lattner
8143d8f91a Move llvm/Analysis/LiveVar/ValueSet.h to CodeGen/ValueSet.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5282 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:56:37 +00:00
Chris Lattner
2c1378cc12 Move annotations to support library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5270 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 21:31:39 +00:00
Misha Brukman
f4445dfcb7 'graph' is spelled without a 'c'.
Also added Statistic counters for NoAlias and MayAlias.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4972 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 05:34:10 +00:00
Chris Lattner
3fc46450b7 Remove #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 03:47:27 +00:00
Vikram S. Adve
e12c74c07b This file implements a pass that automatically parallelizes a program,
using the Cilk multi-threaded runtime system to execute parallel code.
The current version inserts too many sync() operations in the program
because it does not attempt to optimize their placement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4962 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-10 00:43:34 +00:00
Vikram S. Adve
0d4f76637d Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,
i.e., enumerates all data and control dependences for the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 14:13:19 +00:00
Vikram S. Adve
96b21c1054 An explicit representation of dependence graphs, and a pass that
computes a dependence graph for data dependences on memory locations
using interprocedural Mod/Ref information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 13:26:29 +00:00
Chris Lattner
a1af8bd72b Add total instruction, bb, & function counts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4954 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-07 23:24:24 +00:00
Vikram S. Adve
bac0622ef9 Two bug fixes:
(1) Make entries for Constant values in the ScalarMap.
(2) Set MOD bit for the node pointed to by the
    argument of a free instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4948 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 21:17:10 +00:00
Vikram S. Adve
2b7a92c72f Fix several related bugs in DSNode::mergeWith() caused by the
fact that the incoming nodes may be merged away at intermediate
steps.  Use an extra level of indirection via DSNodeHandles
to track the nodes being merged.  All this now happens in a
static helper function MergeNodes().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4947 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 21:15:21 +00:00
Vikram S. Adve
c102cb7359 Cute bug fix: when moving links from N to this, some links could have
been missed if node *this got merged away due to recursive merging!
Also, links were not moved correctly if a node is collapsed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4933 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-05 17:17:26 +00:00
Chris Lattner
149a5203a9 Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4886 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-03 19:40:16 +00:00
Vikram S. Adve
61ff02982f Fix logical error in TD pass: we should clear Mod/Ref bits of each caller
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
2002-11-27 17:41:13 +00:00
Vikram S. Adve
9a96428297 (1) Bug fix that was causing nodes with dangling references to be freed.
We run removeDeadNodes() on the TD graph up front before using it.
(2) Major enhancement to printing of results: now we list the actual objects
    that are mod/ref instead of just printing the bit vectors.
Also an important bug fix in TDDataStructures pass (no change here):
clear Mod/Ref bits of callers before inlining into a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4833 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:37:46 +00:00
Vikram S. Adve
e31267dd9a Keep global nodes in each DS Graph (by forcing them to be marked live).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4831 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-25 18:21:25 +00:00
Chris Lattner
1855292172 Add peak memory usage measurement stuff
Add structure padding optimizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4749 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:44:46 +00:00
Chris Lattner
4fe346184a Add peak memory usage support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4748 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:44:19 +00:00
Chris Lattner
49a1ed07ab Add stats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4747 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:42:45 +00:00
Chris Lattner
ed806bf9fc Add hack to only consider indirect calls indirect if they do more than cast
their source function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4723 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:17:12 +00:00
Chris Lattner
ae5f603665 Add MaxSCC statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4722 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:16:28 +00:00
Chris Lattner
db85e389ae Count CallInsts correctly, remove unneccesary initializers
S: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4721 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 22:15:40 +00:00
Dinakar Dhurjati
e555460e4e Gives the count for various instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4706 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-13 18:22:13 +00:00
Vikram S. Adve
586aa3c801 Pass to compute various statisics related to DSGraphs.
For now, this just computes the #indirect call sites and
the avg. #callees per indirect call site (actually it prints
both totals and the average is their ratio).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4705 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-13 15:41:00 +00:00
Chris Lattner
5f1f2c6162 Inline graphs from outside the SCC into the SCC before SCC resolution starts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4701 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-12 15:58:08 +00:00
Chris Lattner
5190ce8374 Fix two bugs:
* The globals vector was getting broken and unsorted, this caused vortex
   to get badly pessimized
 * Node offset handling was being handled really poorly, and in particular
   we were not merging types with offsets right.  This causes several graphs
   to be non-merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4699 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-12 07:20:45 +00:00
Chris Lattner
3ba8893af5 Fix bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4697 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 22:23:56 +00:00
Chris Lattner
0ecc42619f Handle a mismatch between # function args and call site args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4696 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 21:36:05 +00:00
Chris Lattner
e425844d8c Elimiante calls to a node with nothing in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4695 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 21:35:38 +00:00
Chris Lattner
a9c9c0216e Complete rewrite of BU code to use Tarjan's SCC finding algorithm to drive
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
2002-11-11 21:35:13 +00:00
Chris Lattner
e71ffc291c Mark stuff reachable by _AUX_ calls as incomplete in the BU graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4690 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 03:36:55 +00:00
Chris Lattner
8a5db46967 Fix infinite loop in the BU algorithm. Unfortunately this dies a serious
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
2002-11-11 00:01:34 +00:00
Chris Lattner
6052594209 Print the right call set size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4688 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 00:01:02 +00:00
Chris Lattner
998c49c247 Use call site mergeWith method to simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4687 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 00:00:46 +00:00