Chris Lattner
bfd643f504
IndCallGraphMap is now a pointer to a new'd map.
...
llvm-svn: 20065
2005-02-07 16:09:15 +00:00
Chris Lattner
43b0441ccb
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.
llvm-svn: 20036
2005-02-04 19:59:49 +00:00
Chris Lattner
5f8b7b03b0
Split mergeInGraph into two methods.
...
llvm-svn: 20035
2005-02-04 19:58:28 +00:00
Chris Lattner
48828f062c
Fix the Regression/Transforms/DSAnalysis/recursion.ll regression.
...
llvm-svn: 20031
2005-02-04 18:58:04 +00:00
Chris Lattner
15151dbff8
Refactor getFunctionArgumentsForCall out of mergeInGraph.
...
llvm-svn: 20018
2005-02-03 18:40:25 +00:00
Chris Lattner
56e08cc9a3
Eliminate some duplicated debug code
...
llvm-svn: 19980
2005-02-01 21:55:40 +00:00
Chris Lattner
57cdba4154
Eliminate self-recursion as a special case.
...
llvm-svn: 19979
2005-02-01 21:49:43 +00:00
Chris Lattner
b35595d4c0
Eliminate use of DSCallSiteIterator in key loop. This is a half step to
...
a tasty speedup.
llvm-svn: 19978
2005-02-01 21:37:27 +00:00
Chris Lattner
028a8a8f56
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.
llvm-svn: 19970
2005-02-01 19:10:48 +00:00
Chris Lattner
26d4a4b2d2
Do not revisit nodes in the SCC traversal. This speeds up the BU pass a bit.
...
llvm-svn: 19968
2005-02-01 17:35:52 +00:00
Chris Lattner
d9b3839cec
Fix a problem where we could infinitely recurse on phi nodes.
...
llvm-svn: 19955
2005-02-01 00:18:30 +00:00
Chris Lattner
11a25d99d7
Rename variables to work with VC++'s hokey scoping rules.
...
llvm-svn: 19942
2005-01-31 00:10:58 +00:00
Chris Lattner
86f89c506f
Fix some scary bugs that VC++ detected.
...
llvm-svn: 19941
2005-01-31 00:10:45 +00:00
Chris Lattner
ee6bc42f3e
* 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.
llvm-svn: 19939
2005-01-30 23:51:02 +00:00
Chris Lattner
703dfdda2a
Due to previous simplifications, we can simplify the data structures being
...
used here.
llvm-svn: 19913
2005-01-29 07:04:10 +00:00
Chris Lattner
0823ac4234
Properly handle volatile.
...
llvm-svn: 19912
2005-01-29 06:42:34 +00:00
Chris Lattner
8df4ba51b4
Remove some useless map operations. Loads/stores that are in the same
...
BB as the load are not included in the Cand* sets at all.
llvm-svn: 19911
2005-01-29 06:39:25 +00:00
Chris Lattner
af286e3600
Before doing expensive global analysis, check to make sure the pointer is
...
not invalidated on entry and on exit of the block. This fixes some N^2
behavior in common cases, and speeds up gcc another 5% to 22.35s.
llvm-svn: 19910
2005-01-29 06:31:53 +00:00
Chris Lattner
43ccc5c945
Minor simplification/speedup. Replaces a set lookup with a pointer comparison.
...
This speeds up 176.gcc from 25.73s to 23.48s, which is 9.5%
llvm-svn: 19907
2005-01-29 06:20:55 +00:00
Chris Lattner
ae8d4bb675
Eliminate generality that is not buying us anything. In particular, this
...
will cause us to miss cases where the input pointer to a load could be value
numbered to another load. Something like this:
%X = load int* %P1
%Y = load int* %P2
Those are obviously the same if P1/P2 are the same. The code this patch
removes attempts to handle that. However, since GCSE iterates, this doesn't
actually buy us anything: GCSE will first replace P1 or P2 with the other
one, then the load can be value numbered as equal.
Removing this code speeds up gcse a lot. On 176.gcc in debug mode, this
speeds up gcse from 29.08s -> 25.73s, a 13% savings.
llvm-svn: 19906
2005-01-29 06:11:16 +00:00
Chris Lattner
68d73bed4a
If we see:
...
%A = alloca int
%V = load int* %A
value number %V to undef, not 0.
llvm-svn: 19905
2005-01-29 05:57:01 +00:00
Chris Lattner
fadcc07232
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).
llvm-svn: 19864
2005-01-28 06:12:46 +00:00
Chris Lattner
f03b87704f
Make -ds-aa more useful, allowing it to be updated as xforms hack on the program.
...
llvm-svn: 19818
2005-01-24 20:00:14 +00:00
Chris Lattner
c9b64b9749
Silence VC++ warnings.
...
llvm-svn: 19506
2005-01-12 04:51:37 +00:00
Jeff Cohen
a7f1ae5dc0
Apply feed back from Chris:
...
1. Rename createLoaderPass to CreateProfileLoaderPass
2. Opt shouldn't use the pass registered in CodeGen.
llvm-svn: 19431
2005-01-10 03:56:27 +00:00
Jeff Cohen
f692cd303d
Add last four createXxxPass functions
...
llvm-svn: 19424
2005-01-09 20:42:52 +00:00
Jeff Cohen
6827f061cc
Get lib/Analysis/DataStructure to compile with VC++
...
llvm-svn: 19412
2005-01-09 04:18:28 +00:00
Jeff Cohen
6c0db8d863
Add even more missing createXxxPass functions.
...
llvm-svn: 19402
2005-01-08 22:01:16 +00:00
Misha Brukman
0424fc40fa
Wrap at 80 cols
...
llvm-svn: 19121
2004-12-23 21:17:41 +00:00
Reid Spencer
351a3efea1
Try to speed up gccld hot spot in BasicVN::getEqualNumberNodes by making
...
a function call at the core of the loop inline and removing unused
stack variables from an often called function. This doesn't improve things
much, the real saving will be by reducing the number of calls to this
function (100K+ when linking kimwitu++).
llvm-svn: 19119
2004-12-23 21:13:26 +00:00
Chris Lattner
a2afb3775e
Actually overload the virtual method. This fixes
...
Regression/Analysis/GlobalsModRef/purecse.ll. Isn't this what the
-Woverload-whatever flag would warn about :)
llvm-svn: 19018
2004-12-17 17:12:24 +00:00
Chris Lattner
be18a7e20a
Eliminate a virtual method call
...
llvm-svn: 18964
2004-12-15 18:14:04 +00:00
Chris Lattner
6fe0ea70e2
Fix a bug in -no-aa that caused two DSGraph tests to XPASS.
...
llvm-svn: 18962
2004-12-15 17:13:24 +00:00
Chris Lattner
8139749984
Adjust to new alias analysis interfaces
...
llvm-svn: 18957
2004-12-15 07:22:13 +00:00
Alkis Evlogimenos
8547388d22
Add testcase and fix for yet another case where we query the size an
...
abstract type.
llvm-svn: 18678
2004-12-08 23:56:15 +00:00
Alkis Evlogimenos
b00f884344
Add testcase and fix for another case where we query the size an
...
abstract type.
llvm-svn: 18676
2004-12-08 23:42:11 +00:00
Chris Lattner
31ba7367aa
Move method out of line for better ICC support
...
Add some ifdefs for some stuff I like to be able to toggle easily
llvm-svn: 18665
2004-12-08 21:03:56 +00:00
Chris Lattner
458286d514
Properly extern this.
...
llvm-svn: 18664
2004-12-08 21:00:59 +00:00
Chris Lattner
6ebc142507
Work correctly with ICC, Patch contributed by Bjørn Wennberg
...
llvm-svn: 18630
2004-12-08 16:22:26 +00:00
Reid Spencer
d0d846cd06
For PR387:\
...
Add getModRefInfo method to avoid overloaded virtuals
llvm-svn: 18601
2004-12-07 08:11:24 +00:00
Reid Spencer
d50c86f078
For PR387:\
...
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual
llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Chris Lattner
17ebff094f
This patch prevents an infinite recursion while compiling 103.su2cor.
...
All SPEC CFP 95 programs now work, though the JIT isn't loading -lf2c right
so they aren't testing correctly.
llvm-svn: 18499
2004-12-04 20:54:32 +00:00
Chris Lattner
e65724d6eb
Fix DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll
...
llvm-svn: 18308
2004-11-28 20:30:15 +00:00
Chris Lattner
3c35e1e02b
When merging to alias sets, if they are both must alias, the result is not
...
a must alias set unless all of the pointers in the resultant set are must
aliased together.
llvm-svn: 18275
2004-11-27 18:37:42 +00:00
Chris Lattner
ab36efe42b
Add a new interface
...
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Chris Lattner
fca424bb51
When evaluating an AA, pass in size info
...
llvm-svn: 18264
2004-11-26 21:05:39 +00:00
Chris Lattner
aecb6daf08
The trick with globals actually works with allocas and malloc too
...
llvm-svn: 18262
2004-11-26 20:01:48 +00:00
Chris Lattner
e076e608d8
A store or load cannot alias a global if the accessed amount is larger then
...
the global.
This implements Regression/Analysis/BasicAA/global-size.ll
llvm-svn: 18261
2004-11-26 19:20:01 +00:00
Chris Lattner
598ab60438
Mission accomplished!
...
llvm-svn: 17990
2004-11-19 16:22:24 +00:00
Chris Lattner
bd02c10b87
Simplify conditional and fix LICM/2004-11-17-UndefIndexCrash.ll
...
by saying what we mean
llvm-svn: 17913
2004-11-17 17:39:39 +00:00