Commit Graph

673 Commits

Author SHA1 Message Date
Chris Lattner
3f90a94c5d The reachability cloner should add arguments to merged calls when the RHS of
the merge has more operands than the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20731 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 09:39:51 +00:00
Chris Lattner
c2b94805fb 'note to self'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 08:43:32 +00:00
Chris Lattner
d57e55ec0d Change the way that the TD pass inlines graphs. Instead of inlining each
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-21 04:55:35 +00:00
Chris Lattner
53491b3db7 Don't strip modref bits when inlining down the call graph. This fixes
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-20 18:02:56 +00:00
Chris Lattner
cc9bda6a41 Remove the ability to keep track of inlined globals, which is always dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20716 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:30:30 +00:00
Chris Lattner
36474c923f This call is always a noop, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:29:54 +00:00
Chris Lattner
bc6f966a44 remove some pointless asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20713 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:29:39 +00:00
Chris Lattner
5f75ff65bc -steens doesn't use the inlined globals facility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20712 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:23:57 +00:00
Chris Lattner
9b426bdd81 Build EC's for globals twice. The first is after constructing the initial
Globals Graph for the local pass, the second is after all of the locals
graphs have been constructed.  This allows for many additional global EC's
to be recognized that weren't before.  This speeds up analysis of programs
like 177.mesa, where it changes DSA from taking 0.712s to 0.4018s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20711 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 03:32:35 +00:00
Chris Lattner
7cdf321256 Add a new DSNode::removeGlobal method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20710 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 03:29:54 +00:00
Chris Lattner
6b9eb35442 Transform BU pass to not use the horrible DSCallSiteIterator class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20708 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:42:07 +00:00
Chris Lattner
82c6c72862 Implement new methods for dealing with DSNode global lists, rename uses of
old methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20707 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:41:38 +00:00
Chris Lattner
2496d696f0 use simpler methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20706 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:41:16 +00:00
Chris Lattner
977b705d74 method was renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20705 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:40:27 +00:00
Chris Lattner
f5c7ad8949 print out equiv class info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:40:11 +00:00
Chris Lattner
bf30e7268c some methods got renamed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20703 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:40:04 +00:00
Chris Lattner
9454dda28a Make use of simpler DSNode methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20702 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:39:49 +00:00
Chris Lattner
1cee779cec #ifdef out a function only used by #ifdef'd code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20700 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:14:15 +00:00
Chris Lattner
48427b539f comment cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 01:18:00 +00:00
Chris Lattner
f4f6227989 Create an equivalence class of global variables that DSA will never be able
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-19 22:23:45 +00:00
Chris Lattner
605a87cc19 Switch to use the new interface for the EquivalenceClasses class, and fix
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
2005-03-19 05:15:27 +00:00
Chris Lattner
5021b8c2d6 do not bother inlining nullary functions without return values. The only
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
2005-03-18 23:19:47 +00:00
Chris Lattner
db7436aae8 fix a bogus assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20675 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 23:18:30 +00:00
Chris Lattner
0c9707a190 another fastpath
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20674 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 23:18:20 +00:00
Chris Lattner
4707b895b6 remove a bogus optimization. This only works if there are no globals in the
graph, and the combination of a function that does not reference globals, takes
not arguments and returns no value is pretty rare.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20670 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 00:23:59 +00:00
Chris Lattner
511f60c707 Rewrite DSAA::getModRefInfo to compute the mapping between caller and callee
to determine mod/ref behavior, instead of creating a *copy* of the caller
graph and inlining the callee graph into the copy.

This speeds up aa-eval on Ptrdist/yacr2 from 109.13s to 3.98s, and gives
identical results.  The speedup is similar on other programs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20669 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 00:21:03 +00:00
Chris Lattner
4ffe5d8038 implement a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20668 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 23:45:54 +00:00
Chris Lattner
1c8327bd50 add some possibly bogus assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20665 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 20:33:27 +00:00
Chris Lattner
50cb9b40c2 simplify this function a bit, allow DS-AA to build on/improve the mod/ref
results returned by AA, not just use one or the other.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20662 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 20:16:58 +00:00
Chris Lattner
94f8470fe3 Clean up some code, handle null pointer specially to avoid an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20660 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 19:56:56 +00:00
Chris Lattner
2e2cce69bc Two changes:
1. Chain to the parent implementation of M/R analysis if we can't find
     any information.  It has some heuristics that often do well.
  2. Do not clear all flags, this can make invalid nodes by turning nodes
     that used to be collapsed into non-collapsed nodes (fixing crashes)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20659 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 19:56:18 +00:00
