Chris Lattner
97c9f20c52
simplify AnalysisGroup registration, eliminating one typeid call.
...
llvm-svn: 29932
2006-08-28 00:42:29 +00:00
Chris Lattner
c2d3d3112e
eliminate RegisterOpt. It does the same thing as RegisterPass.
...
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Chris Lattner
3c9b2420df
Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
...
llvm-svn: 29921
2006-08-27 22:30:17 +00:00
Chris Lattner
5de3b8b262
Change the callgraph representation to store the callsite along with the
...
target CG node. This allows the inliner to properly update the callgraph
when using the pruning inliner. The pruning inliner may not copy over all
call sites from a callee to a caller, so the edges corresponding to those
call sites should not be copied over either.
This fixes PR827 and Transforms/Inline/2006-07-12-InlinePruneCGUpdate.ll
llvm-svn: 29120
2006-07-12 18:29:36 +00:00
Jim Laskey
f7300b2706
It was pointed out that DEBUG() is only available with -debug.
...
llvm-svn: 29106
2006-07-11 18:25:13 +00:00
Jim Laskey
c3d341ea98
Ensure that dump calls that are associated with asserts are removed from
...
non-debug build.
llvm-svn: 29105
2006-07-11 17:58:07 +00:00
Reid Spencer
be535661cc
For PR780:
...
1. Fix the macros in IncludeFile.h to put everything in the llvm namespace
2. Replace the previous explicit mechanism in all the .h and .cpp files
with the macros in IncludeFile.h
This gets us a consistent mechanism throughout LLVM for ensuring linkage.
Next step is to make sure its used in enough places.
llvm-svn: 28715
2006-06-07 22:00:26 +00:00
Chris Lattner
20a4da4dfd
Fix -pedantic warning
...
llvm-svn: 28634
2006-06-01 17:17:46 +00:00
Reid Spencer
5861659a1e
Change from using a stub function to a stub variable for passing to the
...
IncludeFile hack to ensure linkage of analysis passes. This works around
some -pedantic warnings about assigning an object to a function.
llvm-svn: 28621
2006-06-01 07:02:51 +00:00
Andrew Lenharth
c3cff44880
move calltarget to dsa
...
llvm-svn: 28546
2006-05-29 23:39:48 +00:00
Andrew Lenharth
e465381401
Since there was interest on the mailing list, this is a utility pass that
...
uses DSA to make find targets of calls. It provides a very convinient
interface to DSA results to do things with indirect calls, such as
write a devirtualizer (which I have and may commit one of these days).
llvm-svn: 28545
2006-05-29 22:58:38 +00:00
Chris Lattner
aa2372562e
Patches to make the LLVM sources more -pedantic clean. Patch provided
...
by Anton Korobeynikov! This is a step towards closing PR786.
llvm-svn: 28447
2006-05-24 17:04:05 +00:00
Chris Lattner
bce2626d8a
updates for recent changes
...
llvm-svn: 26481
2006-03-03 01:21:36 +00:00
Chris Lattner
6806c02380
Add explicit iostream #includes
...
llvm-svn: 25513
2006-01-22 23:19:18 +00:00
Chris Lattner
00ca8d2de8
Add a new CallGraph::getOrInsertFunction for clients to use when updating
...
the callgraph.
llvm-svn: 25317
2006-01-14 20:03:00 +00:00
Chris Lattner
bc351e171f
add a dump method to CallGraph
...
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Reid Spencer
cfc60f3484
Remove unused inclusion of SymbolTable.h
...
llvm-svn: 25170
2006-01-10 03:48:34 +00:00
Chris Lattner
be19877731
Separate the call graph implementation from its interface. This implements
...
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt ,
allowing new spiffy implementations of the callgraph interface to be built.
Many thanks to Saem Ghani for contributing this!
llvm-svn: 24944
2005-12-22 06:07:52 +00:00
Chris Lattner
90b0c99066
Remove this pass, it is not useful
...
llvm-svn: 23949
2005-10-24 02:35:43 +00:00
Chris Lattner
bde3845548
DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now
...
llvm-svn: 23940
2005-10-24 02:26:13 +00:00
Chris Lattner
8c087e962c
Only build .a file versions of these libraries, instead of .a and .o versions.
...
This should speed up build times.
llvm-svn: 23933
2005-10-24 01:59:48 +00:00
Chris Lattner
b45e57c2dd
move this to the analyze tool
...
llvm-svn: 23918
2005-10-24 00:27:36 +00:00
Andrew Lenharth
9144ec4764
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner
e25cfaee55
Malloc/Free have mod/ref effects. Do not allow CSE of function calls that
...
call malloc/free. This fixes PR555.
llvm-svn: 21443
2005-04-22 05:36:59 +00:00
Misha Brukman
774511633d
Convert tabs to spaces
...
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman
01808caded
Remove trailing whitespace
...
llvm-svn: 21416
2005-04-21 21:13:18 +00:00
Chris Lattner
7e0a534cba
do not crash when using -debug
...
llvm-svn: 21092
2005-04-05 01:12:03 +00:00
Chris Lattner
b919b21777
do not dereference an extra layer of pointers to determine if an external
...
call can modify a memory location. This fixes
test/Regression/Analysis/Andersens/modreftest.ll
llvm-svn: 21088
2005-04-04 22:23:21 +00:00
Chris Lattner
af4d93cd39
import all of the rest of the stubs that dsa uses for direct comparison
...
llvm-svn: 20932
2005-03-29 20:36:05 +00:00
Chris Lattner
4dba2ee974
learn about some more functions.
...
llvm-svn: 20929
2005-03-29 20:04:24 +00:00
Chris Lattner
ca85130b0a
Fix a major problem with global variable initializers. This could cause
...
us to have stuff pointing to the null pointer, which makes no sense
(the null ptr is an ssa value, not the null object)
llvm-svn: 20922
2005-03-29 17:21:53 +00:00
Chris Lattner
dd94b2d01e
add some more functions, ignore setcc for constraints!
...
llvm-svn: 20917
2005-03-29 06:52:20 +00:00
Chris Lattner
7617e886c1
Handle "known" external calls context sensitively, add support for realloc
...
and a couple of other functions that are important.
Handle aggregate undef values for gv initializers
llvm-svn: 20914
2005-03-29 06:09:07 +00:00
Chris Lattner
81b6d86a3a
Teach andersens that non-escaping memory cannot be mod/ref'd by external fn calls.
...
llvm-svn: 20891
2005-03-28 06:21:17 +00:00
Misha Brukman
009585d2ac
Fix grammar
...
llvm-svn: 20890
2005-03-28 04:32:12 +00:00
Chris Lattner
a8ad8b2826
Make anders-aa much more precise by not being completely pessimistic about
...
external functions. Teach it about a few important ones.
llvm-svn: 20889
2005-03-28 04:03:52 +00:00
Chris Lattner
147f8b789c
wrap some long lines
...
llvm-svn: 20884
2005-03-27 22:03:46 +00:00
Chris Lattner
ea69f1f9e8
teach andersens about undef
...
llvm-svn: 20881
2005-03-27 18:58:23 +00:00
Chris Lattner
aff85ac552
Simplify dead code into a fixme :)
...
llvm-svn: 20800
2005-03-24 02:41:19 +00:00
Chris Lattner
85a1d92323
fix a compiler crash in runtime/libprofile
...
llvm-svn: 20799
2005-03-24 01:22:52 +00:00
Chris Lattner
6a3f5fd623
wrap a long line
...
llvm-svn: 20797
2005-03-23 23:51:12 +00:00
Chris Lattner
2a7358064e
If we are calling an external function, chain to another AA to potentially
...
decide, don't just immediately give up.
This implements GlobalsModRef/chaining-analysis.ll
llvm-svn: 20796
2005-03-23 23:49:47 +00:00
Chris Lattner
531f9e92d4
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
Jeff Cohen
cede1ce95a
Add even more missing createXxxPass functions.
...
llvm-svn: 19402
2005-01-08 22:01:16 +00:00
Chris Lattner
a12b5df616
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
71d04bce55
Adjust to new alias analysis interfaces
...
llvm-svn: 18957
2004-12-15 07:22:13 +00:00
Reid Spencer
5c132bc3af
For PR387:\
...
Add getModRefInfo method to avoid overloaded virtuals
llvm-svn: 18601
2004-12-07 08:11:24 +00:00
Reid Spencer
9083936835
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
1b4e78d9e6
Mission accomplished!
...
llvm-svn: 17990
2004-11-19 16:22:24 +00:00
Alkis Evlogimenos
6bbc57ec12
Fix library name.
...
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
c1c320c335
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
6a11a75f31
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
2978437b76
Add support
...
llvm-svn: 17052
2004-10-16 18:16:19 +00:00
Reid Spencer
ace94df71f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
e2d1af8be0
Build both archive and relinked objects
...
llvm-svn: 16892
2004-10-10 22:17:39 +00:00
Reid Spencer
b84cbf2725
Initial version of automake Makefile.am file.
...
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Chris Lattner
4f2cf030e8
'Pass' should now not be derived from by clients. Instead, they should derive
...
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
135419193e
Finegrainify namespacification
...
'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass. Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.
llvm-svn: 16434
2004-09-20 04:44:31 +00:00
Chris Lattner
d6d99dfa3f
Fix a nasty iterator invalidation problem I introduced yesterday. This
...
unfortunately is the cause of a bunch of failures from tonight, and the
reason the tester is running so slow :(
llvm-svn: 16407
2004-09-19 19:01:06 +00:00
Chris Lattner
824a21868b
Add CallGraphNode::removeAnyCallEdgeTo method
...
llvm-svn: 16398
2004-09-18 21:34:34 +00:00
Chris Lattner
85d5ccc006
When changing a function, make sure to update the CallGraphNode for the
...
function, not just the CallGraph.
llvm-svn: 16388
2004-09-18 00:27:20 +00:00
Chris Lattner
e81c2aa42a
Implement new changeFunction method, nuke a never implemented one.
...
llvm-svn: 16386
2004-09-18 00:22:13 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
12324753f2
Fix a bug that caused the pass to go into infinite loops on trivial testcases.
...
This is fallout of the Bug 122 changes.
llvm-svn: 15811
2004-08-16 05:38:02 +00:00
Chris Lattner
6b54110281
Add standard print/dump methods to CallGraph classes.
...
llvm-svn: 15569
2004-08-08 03:27:49 +00:00
Misha Brukman
63b38bd2ed
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
036d2b0c4d
nuke pointless -debug output
...
llvm-svn: 15267
2004-07-27 08:03:18 +00:00
Chris Lattner
b696462260
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
3a353e84b7
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
Reid Spencer
30d69a5af9
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
3c42077c37
Fixes for PR341
...
llvm-svn: 14843
2004-07-15 02:31:46 +00:00
Reid Spencer
eb04d9bcb4
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
26dff501a4
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
135fb4be7c
Moving to lib/Analysis/DataStructure
...
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
f019e346f4
Fix header
...
llvm-svn: 14394
2004-06-25 04:24:22 +00:00
Misha Brukman
44601805a6
File requires IPA, moved to lib/Analysis/IPA
...
llvm-svn: 14330
2004-06-22 19:04:53 +00:00
Misha Brukman
c5300a4f04
File depends on MemoryDepAnalysis (DSA); moved to lib/Analysis/DataStructure
...
llvm-svn: 14327
2004-06-22 18:28:37 +00:00
Misha Brukman
df6339bee7
Files depend on DSA, moved to lib/Analysis/DataStructure
...
llvm-svn: 14326
2004-06-22 18:13:24 +00:00
Chris Lattner
2738b7ea61
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
75019ba397
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
49cdc6b564
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
fc7509b7d4
Fix warnings about reaching end of non-void function
...
llvm-svn: 13852
2004-05-27 20:57:01 +00:00
Chris Lattner
5758134505
Add a simple implementation of Andersen's interprocedural pointer analysis
...
llvm-svn: 13666
2004-05-23 21:00:47 +00:00
Chris Lattner
17fcb67a20
Fine grainify namespacification
...
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Chris Lattner
6942946132
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
929291aabb
Plug a minor memory leak
...
llvm-svn: 13317
2004-05-02 07:31:34 +00:00
Misha Brukman
7e66438579
Send text and numbers directly to CachedWriter's contained ostream.
...
llvm-svn: 13243
2004-04-28 18:52:43 +00:00
Chris Lattner
2d3a7a6ff0
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
Chris Lattner
99504890b7
Pass the callgraph not the module
...
llvm-svn: 13087
2004-04-20 21:52:26 +00:00
Chris Lattner
8d0838130c
Add the ability for SCC passes to initialize and finalize themselves
...
llvm-svn: 13084
2004-04-20 21:30:06 +00:00
Chris Lattner
8b6db18ac3
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
Misha Brukman
96d3b0a6de
Make code more readable.
...
llvm-svn: 12305
2004-03-12 00:58:41 +00:00
Chris Lattner
06834e6d7b
getNodes() is gone
...
llvm-svn: 11166
2004-02-07 23:57:26 +00:00
Chris Lattner
a9450bd4ac
Cleanups
...
llvm-svn: 9907
2003-11-12 00:40:34 +00:00
Brian Gaeke
960707c335
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
9a010038f1
More additions
...
llvm-svn: 9834
2003-11-09 19:54:30 +00:00
Chris Lattner
950c75f135
Add more functions
...
llvm-svn: 9826
2003-11-09 04:10:41 +00:00
Chris Lattner
5011b956a9
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
5f6463c041
Fix name collision
...
llvm-svn: 9722
2003-11-05 05:55:45 +00:00
Chris Lattner
7949bf0d54
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