Vikram S. Adve
6026f572eb
Recognize memalign and friends, and handle them specially.
...
llvm-svn: 13741
2004-05-25 08:14:52 +00:00
Chris Lattner
dd4c06d2bf
Changes to work with the changes to the AliasAnalysis interface. The -no-aa
...
class is now in the BasicAliasAnalysis.cpp file
llvm-svn: 13684
2004-05-23 21:15:48 +00:00
Chris Lattner
7ccc4c2ed9
Move the -no-aa AA implementation into this file since both of these
...
alias analysis implementations are special: they do not autoforward to a
chained implementation of alias analysis
llvm-svn: 13683
2004-05-23 21:15:12 +00:00
Chris Lattner
1336a3f17a
Updates to work with the new auto-forwarding AA interface changes
...
llvm-svn: 13682
2004-05-23 21:14:27 +00:00
Chris Lattner
0e1a543d88
Fix a really nasty bug with the -disable-ds-field-sensitivity option
...
llvm-svn: 13681
2004-05-23 21:14:09 +00:00
Chris Lattner
89353483d6
Update to match the autochaining interface that the AA interface uses
...
llvm-svn: 13680
2004-05-23 21:13:51 +00:00
Chris Lattner
6c71895a16
Implement the interfaces to update value numbering information. Add an
...
assert.
llvm-svn: 13679
2004-05-23 21:13:24 +00:00
Chris Lattner
0588bd19d2
Rename a method
...
llvm-svn: 13676
2004-05-23 21:10:58 +00:00
Chris Lattner
fa5d566d95
Add a simple implementation of Andersen's interprocedural pointer analysis
...
llvm-svn: 13666
2004-05-23 21:00:47 +00:00
Vikram S. Adve
cf685da276
Inline both direct and indirect callees in the CBU phase because
...
a direct callee may have indirect callees and so may have changed.
llvm-svn: 13649
2004-05-23 08:00:34 +00:00
Chris Lattner
7c723ecb57
Fine grainify namespacification
...
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Brian Gaeke
dfe0d9af07
Move the stuff that fixes the size, orientation & fonts of graphs to
...
the debugging functions that call "dot". These fixed settings have
various problems: for example, the fixed size that is set in the graph
traits classes is not appropriate for turning the dot file into a PNG,
and if TrueType font rendering is being used, the 'Courier' TrueType font
may not be installed. It seems easy enough to specify these things on the
command line, anyhow.
llvm-svn: 13366
2004-05-05 06:10:06 +00:00
Brian Gaeke
f3b62c562e
Add stub support for reading BBTraces.
...
llvm-svn: 13352
2004-05-04 17:11:14 +00:00
Brian Gaeke
ae8607e56a
Share ProfilingType enum with the C profiling runtime libraries.
...
llvm-svn: 13346
2004-05-04 16:53:07 +00:00
Chris Lattner
f5f6f8c0de
Fix a problem with double freeing memory. For some reason, CallGraph is not
...
acting like a normal pass. :(
llvm-svn: 13318
2004-05-02 16:06:18 +00:00
Chris Lattner
099edda1b1
Plug a minor memory leak
...
llvm-svn: 13317
2004-05-02 07:31:34 +00:00
Misha Brukman
f5e334783a
Wrapped code and comments at 80 cols; doxygenified some comments.
...
llvm-svn: 13264
2004-04-29 04:05:30 +00:00
Misha Brukman
9c4c92c40c
Reorder #includes as per style guide.
...
llvm-svn: 13263
2004-04-29 04:04:47 +00:00
Misha Brukman
f8b734296e
Send text and numbers directly to CachedWriter's contained ostream.
...
llvm-svn: 13243
2004-04-28 18:52:43 +00:00
Chris Lattner
02c65b5395
Changes to fix up the inst_iterator to pass to boost iterator checks. This
...
patch was graciously contributed by Vladimir Prus.
llvm-svn: 13185
2004-04-27 15:13:33 +00:00
Brian Gaeke
217515996f
Add functions that return instances of these printer passes
...
llvm-svn: 13175
2004-04-26 16:27:08 +00:00
Chris Lattner
430a61e786
If an object is not in the scalar map then it must be a global from another
...
graph.
llvm-svn: 13173
2004-04-26 14:44:08 +00:00
Chris Lattner
f4eb9eb0f2
Eliminate all of the SCEV Expansion code which is really part of the
...
IndVars pass, not part of SCEV *analysis*.
llvm-svn: 13134
2004-04-23 21:29:03 +00:00
Chris Lattner
e340657a23
Pass the callgraph not the module
...
llvm-svn: 13087
2004-04-20 21:52:26 +00:00
Chris Lattner
c3714a870c
Add the ability for SCC passes to initialize and finalize themselves
...
llvm-svn: 13084
2004-04-20 21:30:06 +00:00
Chris Lattner
710a51d72b
It's not just a printer, it's actually an analysis too
...
llvm-svn: 13064
2004-04-19 03:42:32 +00:00
Chris Lattner
69d4611250
Remove code to update loop depths
...
llvm-svn: 13058
2004-04-19 03:02:09 +00:00
Chris Lattner
509116ec78
Add new method
...
llvm-svn: 13050
2004-04-18 22:45:27 +00:00
Chris Lattner
06e17bb6f7
Fix computation of exit blocks
...
llvm-svn: 13047
2004-04-18 22:21:41 +00:00
Chris Lattner
7174acca00
Change the ExitBlocks list from being explicitly contained in the Loop
...
structure to being dynamically computed on demand. This makes updating
loop information MUCH easier.
llvm-svn: 13045
2004-04-18 22:14:10 +00:00
Chris Lattner
08232425a0
Implement method
...
llvm-svn: 13036
2004-04-18 06:54:48 +00:00
Chris Lattner
6606b526f6
Add a new method, add a check missing that caused a segfault if a loop didn't
...
have a canonical indvar
llvm-svn: 13032
2004-04-18 05:38:05 +00:00
Chris Lattner
b5ee2bcb62
Add the ability to compute exit values for complex loop using unanalyzable
...
operations. This allows us to compile this testcase:
int main() {
int h = 1;
do h = 3 * h + 1; while (h <= 256);
printf("%d\n", h);
return 0;
}
into this:
int %main() {
entry:
call void %__main( )
%tmp.6 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([4 x sbyte]* %.str_1, long 0, long 0), int 364 ) ; <int> [#uses=0]
ret int 0
}
This testcase was taken directly from 256.bzip2, believe it or not.
This code is not as general as I would like. Next up is to refactor it
a bit to handle more cases.
llvm-svn: 13019
2004-04-17 22:58:41 +00:00
Chris Lattner
9a73de2ba2
Add the ability to compute trip counts that are only controlled by constants
...
even if the loop is using expressions that we can't compute as a closed-form.
This allows us to calculate that this function always returns 55:
int test() {
double X;
int Count = 0;
for (X = 100; X > 1; X = sqrt(X), ++Count)
/*empty*/;
return Count;
}
And allows us to compute trip counts for loops like:
int h = 1;
do h = 3 * h + 1; while (h <= 256);
(which occurs in bzip2), and for this function, which occurs after inlining
and other optimizations:
int popcount()
{
int x = 666;
int result = 0;
while (x != 0) {
result = result + (x & 0x1);
x = x >> 1;
}
return result;
}
We still cannot compute the exit values of result or h in the two loops above,
which means we cannot delete the loop, but we are getting closer. Being able to
compute a constant trip count for these two loops will allow us to unroll them
completely though.
llvm-svn: 13017
2004-04-17 18:36:24 +00:00
Brian Gaeke
4b9f67c638
Include <cmath> for compatibility with gcc 3.0.x (the system compiler on
...
Debian.)
llvm-svn: 12986
2004-04-16 15:57:32 +00:00
Chris Lattner
a86cf626b5
add some helpful methods. Rearrange #includes to proper order
...
llvm-svn: 12960
2004-04-15 15:16:02 +00:00
Chris Lattner
e0156bd979
Factor a bunch of classes out into a public header
...
llvm-svn: 12958
2004-04-15 15:07:24 +00:00
Chris Lattner
ff600e280d
Unbreak the build
...
llvm-svn: 12956
2004-04-15 14:17:43 +00:00
Chris Lattner
276a6e102c
Implement a FIXME: if we're going to insert a cast, we might as well only
...
insert it once!
llvm-svn: 12955
2004-04-14 22:01:22 +00:00
Chris Lattner
7f5e4b6d55
This is a trivial tweak to the addrec insertion code: insert the increment
...
at the bottom of the loop instead of the top. This reduces the number of
overlapping live ranges a lot, for example, eliminating a spill in an important
loop in 183.equake with linear scan.
I still need to make the exit comparison of the loop use the post-incremented
version of this variable, but this is an easy first step.
llvm-svn: 12952
2004-04-14 21:11:25 +00:00
Chris Lattner
fd1cfeeb1d
Add some methods that are useful for updating loop information.
...
llvm-svn: 12871
2004-04-12 20:26:17 +00:00
Chris Lattner
12e1831ffe
Change the call graph class to have TWO external nodes, making call graph
...
SCC passes much more useful. In particular, this should fix the incredibly
stupid missed inlining opportunities that the inliner suffered from.
llvm-svn: 12860
2004-04-12 05:36:32 +00:00
Chris Lattner
a688d42e8c
Hrm, operator new and new[] do not belong here. We should not CSE them! :)
...
llvm-svn: 12859
2004-04-12 05:16:42 +00:00
Chris Lattner
02a9e10e74
operator new & operator new[] do not kill any legal memory locations.
...
llvm-svn: 12833
2004-04-11 18:16:34 +00:00
Chris Lattner
aa1c0d5e76
Allow clients to be more efficient.
...
llvm-svn: 12831
2004-04-11 16:43:07 +00:00
Chris Lattner
474637518d
Add a couple of more functions that cannot access memory (the intrinsics) and
...
don't write to memory
llvm-svn: 12808
2004-04-10 06:55:27 +00:00
Chris Lattner
cb6744360c
Fix a bug Brian found.
...
llvm-svn: 12754
2004-04-07 16:16:11 +00:00
Chris Lattner
fb8a43c586
Sparc don't got not "sqrtl", bum bum bum
...
llvm-svn: 12670
2004-04-05 19:05:15 +00:00
Misha Brukman
21355cfcba
Kill warnings during an optimized compile where assert() disappears.
...
llvm-svn: 12669
2004-04-05 19:00:46 +00:00
Chris Lattner
8b61b8c936
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
...
llvm-svn: 12668
2004-04-05 18:46:55 +00:00