Chris Lattner
5b3a4553c1 Fix the missing symbols problem Bill was hitting. Patch contributed by
Bill Wendling!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 15:38:16 +00:00
Chris Lattner
ec3f5c4fd7 Do not create ridiculously huge DSNodes, as described in the comments.
This speeds up the BU pass on 172.mgrid from 62.3 -> 0.1242s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20648 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 05:25:34 +00:00
Chris Lattner
84b80a214a remove use of compat_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20643 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 22:42:19 +00:00
Chris Lattner
38065a7e01 make sure to mark nodes in the globals graph incomplete after computing it
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
2005-03-15 22:47:18 +00:00
Chris Lattner
49e88e80c7 fix crashes when we only have a prototype for main.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 22:10:04 +00:00
Chris Lattner
4d5af8e894 Fix a crash that happens when mapping something like this:
{ short, short }

to
  short

where the second short maps onto the second field of the first struct.  In
this case, the struct index is not aligned, so we should avoid calling
getLink(2), which asserts out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20626 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 21:36:50 +00:00
Chris Lattner
36a13cdeea Make computeGGToGMapping compute an invnodemap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20622 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 17:52:18 +00:00
Chris Lattner
2af8c5185a Finally fix (the right way) the problem where functions like this:
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
2005-03-15 17:14:09 +00:00
Chris Lattner
a5f47ea23d Start using retnodes_* for iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20618 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 16:55:04 +00:00
Chris Lattner
5d85f8f66e avoid varialbe name collisions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20606 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 06:29:12 +00:00
Chris Lattner
e4d5c441e0 This mega patch converts us from using Function::a{iterator|begin|end} to
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
2005-03-15 04:54:21 +00:00
Chris Lattner
841957ebaf Don't crash if computing a mapping to a node with zero size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20595 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:40:24 +00:00
Chris Lattner
b0f92e3ed3 rename method, add counterpart
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20593 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 00:58:16 +00:00
Chris Lattner
b2b17bb65b add a method to compute a commonly used mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20588 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-14 19:22:47 +00:00
Chris Lattner
e2bc7b2517 regardless of whether or not the client things we should mark globals incomplete,
ALWAYS mark them incomplete if they are external!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20586 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:36:01 +00:00
Chris Lattner
270cf5025e Make sure to remove incomplete markers before we add to them! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20585 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:32:26 +00:00
Chris Lattner
b5ecd2e378 The incoming arguments to main (the argv list) are not complete!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20584 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:22:10 +00:00
Chris Lattner
a66e353cf9 After finishing BU analysis, move all global variables from the globals
graph into main and mark them complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20583 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:15:06 +00:00
Chris Lattner
adfd5f14b4 ADd support for printing eqgraphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20582 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:51:24 +00:00
Chris Lattner
2787e03d0e Replace linear search with logrithmic one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20580 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:05:05 +00:00
Chris Lattner
a4319e5826 make sure to mark nodes returned from functions as incomplete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20576 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 14:58:28 +00:00
Chris Lattner
b25959a632 remove this from the PA namespace, leaving it in the llvm ns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20574 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 12:08:52 +00:00
Chris Lattner
7aed7179bd Move this from the pool allocator project to here, where it logically belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20570 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 11:51:30 +00:00
Chris Lattner
3267265d78 Make sure the two arguments of a setcc instruction point to the same node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20462 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:04:31 +00:00
Chris Lattner
f57cc3b7e2 Trivial cleanup patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-04 20:27:46 +00:00
Chris Lattner
f8db8a0432 Fix spelling, patch contributed by Gabor Greif
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20342 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 06:15:51 +00:00
Chris Lattner
6e84bd7d59 Handle null a bit more carefully.
Actually teach dsa about select instructions.  This doesn't affect the
graph in any way other than not setting a spurious U marker on pointer
nodes that are selected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-25 01:27:48 +00:00
Chris Lattner
753b113cdf This instruction:
X = gep null, ...

Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 19:55:31 +00:00
Chris Lattner
d7642c4f2d Fix a bug introduced by revision 1.187 of this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20308 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 18:48:07 +00:00
Chris Lattner
7a0c775044 Add a sanity check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20195 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:48:48 +00:00
Chris Lattner
d672ab936f Add a new method to make it easy to update graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20194 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:40:55 +00:00
Chris Lattner
6be079491f Use new edge iterators to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20086 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-09 03:20:43 +00:00
Chris Lattner
bcc70bcb25 IndCallGraphMap is now a pointer to a new'd map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20065 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 16:09:15 +00:00
Chris Lattner
86db364f02 If we have an indirect call site that calls N functions, inline the N functions
into a temporary graph, remember it for later, then inline the tmp graph into
the call site.

In the case where there are other call sites to the same set of functions, this
permits us to just inline the temporary graph instead of all of the callees.

