Chris Lattner
773569df86
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.
llvm-svn: 20678
2005-03-19 05:15:27 +00:00
Chris Lattner
54b0239649
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.
llvm-svn: 20676
2005-03-18 23:19:47 +00:00
Chris Lattner
a9f266472f
fix a bogus assertion
...
llvm-svn: 20675
2005-03-18 23:18:30 +00:00
Chris Lattner
1ebf12b477
another fastpath
...
llvm-svn: 20674
2005-03-18 23:18:20 +00:00
Chris Lattner
7a4832c53a
expose this pass to both opt and analyze
...
llvm-svn: 20672
2005-03-18 05:27:57 +00:00
Chris Lattner
c2d54235d7
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.
llvm-svn: 20670
2005-03-18 00:23:59 +00:00
Chris Lattner
57989f2b9a
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.
llvm-svn: 20669
2005-03-18 00:21:03 +00:00
Chris Lattner
a7e0e70f53
implement a new method.
...
llvm-svn: 20668
2005-03-17 23:45:54 +00:00
Chris Lattner
be0eb11431
add some possibly bogus assertions.
...
llvm-svn: 20665
2005-03-17 20:33:27 +00:00
Chris Lattner
097c55f578
Do not include the Function* for direct call/invoke instructions in the
...
alias evaluation. Clients really don't care.
llvm-svn: 20664
2005-03-17 20:25:04 +00:00
Chris Lattner
5368664b75
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.
llvm-svn: 20662
2005-03-17 20:16:58 +00:00
Chris Lattner
430c826ae1
Clean up some code, handle null pointer specially to avoid an assertion
...
llvm-svn: 20660
2005-03-17 19:56:56 +00:00
Chris Lattner
44cbb1f79f
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)
llvm-svn: 20659
2005-03-17 19:56:18 +00:00
Chris Lattner
c9a3ea81bf
Fix the missing symbols problem Bill was hitting. Patch contributed by
...
Bill Wendling!!
llvm-svn: 20649
2005-03-17 15:38:16 +00:00
Chris Lattner
1a8b3193af
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.
llvm-svn: 20648
2005-03-17 05:25:34 +00:00
Chris Lattner
46930f8df5
remove use of compat_iterator.
...
llvm-svn: 20643
2005-03-16 22:42:19 +00:00
Chris Lattner
b40e34bd44
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.
llvm-svn: 20628
2005-03-15 22:47:18 +00:00
Chris Lattner
cece5dd244
fix crashes when we only have a prototype for main.
...
llvm-svn: 20627
2005-03-15 22:10:04 +00:00
Chris Lattner
9802eb4351
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.
llvm-svn: 20626
2005-03-15 21:36:50 +00:00
Chris Lattner
ca69a3542e
Make computeGGToGMapping compute an invnodemap
...
llvm-svn: 20622
2005-03-15 17:52:18 +00:00
Chris Lattner
5eeae726e3
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.
llvm-svn: 20619
2005-03-15 17:14:09 +00:00
Chris Lattner
f4c515e54a
Start using retnodes_* for iteration.
...
llvm-svn: 20618
2005-03-15 16:55:04 +00:00
Chris Lattner
7277bd8606
avoid varialbe name collisions
...
llvm-svn: 20606
2005-03-15 06:29:12 +00:00
Chris Lattner
4b688a1c70
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!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
02d1cf3df0
Don't crash if computing a mapping to a node with zero size
...
llvm-svn: 20595
2005-03-15 04:40:24 +00:00
Chris Lattner
5b39119085
rename method, add counterpart
...
llvm-svn: 20593
2005-03-15 00:58:16 +00:00
Chris Lattner
751bada498
add a method to compute a commonly used mapping.
...
llvm-svn: 20588
2005-03-14 19:22:47 +00:00
Chris Lattner
65fc185896
regardless of whether or not the client things we should mark globals incomplete,
...
ALWAYS mark them incomplete if they are external!
llvm-svn: 20586
2005-03-13 20:36:01 +00:00
Chris Lattner
361e6704b4
Make sure to remove incomplete markers before we add to them! :)
...
llvm-svn: 20585
2005-03-13 20:32:26 +00:00
Chris Lattner
faf51a28e7
The incoming arguments to main (the argv list) are not complete!
...
llvm-svn: 20584
2005-03-13 20:22:10 +00:00
Chris Lattner
cd69084e0e
After finishing BU analysis, move all global variables from the globals
...
graph into main and mark them complete.
llvm-svn: 20583
2005-03-13 20:15:06 +00:00
Chris Lattner
a1c07236db
ADd support for printing eqgraphs.
...
llvm-svn: 20582
2005-03-13 19:51:24 +00:00
Chris Lattner
55e0a19572
Replace linear search with logrithmic one.
...
llvm-svn: 20580
2005-03-13 19:05:05 +00:00
Chris Lattner
9e6d9d0b72
make sure to mark nodes returned from functions as incomplete
...
llvm-svn: 20576
2005-03-12 14:58:28 +00:00
Chris Lattner
a4bd8bd9b0
remove this from the PA namespace, leaving it in the llvm ns
...
llvm-svn: 20574
2005-03-12 12:08:52 +00:00
Chris Lattner
848760c21f
Move this from the pool allocator project to here, where it logically belongs.
...
llvm-svn: 20570
2005-03-12 11:51:30 +00:00
Chris Lattner
30ac52c4b4
Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation
...
that Alkis found with Java, thanks Alkis!
llvm-svn: 20531
2005-03-09 16:29:52 +00:00
Chris Lattner
4d755dc735
Export two methods for getting -X and A-B.
...
llvm-svn: 20527
2005-03-09 05:34:41 +00:00
Chris Lattner
05e4fe5ef3
Make sure the two arguments of a setcc instruction point to the same node.
...
llvm-svn: 20462
2005-03-05 19:04:31 +00:00
Chris Lattner
0864ad52d4
Trivial cleanup patch
...
llvm-svn: 20436
2005-03-04 20:27:46 +00:00
Chris Lattner
cf3862ce8d
Fix spelling, patch contributed by Gabor Greif
...
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Chris Lattner
2311dcd08d
DCE a dead function
...
llvm-svn: 20339
2005-02-26 23:36:45 +00:00
Chris Lattner
cf3cda8125
1 + 100 + 51 == 152, not 52.
...
If we fold three constants together (c1+c2+c3), make sure to keep
LHSC updated, instead of reusing (in this case), the 1 instead of the
partial sum.
llvm-svn: 20337
2005-02-26 18:50:19 +00:00
Chris Lattner
9340ba4bf9
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.
llvm-svn: 20324
2005-02-25 01:27:48 +00:00
Chris Lattner
16f321bbe7
This instruction:
...
X = gep null, ...
Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.
llvm-svn: 20316
2005-02-24 19:55:31 +00:00
Chris Lattner
085b39c9e0
Fix a bug introduced by revision 1.187 of this file.
...
llvm-svn: 20308
2005-02-24 18:48:07 +00:00
Chris Lattner
1969249f13
Remove use of bind_obj, deleter, and finegrainify namespacification.
...
llvm-svn: 20277
2005-02-22 23:27:21 +00:00
Chris Lattner
2198bb53ee
Scary typo that fixes Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll
...
and PR515.
llvm-svn: 20224
2005-02-17 16:54:16 +00:00
Chris Lattner
c5646b3a15
Add a sanity check.
...
llvm-svn: 20195
2005-02-15 18:48:48 +00:00
Chris Lattner
e7d2b05fb0
Add a new method to make it easy to update graphs.
...
llvm-svn: 20194
2005-02-15 18:40:55 +00:00