Chris Lattner
6a1dd59421
Fix conservative assumption, which was quite broken. Also, notice that
...
functions known to not access memory (like sin/cos) don't access memory! :)
llvm-svn: 15264
2004-07-27 07:46:26 +00:00
Chris Lattner
e921652646
Remove a bogus assertion
...
llvm-svn: 15261
2004-07-27 07:22:21 +00:00
Chris Lattner
c76d21f55d
Complete rewrite of this pass to be faster, use less memory, be easier to
...
understand, and more accurate to boot! This implements
GlobalModRef/purecse.ll over the previous impl.
llvm-svn: 15260
2004-07-27 06:40:37 +00:00
Chris Lattner
550242f7ec
Use context-sensitive alias analysis to avoid pessimization in clients of
...
AliasSetTracker (dse and licm). This implements
DeadStoreElimination/context-sensitive.llx
llvm-svn: 15254
2004-07-27 02:20:26 +00:00
Chris Lattner
40bd881142
Make basicaa a bit more aggressive
...
llvm-svn: 15252
2004-07-27 02:18:52 +00:00
Chris Lattner
fe3fff9354
basic-aa can actually provide simple mod/ref info
...
llvm-svn: 15251
2004-07-27 02:13:55 +00:00
Chris Lattner
9cfa22fb48
This was implemented back in march
...
llvm-svn: 15250
2004-07-27 01:59:42 +00:00
Chris Lattner
8b2590f09f
Add some new methods
...
llvm-svn: 15230
2004-07-26 05:50:23 +00:00
Chris Lattner
447e112745
Fix a latent bug in the AliasSetTracker that was exposed by the FreeInst additions and broke a bunch of programs last night.
...
llvm-svn: 15214
2004-07-25 18:32:01 +00:00
Chris Lattner
31d9cbf7bb
Add support for free instructions
...
llvm-svn: 15197
2004-07-25 07:57:37 +00:00
Chris Lattner
e3adc34ea7
Clean up reference counting to stop "leaking" alias sets
...
llvm-svn: 15099
2004-07-22 07:58:18 +00:00
Brian Gaeke
f18cdca667
These files don't need to include <iostream> since they include "Support/Debug.h".
...
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Chris Lattner
195950df76
Add capability to remove aliasing aliassets from an AST
...
llvm-svn: 15066
2004-07-21 07:04:26 +00:00
Chris Lattner
f9976c5dbf
Make the AST interface a bit richer by returning whether an insertion caused
...
an insertion or not (because the pointer set already existed).
llvm-svn: 15064
2004-07-21 05:18:04 +00:00
Chris Lattner
36940c22f7
Do not ignore casts unless they are pointer-pointer casts. This caused us
...
to miscompile the SingleSource/Regression/C++/pointer_member.cpp program.
llvm-svn: 15062
2004-07-21 03:56:54 +00:00
Reid Spencer
b339652b44
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14942
2004-07-18 00:18:30 +00:00
Chris Lattner
74807fe1a3
Fix incorrect computation of mod/ref sets. Do not ask for mod/ref information
...
for objects of size 0.
llvm-svn: 14908
2004-07-17 07:40:34 +00:00
Chris Lattner
2b68acbfe0
Print modref information in a useful way.
...
llvm-svn: 14907
2004-07-17 06:43:20 +00:00
Chris Lattner
49fd294675
Cleanups: fold two loops into one
...
New features: -print-all-alias-modref-info option, print more info
llvm-svn: 14906
2004-07-17 06:28:49 +00:00
Chris Lattner
763d51409f
Be compatible with IA64
...
llvm-svn: 14864
2004-07-16 00:04:13 +00:00
Chris Lattner
bb7fe18493
Fixes for PR341
...
llvm-svn: 14843
2004-07-15 02:31:46 +00:00
Chris Lattner
d7d7bc70fd
Fix for PR341
...
llvm-svn: 14842
2004-07-15 02:26:49 +00:00
Chris Lattner
fb6e1c2007
Simplify logic.
...
llvm-svn: 14825
2004-07-14 20:27:12 +00:00
Chris Lattner
203cdb2e64
Disable some code that isn't helping matters
...
llvm-svn: 14682
2004-07-08 07:25:51 +00:00
Chris Lattner
dce7977318
Headers moved
...
llvm-svn: 14665
2004-07-07 06:35:22 +00:00
Chris Lattner
7e0d8f8084
Move all of the DSA headers into the Analysis/DataStructure subdir.
...
llvm-svn: 14663
2004-07-07 06:32:21 +00:00
Chris Lattner
fb2f56c7c8
As much as I hate to say it, the whole setNode interface for DSNodeHandles
...
is HOPELESSLY broken. The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.
As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call. This fixes some obscure bugs
handling non-forwarded node handles.
llvm-svn: 14660
2004-07-07 06:12:52 +00:00
Reid Spencer
50ec3f9325
Add #include <iostream> since Value.h does not #include it any more.
...
llvm-svn: 14622
2004-07-04 12:19:56 +00:00
Chris Lattner
7d6a9bf05c
Initial checkin of a simple mod/ref analysis for global variables. This is
...
still overly conservative and uses very simple data structures, but it is a
start, and allows elimination of a lot of loads.
llvm-svn: 14462
2004-06-28 06:33:13 +00:00
Chris Lattner
548171248d
Moved IPModRef out of the public include dir
...
llvm-svn: 14455
2004-06-28 00:41:23 +00:00
Chris Lattner
6eb1e76227
Move DependenceGraph.* to lib/Analysis/DataStructure
...
llvm-svn: 14452
2004-06-28 00:32:33 +00:00
Chris Lattner
a77dd6edec
Moving to lib/Analysis/DataStructure
...
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
f914ccfa2a
Move MemoryDepAnalysis.h into lib/Analysis/DataStructure
...
llvm-svn: 14448
2004-06-28 00:27:16 +00:00
Chris Lattner
244d5fba00
Move PgmDependenceGraph.h out of the public include hierarchy
...
llvm-svn: 14446
2004-06-28 00:20:04 +00:00
Chris Lattner
850f1967b6
Simplify code
...
llvm-svn: 14424
2004-06-26 19:31:26 +00:00
Chris Lattner
d6e23a5104
Fix header
...
llvm-svn: 14394
2004-06-25 04:24:22 +00:00
Chris Lattner
228e6d64d0
Remove distasteful method which is really part of the indvars pass
...
llvm-svn: 14359
2004-06-24 06:52:20 +00:00
Chris Lattner
4e431080a9
Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA on
...
several mallocbench programs, including perl.
llvm-svn: 14342
2004-06-23 06:29:59 +00:00
Misha Brukman
699226cbe4
File requires IPA, moved to lib/Analysis/IPA
...
llvm-svn: 14330
2004-06-22 19:04:53 +00:00
Misha Brukman
f940c277df
File depends on MemoryDepAnalysis (DSA); moved to lib/Analysis/DataStructure
...
llvm-svn: 14327
2004-06-22 18:28:37 +00:00
Misha Brukman
170b8a80de
Files depend on DSA, moved to lib/Analysis/DataStructure
...
llvm-svn: 14326
2004-06-22 18:13:24 +00:00
Misha Brukman
43f0a951fe
File depends on DSA, moved to lib/Analysis/DataStructure
...
llvm-svn: 14325
2004-06-22 18:11:38 +00:00
Chris Lattner
26e594052e
If an edge points to a field of another memory object, actually reflect this
...
in the DOT visualization of the DSGraphs.
llvm-svn: 14316
2004-06-22 07:13:10 +00:00
Chris Lattner
fea46da8de
REALLY fix PR378: crash in scalar evolution analysis
...
llvm-svn: 14275
2004-06-20 20:32:16 +00:00
Chris Lattner
59d13ac701
Fix a bug in my change last night that caused a few test failures.
...
llvm-svn: 14270
2004-06-20 17:01:44 +00:00
Chris Lattner
8c90177e5f
Do not sort SCEV objects by address: instead sort by complexity and group
...
by address. This prevents the resultant SCEV objects from depending on
where in memory other scev objects happen to live.
llvm-svn: 14263
2004-06-20 06:23:15 +00:00
Chris Lattner
9b19f34fe2
Fix a tiny bug in the -no-aa pass, in which it did not ever get a target data.
...
This is a regression from 1.2, though noone uses -no-aa anyway
llvm-svn: 14245
2004-06-19 08:05:58 +00:00
Chris Lattner
0cd29ae2cd
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
7c3600a50e
isnan is dead
...
llvm-svn: 14191
2004-06-15 21:52:58 +00:00
Chris Lattner
8dd2380de4
llvm.isnan doesn't access memory
...
llvm-svn: 14151
2004-06-11 06:17:13 +00:00
Chris Lattner
9579beadfe
Don't grab the condition of unconditional branches!
...
This fixes PR363
llvm-svn: 14076
2004-06-08 21:50:30 +00:00
Chris Lattner
1515fd1851
Add some notes so I can throw away one of my many todo lists.
...
llvm-svn: 14046
2004-06-05 20:12:36 +00:00
Chris Lattner
2afbad063f
Don't send random junk to CachedWriter's. Also remove a cast that could be
...
problematic when Type does not derive from Value.
llvm-svn: 14022
2004-06-04 20:25:55 +00:00
Chris Lattner
37c8081a07
Minor efficiency gain: do 1 nlogn lookup instead of two
...
Code cleanup
llvm-svn: 13875
2004-05-28 05:36:49 +00:00
Chris Lattner
91633c1b92
Fix warnings about reaching end of non-void function
...
llvm-svn: 13852
2004-05-27 20:57:01 +00:00
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
Chris Lattner
9236135e8f
Support getelementptr instructions which use uint's to index into structure
...
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
llvm-svn: 12653
2004-04-05 01:30:19 +00:00
Chris Lattner
3ccb7f2275
Implement test/Regression/Transforms/GCSE/undefined_load.ll
...
llvm-svn: 12641
2004-04-03 00:45:16 +00:00
Chris Lattner
0329ff0b87
Add a break in the default case
...
llvm-svn: 12639
2004-04-03 00:43:03 +00:00
Chris Lattner
409ef7935c
Remove obsolete files
...
llvm-svn: 12633
2004-04-02 20:56:24 +00:00
Chris Lattner
0a34ab8221
Comment out debugging printouts
...
llvm-svn: 12623
2004-04-02 20:26:46 +00:00
Chris Lattner
74911ffd6b
Add a new analysis
...
llvm-svn: 12619
2004-04-02 20:23:17 +00:00
Chris Lattner
ecb0efb6e5
Minor efficiency improvement, finegrainify namespacification
...
llvm-svn: 12517
2004-03-25 22:56:03 +00:00
Chris Lattner
c534fac018
Fix a HORRIBLY NASTY bug that caused siod to stop working last night.
...
llvm-svn: 12479
2004-03-17 23:22:04 +00:00
Chris Lattner
c2eb0678d8
Add some missing functions. Make sure to handle calls together in case the
...
client has another VN implementation that can VN calls.
llvm-svn: 12427
2004-03-16 03:41:35 +00:00
Chris Lattner
19ce9dbb05
Ok, the assertion was bogus. Calls that do not read/write memory should not
...
have an alias set, just like adds and subtracts don't.
llvm-svn: 12422
2004-03-15 06:28:07 +00:00
Chris Lattner
5654b5de80
This assertion is bogus now that calls do not necessarily read/write memory
...
llvm-svn: 12421
2004-03-15 06:24:15 +00:00
Chris Lattner
62771c4bef
Implement CSE of call instructions in the most trivial case. This implements
...
GCSE/call_cse.ll
llvm-svn: 12419
2004-03-15 05:44:59 +00:00
Chris Lattner
cd227e5bdb
Fix a minor bug, implementing GCSE/call_pure_function.ll
...
Also, add some stuff I missed before.
llvm-svn: 12417
2004-03-15 04:18:28 +00:00
Chris Lattner
b0cf0f89be
Don't be COMPLETELY pessimistic in the face of function calls
...
llvm-svn: 12413
2004-03-15 04:08:36 +00:00
Chris Lattner
cb99b04ead
Deinline some virtual methods, provide better mod/ref answers through the
...
use of the boolean queries
llvm-svn: 12410
2004-03-15 04:07:29 +00:00
Chris Lattner
60c61e337a
Pass through the boolean queries
...
llvm-svn: 12409
2004-03-15 04:06:46 +00:00
Chris Lattner
0ea40c6fac
Teach basicaa about some stdc functions.
...
llvm-svn: 12408
2004-03-15 03:36:49 +00:00
Chris Lattner
37b7966121
Fix a tiny bug that caused an incorrect assertion failure poolallocating
...
boxed-sim.
llvm-svn: 12358
2004-03-13 01:14:23 +00:00
Chris Lattner
f7bc6fd913
Rename the intrinsic enum values for llvm.va_* from Intrinsic::va_* to
...
Intrinsic::va*. This avoid conflicting with macros in the stdlib.h file.
llvm-svn: 12356
2004-03-13 00:24:00 +00:00
Chris Lattner
bb08e801d4
Fix a couple of minor problems. Because PHI nodes can use themselves, this
...
could cause infinite loops. Also, getUnderlyingObject can return null
llvm-svn: 12351
2004-03-12 23:12:55 +00:00
Chris Lattner
6bd3783ef8
Implement mod/ref analysis for a trivial case where locals don't escape.
...
This comes up when you have a local array on the stack and you never pass
the address of elements around.
llvm-svn: 12349
2004-03-12 22:39:00 +00:00
Misha Brukman
ffcf81a11b
Simplify code to process CallSites (thanks to Chris).
...
llvm-svn: 12334
2004-03-12 16:20:49 +00:00
Misha Brukman
b5e89d17c2
Evaluate ModRef information in addition to regular ol' pointer analysis.
...
llvm-svn: 12331
2004-03-12 06:15:08 +00:00
Misha Brukman
ee27e80a0b
Implement getModRefInfo() for DSA to calculate whether a function modifies or
...
references a pointer.
llvm-svn: 12330
2004-03-12 06:14:22 +00:00
Misha Brukman
da119ce857
Make code more readable.
...
llvm-svn: 12305
2004-03-12 00:58:41 +00:00
Chris Lattner
405790ecae
Fix PR284: [indvars] Induction variable analysis violates LLVM invariants
...
llvm-svn: 12275
2004-03-10 21:42:19 +00:00
Chris Lattner
9ce3638433
implement new method
...
llvm-svn: 12264
2004-03-09 19:37:06 +00:00
Chris Lattner
9414c55663
Switch to using edge profiling information as the basic source of profile info
...
from using basic block counts.
llvm-svn: 12242
2004-03-08 22:04:08 +00:00
Chris Lattner
83c62c84d6
Refactor implementations
...
llvm-svn: 12240
2004-03-08 21:30:35 +00:00
Chris Lattner
91ea0d3176
Import the trace class from the reoptimizer
...
llvm-svn: 12236
2004-03-08 20:57:27 +00:00
Chris Lattner
de661f7219
If we have edge counts, we can produce block counts. I've verified that
...
using an edge profile to produce block counts gives the exact same numbers
as using a block count directly.
llvm-svn: 12232
2004-03-08 20:03:52 +00:00
Chris Lattner
f3a838662e
Add initial support for reading edge counts. This will be improved to enable
...
translation of edge counts into block/function counts when possible.
llvm-svn: 12229
2004-03-08 18:20:18 +00:00
Chris Lattner
1ae4150e31
Fix a bug handling globals that are constants, but are still external
...
llvm-svn: 12208
2004-03-08 03:52:24 +00:00
Chris Lattner
5a9cae47a4
Fix a minor bug
...
llvm-svn: 12169
2004-03-05 22:04:07 +00:00
Misha Brukman
75729872be
Unbreak the build on Sparc.
...
llvm-svn: 12161
2004-03-05 20:04:40 +00:00
Chris Lattner
f21e7a75d6
Fix a bug in a previous checkin that broke 175.vpr
...
llvm-svn: 12128
2004-03-04 21:36:57 +00:00
Chris Lattner
c885697daa
Add support for strto* and v*printf
...
llvm-svn: 12127
2004-03-04 21:03:54 +00:00
Chris Lattner
48b0fd7101
Add non-crappy support for varargs
...
llvm-svn: 12126
2004-03-04 20:33:47 +00:00
Chris Lattner
ac1eaa43fa
Implement a FIXME, improving the efficiency of DSA on povray.
...
This reduces CBU time from 145s -> 122s (debug build), reduces # allocated nodes
from 129420 to 116477.
llvm-svn: 12125
2004-03-04 19:47:04 +00:00
Chris Lattner
e3fc09a37e
Speed up the cbu pass from taking somewhere near the age of the universe to about 90s on povray
...
llvm-svn: 12123
2004-03-04 19:16:35 +00:00
Chris Lattner
bc7fc82865
Fix BU datastructures with povray!
...
The problem was that we were merging a field of a node with a value that was
deleted. Thanks to bugpoint for reducing povray to a nice small 3 function
example. :)
llvm-svn: 12116
2004-03-04 17:06:53 +00:00
Chris Lattner
e0c90cf983
Minor changes, remove some debugging code that got checked in somehow.
...
Make sure to scope the NodeMap passed into cloneInto so that it doesn't point
to nodes that are deleted. Add some FIXME's for future performance enhancements.
llvm-svn: 12115
2004-03-04 17:05:28 +00:00
Chris Lattner
790bd9d970
Only clone nodes that are needed in the caller, don't clone ALL aux calls. This improves
...
povray from having ~600K nodes and 300K call nodes to 65K nodes and 25K call nodes.
llvm-svn: 12109
2004-03-04 03:57:53 +00:00
Chris Lattner
a141de0f09
Fix a minor bug handling incomplete programs
...
llvm-svn: 12105
2004-03-03 23:00:19 +00:00
Chris Lattner
0e1cd00f2c
Fix a DSA bug that caused DSA to generate incredibly huge graphs and take forever to
...
do it on povray. The problem is that we were not copying globals from callees to
callers unless the existed in both graphs. We should have copied them in the case
where the global pointed to a node that was copied as well.
llvm-svn: 12104
2004-03-03 22:01:09 +00:00
Chris Lattner
a6540122dc
Deinline methods, add fast exit
...
llvm-svn: 12102
2004-03-03 20:55:27 +00:00
Chris Lattner
309a57f0c0
Fix a node mapping problem that was causing the pool allocator to locally allocate
...
nodes that were globally live, thus breaking programs.
llvm-svn: 12094
2004-03-03 05:34:31 +00:00
Chris Lattner
ea4242a575
FINALLY be able to get symbolic type names in the globals graph!
...
llvm-svn: 12082
2004-03-02 21:39:43 +00:00
Chris Lattner
833646d6b8
Really, only if reopen
...
llvm-svn: 12080
2004-03-02 20:46:18 +00:00
Chris Lattner
e7c638e989
Correctly add an array marker on a node when appropriate!
...
llvm-svn: 12055
2004-03-01 19:02:54 +00:00
Chris Lattner
9bf85f216b
Expand on my note-to-self
...
llvm-svn: 12029
2004-03-01 02:44:44 +00:00
Chris Lattner
9e71c09ff5
Only clone global nodes between graphs if both graphs have the global.
...
llvm-svn: 11928
2004-02-27 20:05:15 +00:00
Chris Lattner
138a7dfb62
ADD MORE FUNCTIONS!
...
llvm-svn: 11927
2004-02-27 20:04:48 +00:00
Chris Lattner
d359fbf991
Be a good little compiler and handle direct calls efficiently, even if there
...
are beastly ConstantPointerRefs in the way...
llvm-svn: 11883
2004-02-26 22:07:22 +00:00
Chris Lattner
9e55e31b2d
Fix typo
...
llvm-svn: 11864
2004-02-26 03:45:03 +00:00
Chris Lattner
7990e4dcd0
The node doesn't have to be _no_ node flags, it just has to be complete and
...
not have any globals.
llvm-svn: 11863
2004-02-26 03:43:43 +00:00
Chris Lattner
948fffa8a2
Add _more_ functions
...
llvm-svn: 11862
2004-02-26 03:43:08 +00:00
Chris Lattner
9fd0c48f80
Two changes:
...
1. Functions do not make things incomplete, only variables
2. Constant global variables no longer need to be marked incomplete, because
we are guaranteed that the initializer for the global will be in the
graph we are hacking on now. This makes resolution of indirect calls happen
a lot more in the bu pass, supports things like vtables and the C counterparts
(giant constant arrays of function pointers), etc...
Testcase here: test/Regression/Analysis/DSGraph/constant_globals.ll
llvm-svn: 11852
2004-02-25 23:36:08 +00:00
Chris Lattner
7d273bc532
When building local graphs, clone the initializer for constant globals into each
...
local graph that uses the global.
llvm-svn: 11850
2004-02-25 23:31:02 +00:00
Chris Lattner
9fe3bf296d
Simplify the dead node elimination stuff
...
Make the incompleteness marker faster by looping directly over the globals
instead of over the scalars to find the globals
Fix a bug where we didn't mark a global incomplete if it didn't have any
outgoing edges. This wouldn't break any current clients but is still wrong.
llvm-svn: 11848
2004-02-25 23:08:00 +00:00
Chris Lattner
a9f67b5ab8
Add a bunch more functions
...
llvm-svn: 11847
2004-02-25 23:06:40 +00:00
Chris Lattner
d99d965f8c
Try harder to get symbol info
...
llvm-svn: 11846
2004-02-25 23:06:30 +00:00
Chris Lattner
4f09004dff
Add a bunch more functions used by perlbmk
...
llvm-svn: 11824
2004-02-25 17:43:20 +00:00
Chris Lattner
9036c86b14
Add support for 'rename'
...
llvm-svn: 11813
2004-02-24 22:17:00 +00:00
Chris Lattner
d9652be664
Add support for remove, fwrite, and fread
...
Also fix problem where we didn't check to see if a node pointer was null.
Though fclose(null) doesn't make a lot of sense, 300.twolf does it.
llvm-svn: 11810
2004-02-24 22:02:48 +00:00
Chris Lattner
63b79422f3
Fix a soon-to-be-missing #include
...
llvm-svn: 11707
2004-02-22 06:26:17 +00:00
Chris Lattner
573441bfbd
Use isNull instead of getNode() to test for existence of a node, this is cheaper.
...
FIX MAJOR BUG, whereby we didn't merge null edges correctly. Correcting this
fixes poolallocation on 175.vpr, and possibly others.
llvm-svn: 11695
2004-02-22 00:53:54 +00:00
Chris Lattner
7bff00313e
Fix an iterator invalidation problem which was causing some nodes to not be
...
correctly merged over!
llvm-svn: 11693
2004-02-21 22:28:26 +00:00
Chris Lattner
458704f675
Use handy method
...
llvm-svn: 11692
2004-02-21 22:27:31 +00:00
Chris Lattner
dacc6a7448
Instead of cloning the globals for main into the globals graph at the end of
...
BU propagation, clone the globals into the GG of EACH FUNCTION that finishes
processing! The GlobalsGraph *must* include all globals and effects from
all functions in the program. Fixing this makes pool allocation work better
on 175.vpr, but it still ultimately crashes.
llvm-svn: 11686
2004-02-21 00:30:28 +00:00
Chris Lattner
0f9200e5a5
There is no need to merge the globals graph into the function graphs at the
...
end of the BU and CBU passes. The globals will be marked incomplete, so it
doesn't matter if they are missing some info, and merging isn't guaranteed
to bring everything in anyway!
llvm-svn: 11684
2004-02-20 23:52:15 +00:00
Chris Lattner
31f8fa66cb
Add two missing returns, which caused us to be very pessimistic about the
...
printf and scanf families!
llvm-svn: 11683
2004-02-20 23:27:09 +00:00
Chris Lattner
4653c4cb50
Add support for some string functions, the scanf family, and sprintf
...
llvm-svn: 11673
2004-02-20 20:27:11 +00:00
Chris Lattner
d9e1a49650
When we complete the bottom-up pass, make sure to merge the globals in 'main' into
...
the globals graph.
llvm-svn: 11562
2004-02-17 19:06:47 +00:00
Chris Lattner
2c0736be99
Only spit out warning for functions that take pointers, not for sin and the like
...
Add more special case handling for stdio functions. I feel dirty, how about you?
llvm-svn: 11506
2004-02-16 22:57:19 +00:00
Chris Lattner
513e4c7bd9
memset and bcopy and now unified by the llvm.memset intrinsic
...
llvm-svn: 11503
2004-02-16 18:37:40 +00:00
Chris Lattner
cd6a595db5
No need to scan zero initializers. This should make DSA a bit faster.
...
llvm-svn: 11471
2004-02-15 05:53:42 +00:00
Chris Lattner
33ed4f9de9
Add support for a bunch more functions
...
llvm-svn: 11395
2004-02-13 21:21:48 +00:00
Chris Lattner
fbacee0077
Add support for fopen/fclose. Specifically with fopen, we were marking all of the
...
operands as incomplete, though fopen is known to only read them. This just adds
fclose for symmetry, though it doesn't gain anything. This makes the dsgraphs for
181.mcf much more precise.
llvm-svn: 11390
2004-02-13 20:05:32 +00:00
Chris Lattner
dd8e3f4208
Restructure code to handle memcpy/memmove
...
llvm-svn: 11374
2004-02-13 16:09:54 +00:00
Chris Lattner
ffd9c8a00b
Cosmetic improvements to this option.
...
llvm-svn: 11331
2004-02-11 19:14:04 +00:00
Chris Lattner
66e7209785
Actually load profiling information now! Block layout can use real, live,
...
actual profile info, and works! :)
llvm-svn: 11324
2004-02-11 18:21:05 +00:00
Chris Lattner
16ad30203c
Fix a typeo
...
llvm-svn: 11323
2004-02-11 18:20:41 +00:00
Chris Lattner
36f91c80f4
Fix copy-and-pastos
...
llvm-svn: 11319
2004-02-11 06:10:18 +00:00
Chris Lattner
c456d0cbc7
Add skeleton profileinfoloader pass. This will be enhanced to actually LOAD
...
a profile tommorow. :)
llvm-svn: 11318
2004-02-11 06:10:05 +00:00
Chris Lattner
427c8ee657
Factor this code out of llvm-prof
...
llvm-svn: 11314
2004-02-11 05:54:25 +00:00
Chris Lattner
c9900e2eb3
Make sure to register the 'no profile' implementation as the default for ProfileInfo
...
llvm-svn: 11309
2004-02-11 04:47:54 +00:00
Chris Lattner
f8077b7801
Simplify implementation, and probably speed things up too.
...
llvm-svn: 11308
2004-02-11 03:57:16 +00:00
Chris Lattner
a81258a786
An initial implementation of an LLVM ProfileInfo class which is designed to
...
eventually allow Passes to use profiling information to direct them.
llvm-svn: 11294
2004-02-10 22:11:42 +00:00
Chris Lattner
16690fad3d
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
...
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
838c2dd5af
Add one that I missed
...
llvm-svn: 11179
2004-02-08 01:53:10 +00:00
Chris Lattner
cc1376078c
Instead of callign removeTriviallyDeadNodes on the global graph every time
...
removeDeadNodes is called, only call it at the end of the pass being run.
This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is
pretty big. This is only possible because of the automatic garbage
collection done on forwarding nodes.
llvm-svn: 11178
2004-02-08 01:51:48 +00:00
Chris Lattner
e2ee216e1f
Remove another unneeded call.
...
llvm-svn: 11177
2004-02-08 01:40:40 +00:00
Chris Lattner
85ba7bbf78
This call is no longer needed now that merging does not produce garbage
...
llvm-svn: 11176
2004-02-08 01:38:34 +00:00
Chris Lattner
32a3eb0b88
Substantially improve the DSA code by removing 'forwarding' nodes from
...
DSGraphs while they are forwarding. When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted. This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.
llvm-svn: 11175
2004-02-08 01:27:18 +00:00
Chris Lattner
84ff796305
Bugfix for ilist conversion. The ilist wants to make an 'end' node which has
...
G == 0
llvm-svn: 11174
2004-02-08 01:05:37 +00:00
Chris Lattner
29067016a4
Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
...
llvm-svn: 11173
2004-02-08 00:53:26 +00:00
Chris Lattner
2c836fc933
Change to use node_iterators instead of direct access to Nodes
...
llvm-svn: 11171
2004-02-08 00:23:16 +00:00
Chris Lattner
6af67c7eb4
getNodes() is gone, use node_begin/end instead
...
Rename stats from dsnode -> dsa
Add a new stat
llvm-svn: 11167
2004-02-07 23:58:05 +00:00
Chris Lattner
ed36ca5f13
getNodes() is gone
...
llvm-svn: 11166
2004-02-07 23:57:26 +00:00
Chris Lattner
ce838bfae6
There is no need to clone over nodes that are going to be dead anyway
...
llvm-svn: 11157
2004-02-07 22:00:03 +00:00
Chris Lattner
ffc5eee17a
In a "seeing the forest through the trees" kinda situation, I realized that a
...
complete rewrite of load-vn will make it a bit faster. This changes speeds up
the gcse pass (which uses load-vn) from 25.45s to 0.42s on the testcase in
PR209.
I've also verified that this gives the exact same results as the old one.
llvm-svn: 11132
2004-02-05 17:20:00 +00:00
Chris Lattner
1a04f2a635
This is a big diff with no functionality change. We just reorder some code,
...
which causes big reindentation. While I'm at it, I fix the fixme by removing
some dead code.
llvm-svn: 11131
2004-02-05 05:56:23 +00:00
Chris Lattner
7d5e3febb7
finegrainify namespacification
...
llvm-svn: 11130
2004-02-05 05:51:40 +00:00
Tanya Lattner
d7b137d9fb
Fixed Chris' typo.
...
llvm-svn: 11128
2004-02-05 04:45:21 +00:00
Chris Lattner
b721589bc0
Implement optimizations for handling large basic blocks.
...
llvm-svn: 11126
2004-02-05 00:36:43 +00:00
Chris Lattner
89f03df701
Avoid referencing deleted DSgraphs when merging an SCC into a larger SCC. This
...
fixes the crash in 176.gcc.
llvm-svn: 11033
2004-01-31 21:02:18 +00:00
Chris Lattner
a497e3d6e1
Fix thinko
...
llvm-svn: 11027
2004-01-30 22:48:02 +00:00
Chris Lattner
0127841d4e
Forward method request to chained aa implementation
...
llvm-svn: 11024
2004-01-30 22:20:55 +00:00
Chris Lattner
8bcdaf9b5d
Implement the pointsToConstantMemory() method.
...
llvm-svn: 11022
2004-01-30 22:17:24 +00:00
Chris Lattner
71d05cef5e
Improve mod/ref information based on the pointsToConstantMemory method.
...
llvm-svn: 11021
2004-01-30 22:16:42 +00:00
Misha Brukman
440d62207c
Order #includes alphabetically, per style guide.
...
llvm-svn: 11015
2004-01-30 17:26:24 +00:00
Chris Lattner
dfa4f14e34
Fix a bug aflicting 265.gap
...
llvm-svn: 11006
2004-01-29 08:36:22 +00:00
Chris Lattner
caecd769c4
Minor bugfixes
...
llvm-svn: 11005
2004-01-29 03:32:15 +00:00
Chris Lattner
7ab2349541
Rename DSGraph::ScalarMapTy -> DSScalarMap
...
llvm-svn: 11001
2004-01-28 09:15:42 +00:00
Chris Lattner
9a79b1690c
Fix a bug
...
llvm-svn: 11000
2004-01-28 03:31:34 +00:00
Chris Lattner
8324e48b84
Eliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,
...
moving it to the start of removeDeadNodes. This speeds up DSA by 2s on perlbmk
from 41s
llvm-svn: 10999
2004-01-28 03:24:41 +00:00
Chris Lattner
92eb91ed70
In the TD pass, iterate over globals directly instead of through the whole scalar
...
map. This saves 5s in the TD pass, from 22->17s on perlbmk
llvm-svn: 10998
2004-01-28 03:12:48 +00:00
Chris Lattner
c25a7dad97
In the TD pass, don't iterate over the scalar map to find the globals, iterate over
...
the globals directly. This doesn't save any substantial time, however, because the
globals graph only contains globals!
llvm-svn: 10997
2004-01-28 03:07:30 +00:00
Chris Lattner
394c9343b4
In updateFromGlobalsGraph, instead of iterating over all of the scalars in the
...
function to find the globals, iterate over all of the globals directly. This
speeds the function up from 14s to 6.3s on perlbmk, reducing DSA time from
53->46s.
llvm-svn: 10996
2004-01-28 03:03:06 +00:00
Chris Lattner
528f5842dd
Minor tweaks, eliminate useless integer pruning optimziation, turn on
...
timers by default
llvm-svn: 10993
2004-01-28 02:41:32 +00:00
Chris Lattner
18e0615a69
Further reduce the number of nodes cloned with getClonedNH, using merge instead.
...
This reduces the number of nodes allocated, then immediately merged and DNE'd
from 2193852 to 1298049. unfortunately this only speeds DSA up by ~1.5s (of
53s), because it's spending most of its time waddling through the scalar map :(
llvm-svn: 10992
2004-01-28 02:11:49 +00:00
Chris Lattner
6d38674f7b
Add a timer, fix a minor bug.
...
Also, use RC::merge when possible, reducing the number of nodes allocated, then immediately merged away from 2985444 to 2193852 on perlbmk.
llvm-svn: 10991
2004-01-28 02:05:05 +00:00
Chris Lattner
10881df6e2
Another bugfix, disable "spurious" output.
...
You gotta love spurious
llvm-svn: 10990
2004-01-28 01:19:52 +00:00
Chris Lattner
b0d7b564dd
fix bug in previous checkin
...
llvm-svn: 10989
2004-01-27 22:54:56 +00:00
Chris Lattner
3bd20c5114
* Add a new commandline argument to control the "global roots hack". Default
...
it to be off. If it looks like it's completely unnecessary after testing, I
will remove it completely (which is the hope).
* Callers of the DSNode "copy ctor" can not choose to not copy links.
* Make node collapsing not create a garbage node in some cases, avoiding a
memory allocation, and a subsequent DNE.
* When merging types, allow two functions of different types to be merged
without collapsing.
* Use DSNodeHandle::isNull more often instead of DSNodeHandle::getNode() == 0,
as it is much more efficient.
*** Implement the new, more efficient reachability cloner class
In addition to only cloning nodes that are reachable from interesting
roots, this also fixes the huge inefficiency we had where we cloned lots
of nodes, only to merge them away immediately after they were cloned.
Now we only actually allocate a node if there isn't one to merge it into.
* Eliminate the now-obsolete cloneReachable* and clonePartiallyInto methods
* Rewrite updateFromGlobalsGraph to use the reachability cloner
* Rewrite mergeInGraph to use the reachability cloner
* Disable the scalar map scanning code in removeTriviallyDeadNodes. In large
SCC's, this is extremely expensive. We need a better data structure for the
scalar map, because we really want to scan the unique node handles, not ALL
of the scalars.
* Remove the incorrect SANER_CODE_FOR_CHECKING_IF_ALL_REFERRERS_ARE_FROM_SCALARMAP code.
* Move the code for eliminating integer nodes from the trivially dead
eliminator to the dead node eliminator.
* removeDeadNodes no longer uses removeTriviallyDeadNodes, as it contains a
superset of the node removal power.
* Only futz around with the globals graph in removeDeadNodes if it is modified
llvm-svn: 10987
2004-01-27 22:03:40 +00:00
Chris Lattner
727e11ac33
Rewrite to use the reachability cloner interface. Also, make this much more
...
efficient in the case where a function calls into the same graph multiple times
(ie, it either contains multiple calls to the same function, or multiple calls
to functions in the same SCC graph)
llvm-svn: 10986
2004-01-27 21:53:14 +00:00
Chris Lattner
25f95d2b7c
minor cleanups
...
llvm-svn: 10985
2004-01-27 21:51:19 +00:00
Chris Lattner
9117f221b1
Get clone flags right, so we don't build InlinedGlobals only to clear them
...
llvm-svn: 10984
2004-01-27 21:50:41 +00:00
Chris Lattner
6d2f67adb3
Initial support for implementing clonePartiallyInto in terms of cloneReachableSubgraph, though this support is currently disabled.
...
llvm-svn: 10970
2004-01-23 01:44:53 +00:00
Chris Lattner
a72f3a387a
Eliminated the CompletedNodes argument to the cloneReachable* methods. This
...
map was only used to implement a marginal GlobalsGraph optimization, and it
actually slows the analysis down (due to the overhead of keeping it), so just
eliminate it entirely.
llvm-svn: 10955
2004-01-22 16:56:13 +00:00
Chris Lattner
50e765d1a2
Ok, I'm tired of pulling out all my timers to check stuff in, just do it.
...
llvm-svn: 10954
2004-01-22 16:36:28 +00:00
Chris Lattner
da04e4d383
Bug fix: X.mergeWith(Y) was not updating Y if Y was a null node handle!
...
llvm-svn: 10953
2004-01-22 16:31:08 +00:00
Chris Lattner
07d45564d0
Start implementing DSGraph::clonePartiallyInto and implement mergeInGraph
...
in terms of it.
Though clonePartiallyInto is not cloning partial graphs yet, this change
dramatically speeds up inlining of graphs with many scalars. For example,
this change speeds up the BU pass on 253.perlbmk from 69s to 36s, because
it avoids iteration over the scalar map, which can get pretty large.
llvm-svn: 10951
2004-01-22 15:30:58 +00:00
Chris Lattner
961cc51cf1
Allow disabling of ALL printing overhead when performing timings
...
llvm-svn: 10948
2004-01-22 13:42:43 +00:00
Chris Lattner
c290310e9f
Remove use of ConstantHandling itf
...
llvm-svn: 10781
2004-01-12 18:02:15 +00:00
Chris Lattner
a2612e417c
Eliminate use of ConstantHandling itf
...
llvm-svn: 10780
2004-01-12 17:57:32 +00:00
Chris Lattner
d2ef2c91e8
Live var is now in lib/Target/Sparc
...
llvm-svn: 10735
2004-01-09 18:16:20 +00:00
Chris Lattner
103dabde37
Move sparc-specific code into lib/Target/Sparc
...
llvm-svn: 10734
2004-01-09 18:15:56 +00:00
Chris Lattner
1736f44b1d
Improve encapsulation in the Loop and LoopInfo classes by eliminating the
...
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.
llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
8caf13292a
Add a note
...
llvm-svn: 10617
2003-12-28 04:03:49 +00:00
Chris Lattner
099e1f16b8
rename ClassifyExpression -> ClassifyExpr
...
llvm-svn: 10592
2003-12-23 08:04:08 +00:00
Chris Lattner
5780f54596
Finegrainify namespacification
...
llvm-svn: 10588
2003-12-23 06:44:41 +00:00
Chris Lattner
b0c30fd90f
finegrainify namespacification
...
Implement indvar analysis of getelementptr and sub expressions
llvm-svn: 10582
2003-12-22 05:26:29 +00:00
Chris Lattner
457dd0b6c7
Add a new AliassetTracker::remove method. Because we need to be able to remove
...
a pointer from an AliasSet, maintain the pointer values on a doubly linked
list instead of a singly linked list, to permit efficient removal from the
middle of the list.
llvm-svn: 10506
2003-12-18 08:11:56 +00:00
Alkis Evlogimenos
29127b8825
Change interface of MachineOperand as follows:
...
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
b) add isUse(), isDef()
c) rename opHiBits32() to isHiBits32(),
opLoBits32() to isLoBits32(),
opHiBits64() to isHiBits64(),
opLoBits64() to isLoBits64().
This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.
llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Chris Lattner
a9d238d598
Finegrainify namespacification
...
Add capability to represent volatile AliasSet's
Propagate this information from loads&stores into the aliassets
llvm-svn: 10457
2003-12-14 04:52:11 +00:00
Chris Lattner
f9c24d19cf
Factor out some duplicated code, implement the rest of the cases in
...
BasicAA/2003-12-11-ConstExprGEP.ll
llvm-svn: 10412
2003-12-11 23:20:16 +00:00
Chris Lattner
2185bd56cc
Fix PR86. This makes basicaa _SIGNIFICANLY_ more aggressive with getelementptr's
...
llvm-svn: 10410
2003-12-11 22:44:13 +00:00
Chris Lattner
89c05af2e2
Finegrainify namespacification
...
Add new -print-cfg-only pass
llvm-svn: 10407
2003-12-11 21:48:18 +00:00
Chris Lattner
a1ddf56288
Fix a glaring bug
...
llvm-svn: 10400
2003-12-11 06:06:28 +00:00
Chris Lattner
3245f523d9
Realize the gep P, <zeros> must aliases P.
...
This is a partial fix for PR 86
llvm-svn: 10399
2003-12-11 06:02:00 +00:00
Chris Lattner
99253d6580
With Brian's change to AA.h we can now clean out this uglyness
...
llvm-svn: 10398
2003-12-11 05:44:59 +00:00
Brian Gaeke
9b3f9806a2
IncludeFile hack to pull in BasicValueNumbering whenever ValueNumbering.h
...
is included.
llvm-svn: 10397
2003-12-11 05:05:56 +00:00
Chris Lattner
035bd2ae32
Finegrainify namespacification
...
llvm-svn: 10367
2003-12-10 15:34:03 +00:00
Chris Lattner
090dd39b2c
Finegrainify namespacification
...
Provide a context module to WriteAsOperand
llvm-svn: 10366
2003-12-10 15:33:59 +00:00
Chris Lattner
5f0dc73b86
Finegrainify namespacification
...
Move method out of generic dominators construction code
llvm-svn: 10299
2003-12-07 00:35:42 +00:00
Chris Lattner
e8a612e92d
Do not depend on index type to determine whether it is a structure or sequential index
...
llvm-svn: 10221
2003-11-25 20:19:55 +00:00
Chris Lattner
96656a16ad
Fix file header
...
llvm-svn: 10219
2003-11-25 20:11:47 +00:00
Chris Lattner
2cc98be419
Remove dead variable
...
llvm-svn: 10218
2003-11-25 20:11:00 +00:00
Chris Lattner
259524df92
Use gep_type_begin/end instead of looking for ubytes
...
llvm-svn: 10217
2003-11-25 20:10:07 +00:00
Chris Lattner
8b644ddc5b
Finegrainify namespacification
...
llvm-svn: 10210
2003-11-25 18:33:40 +00:00
Chris Lattner
7485243e7a
Implement a small optimization to handling of GEP's that are equivalent to casts.
...
This results in substantially reduced collapsing for some testcases
llvm-svn: 10002
2003-11-14 17:09:46 +00:00
Chris Lattner
ca8f3561c2
Trying to get the dsgraph for an external function is bad for DSA's health
...
llvm-svn: 9979
2003-11-13 18:48:11 +00:00
Chris Lattner
88bf4d25a0
Implement the CompleteBU pass
...
llvm-svn: 9964
2003-11-13 05:05:41 +00:00
Chris Lattner
547205d4bc
Minor code cleanup
...
llvm-svn: 9962
2003-11-13 05:04:19 +00:00
Chris Lattner
8508dec429
Disable integer tracking by default
...
llvm-svn: 9960
2003-11-13 03:10:49 +00:00
Chris Lattner
55ad096ff8
Add an initial version of the CompleteBUDataStructures class, which is currently
...
identical to the BU pass, but has an accurate call graph
llvm-svn: 9956
2003-11-13 01:43:00 +00:00
Chris Lattner
b60823472a
Fine-grainify namespaces for this library
...
llvm-svn: 9948
2003-11-12 23:11:14 +00:00
Chris Lattner
95d0b541c1
Add new argument to disable checking
...
llvm-svn: 9922
2003-11-12 17:58:22 +00:00
Chris Lattner
e73452b42d
Print return nodes for graphs with multiple functions in them correctly
...
llvm-svn: 9914
2003-11-12 04:58:19 +00:00
Chris Lattner
87ad20251a
Don't crash if no gg
...
llvm-svn: 9913
2003-11-12 04:57:58 +00:00
Chris Lattner
a08ef02e96
Cleanups
...
llvm-svn: 9907
2003-11-12 00:40:34 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
6deb20046e
Compute node offsets correctly
...
llvm-svn: 9895
2003-11-11 20:12:32 +00:00
Chris Lattner
365bda897c
Add new method for computing node mappings. This is used by the pool allocator
...
llvm-svn: 9880
2003-11-11 05:08:59 +00:00
Chris Lattner
b63e179816
More additions
...
llvm-svn: 9834
2003-11-09 19:54:30 +00:00
Chris Lattner
a3444ad7e0
Add more functions
...
llvm-svn: 9826
2003-11-09 04:10:41 +00:00
Chris Lattner
6e7ff9a44d
None of the __llvm_* functions call into the program. This makes the
...
callgraph MUCH simpler for eh using program.
llvm-svn: 9825
2003-11-09 04:00:59 +00:00
Chris Lattner
e63e580e56
Add support for memmove
...
llvm-svn: 9824
2003-11-09 03:32:52 +00:00
Chris Lattner
eb36733092
Handle bzero and memset in the local analysis, because we were missing the fact
...
that memset returns its argument!!
llvm-svn: 9811
2003-11-08 21:55:50 +00:00
Chris Lattner
28d77c2122
This doesn't use DSCallSiteIterator
...
llvm-svn: 9809
2003-11-08 21:17:37 +00:00
Chris Lattner
b5a2959ef2
Fix name collision
...
llvm-svn: 9722
2003-11-05 05:55:45 +00:00
Chris Lattner
a71b07eeca
All DSGraphs keep a reference to the targetdata they are created with. This is
...
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.
llvm-svn: 9659
2003-11-02 22:27:28 +00:00
Chris Lattner
63fb5bcaac
Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll
...
llvm-svn: 9658
2003-11-02 21:02:20 +00:00
Chris Lattner
29f03b2d39
Including the symbol table in the FindUsedTypes analysis was the WRONG way
...
to fix test/Regression/CBackend/2003-10-23-UnusedType.ll. This completely
neutered the deadtypeelim pass.
llvm-svn: 9646
2003-11-02 01:28:41 +00:00
Chris Lattner
9c85e0b72c
Make the call graph more precise despite the hated constantpointerrefs.
...
Do you detect the animosity I feel towards CPRs yet?
llvm-svn: 9640
2003-10-31 21:05:12 +00:00
Chris Lattner
586db4056a
When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
...
llvm-svn: 9611
2003-10-30 05:17:30 +00:00
Chris Lattner
305fcb1536
Fix PR62, and llvm/test/Regression/CBackend/2003-10-28-CastToPtrToStruct.ll
...
ConstantExpr's can use unrelated types, make sure to scan them.
llvm-svn: 9569
2003-10-28 23:09:45 +00:00
Chris Lattner
28732137bc
Fix bug: CBackend/2003-10-23-UnusedType.ll and hopefully 252.eon
...
llvm-svn: 9441
2003-10-23 19:30:30 +00:00
Chris Lattner
307255971c
This is a disgusting hack that improves code substantially, by making
...
callgraphSCC passes more effective.
llvm-svn: 9384
2003-10-22 18:53:31 +00:00
Chris Lattner
ce023da56a
Do not add unreachable code to a natural loop!
...
llvm-svn: 9377
2003-10-22 16:41:21 +00:00
Chris Lattner
43276ffbf4
Make sure to print labels on nodes without names
...
llvm-svn: 9376
2003-10-22 16:30:58 +00:00
Chris Lattner
dd7d5d8172
If the basic block has no name, make sure to print the % number of it
...
llvm-svn: 9375
2003-10-22 16:22:42 +00:00
Chris Lattner
8476f4bb56
Implement the Function::viewCFG* methods, for use in a debugger. Also, the
...
-print-cfg pass now lives here.
llvm-svn: 9374
2003-10-22 16:03:49 +00:00