This turns N*M inlining situations into an N+M inlining situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 19:59:49 +00:00
Chris Lattner
e859444a91 Split mergeInGraph into two methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20035 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 19:58:28 +00:00
Chris Lattner
d7be188323 Fix the Regression/Transforms/DSAnalysis/recursion.ll regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20031 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 18:58:04 +00:00
Chris Lattner
bb753c4f80 Refactor getFunctionArgumentsForCall out of mergeInGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20018 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-03 18:40:25 +00:00
Chris Lattner
269dbf5f5e Eliminate some duplicated debug code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19980 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 21:55:40 +00:00
Chris Lattner
20cd136c5d Eliminate self-recursion as a special case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19979 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 21:49:43 +00:00
Chris Lattner
af8650e9c7 Eliminate use of DSCallSiteIterator in key loop. This is a half step to
a tasty speedup.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19978 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 21:37:27 +00:00
Chris Lattner
1e759999ca Signficantly speed up printing by not emitting the same file twice with
different names.  Large SCC's tend to be big, so this saves a lot of time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19970 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 19:10:48 +00:00
Chris Lattner
f189bcec00 Do not revisit nodes in the SCC traversal. This speeds up the BU pass a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19968 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 17:35:52 +00:00
Chris Lattner
f9aace20fb Rename variables to work with VC++'s hokey scoping rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19942 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-31 00:10:58 +00:00
Chris Lattner
cff8ac20ca Fix some scary bugs that VC++ detected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19941 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-31 00:10:45 +00:00
Chris Lattner
6538f42208 Make things more const-correct, adjust to changes in DSA interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19940 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 23:51:25 +00:00
Chris Lattner
a9548d9fd9 * Make some methods more const correct.
* 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-30 23:51:02 +00:00
Chris Lattner
9cb992ab72 Remove this code as it is currently completely broken and unmaintained.
If needed, this can be resurrected from CVS.

Note that several of the interfaces (e.g. the IPModRef ones) are supersumed
by generic AliasAnalysis interfaces that have been written since this code
was developed (and they are not DSA specific).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19864 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 06:12:46 +00:00
Chris Lattner
851b534b89 Make -ds-aa more useful, allowing it to be updated as xforms hack on the program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19818 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-24 20:00:14 +00:00
Chris Lattner
507bdf9488 Silence VC++ warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19506 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-12 04:51:37 +00:00
Jeff Cohen
1d7b5de7ee Add last four createXxxPass functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19424 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:42:52 +00:00
Jeff Cohen
2611dd4448 Get lib/Analysis/DataStructure to compile with VC++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 04:18:28 +00:00
Chris Lattner
b29dd0ff2b Move method out of line for better ICC support
Add some ifdefs for some stuff I like to be able to toggle easily


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 21:03:56 +00:00
Chris Lattner
fe781654a3 Work correctly with ICC, Patch contributed by Bjørn Wennberg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18630 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 16:22:26 +00:00
Reid Spencer
4a7ebfa411 For PR387:\
Add getModRefInfo method to avoid overloaded virtuals


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 08:11:24 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Chris Lattner
04252fed78 Make this build in release mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17684 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-11 22:11:17 +00:00
Chris Lattner
ac6d4854e1 Fix a bug that was preventing povray and namd from pool allocating correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17632 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 21:08:46 +00:00
Chris Lattner
beacefae61 Handle assert_fail special
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17631 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 21:08:28 +00:00
Chris Lattner
82962de3b9 Don't call Constant::getNullValue when the argument could be VoidTy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17457 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-03 18:51:26 +00:00
Chris Lattner
f1de30acce Graphs that are part of equivalence sets can be multi-function SCC's
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
2004-11-02 20:31:06 +00:00
Chris Lattner
caa35bc0b6 Correctly handle new SCC's found as a result of merging EQ graphs do to
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
2004-11-02 19:29:59 +00:00
Chris Lattner
033a7d5389 Substantially cleanup/speedup the eq graphs pass by walking the callgraph
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
2004-11-02 17:51:11 +00:00
Chris Lattner
983baf472f Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17428 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-02 06:38:58 +00:00
Chris Lattner
4457f7ea46 Remove more dead methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 21:07:05 +00:00
Chris Lattner
fcb7d950bc Rename FoldedGraph -> DSInfo to be consistent with other passes
delete some dead methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17410 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 21:02:23 +00:00
Chris Lattner
77408b8987 Get rid of the EquivClassGraphArgsInfo class, and the map that held it.
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
2004-11-01 20:37:00 +00:00
Chris Lattner
68f9658fcb Eliminate the cloneGraph method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17405 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 19:54:06 +00:00
Chris Lattner
31d3f671be * Do not refer to ActualCallees in CBU, when we can do it locally.
* *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
2004-10-31 23:41:26 +00:00
Chris Lattner
4bbf3dfbe6 Simplify graph traversal, improve grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17383 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 23:01:34 +00:00