1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

210 Commits

Author SHA1 Message Date
Andrew Lenharth
a9214fec08 core changes for varargs
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner
c638ca05a0 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
a9a1982a44 Convert tabs to spaces
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman
122d682689 Remove trailing whitespace
llvm-svn: 21416
2005-04-21 21:13:18 +00:00
Chris Lattner
c5b8fbe7f9 do not crash when using -debug
llvm-svn: 21092
2005-04-05 01:12:03 +00:00
Chris Lattner
57ea4daa2e 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
761bb09edb 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
94ea4d104c learn about some more functions.
llvm-svn: 20929
2005-03-29 20:04:24 +00:00
Chris Lattner
5ceaf630ab 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
4f9c2cde55 add some more functions, ignore setcc for constraints!
llvm-svn: 20917
2005-03-29 06:52:20 +00:00
Chris Lattner
813ef90a12 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
47fcba56f8 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
b97b449309 Fix grammar
llvm-svn: 20890
2005-03-28 04:32:12 +00:00
Chris Lattner
abb512a593 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
691b1987e1 wrap some long lines
llvm-svn: 20884
2005-03-27 22:03:46 +00:00
Chris Lattner
7f0903e187 teach andersens about undef
llvm-svn: 20881
2005-03-27 18:58:23 +00:00
Chris Lattner
1a860712dc Simplify dead code into a fixme :)
llvm-svn: 20800
2005-03-24 02:41:19 +00:00
Chris Lattner
1dfea3e0f7 fix a compiler crash in runtime/libprofile
llvm-svn: 20799
2005-03-24 01:22:52 +00:00
Chris Lattner
be7663e15e wrap a long line
llvm-svn: 20797
2005-03-23 23:51:12 +00:00
Chris Lattner
78ee200153 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
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
Jeff Cohen
6c0db8d863 Add even more missing createXxxPass functions.
llvm-svn: 19402
2005-01-08 22:01:16 +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
8139749984 Adjust to new alias analysis interfaces
llvm-svn: 18957
2004-12-15 07:22:13 +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
598ab60438 Mission accomplished!
llvm-svn: 17990
2004-11-19 16:22:24 +00:00
Alkis Evlogimenos
1162280a0d Fix library name.
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
e48ba34fd4 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
ce514b1c2c Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Chris Lattner
cbdf19fed2 Add support
llvm-svn: 17052
2004-10-16 18:16:19 +00:00
Reid Spencer
e6418ec30f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
bc135b067a Build both archive and relinked objects
llvm-svn: 16892
2004-10-10 22:17:39 +00:00
Reid Spencer
7d9cba7a0f Initial version of automake Makefile.am file.
llvm-svn: 16885
2004-10-10 20:43:57 +00:00
Chris Lattner
43c0372c0b '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
01bbefa96c 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
e6755fe307 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
110bbafcf7 Add CallGraphNode::removeAnyCallEdgeTo method
llvm-svn: 16398
2004-09-18 21:34:34 +00:00
Chris Lattner
53dea1ce37 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
a9b80a3258 Implement new changeFunction method, nuke a never implemented one.
llvm-svn: 16386
2004-09-18 00:22:13 +00:00
Reid Spencer
c4abcbefb1 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
818ac2d5e2 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
0b9b58e550 Add standard print/dump methods to CallGraph classes.
llvm-svn: 15569
2004-08-08 03:27:49 +00:00
Misha Brukman
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
81f96c5a79 nuke pointless -debug output
llvm-svn: 15267
2004-07-27 08:03:18 +00:00
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
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
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
bb7fe18493 Fixes for PR341
llvm-svn: 14843
2004-07-15 02:31:46 +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
a77dd6edec Moving to lib/Analysis/DataStructure
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
d6e23a5104 Fix header
llvm-svn: 14394
2004-06-25 04:24:22 +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
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
Chris Lattner
fa5d566d95 Add a simple implementation of Andersen's interprocedural pointer analysis
llvm-svn: 13666
2004-05-23 21:00:47 +00:00
Chris Lattner
7c723ecb57 Fine grainify namespacification
llvm-svn: 13436
2004-05-09 06:22:29 +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
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
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
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
Misha Brukman
da119ce857 Make code more readable.
llvm-svn: 12305
2004-03-12 00:58:41 +00:00
Chris Lattner
ed36ca5f13 getNodes() is gone
llvm-svn: 11166
2004-02-07 23:57:26 +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
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
b5a2959ef2 Fix name collision
llvm-svn: 9722
2003-11-05 05:55:45 +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
John Criswell
71d2894956 Added LLVM copyright notice to Makefiles.
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
87843f87b8 Change the Opcode enum for PHI nodes from "Instruction::PHINode" to "Instruction::PHI" to be more consistent with the other instructions.
llvm-svn: 9269
2003-10-19 21:34:28 +00:00
Chris Lattner
b6c8569f05 Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
b12a8a6177 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Chris Lattner
98d4e5dffc These two conditions are not exclusive!!
llvm-svn: 8518
2003-09-15 04:35:16 +00:00
Chris Lattner
f3c318737f Make the print output more useful
llvm-svn: 8517
2003-09-15 04:29:37 +00:00
Misha Brukman
b9a4ddbfc5 Fixed spelling and grammar.
llvm-svn: 8478
2003-09-11 18:14:24 +00:00
Chris Lattner
0620f3d2fa Replace M with F when refering to functions
llvm-svn: 8274
2003-08-31 20:36:52 +00:00
Chris Lattner
f72da72785 Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!

llvm-svn: 8273
2003-08-31 20:01:57 +00:00
Chris Lattner
1b262a5395 Remove dead var
llvm-svn: 8270
2003-08-31 19:54:57 +00:00
Chris Lattner
acd5eb1663 The SCC::HasLoop method is now in the main iterator
llvm-svn: 8269
2003-08-31 19:51:38 +00:00
Chris Lattner
05498bc768 Remove explicit passing of SCC's around as objects.
llvm-svn: 8267
2003-08-31 19:46:48 +00:00
Chris Lattner
8314d710a6 Move the getAnalysisUsage method from the header file
llvm-svn: 8264
2003-08-31 19:40:57 +00:00
Chris Lattner
87aba3e3d5 The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
llvm-svn: 8262
2003-08-31 19:35:16 +00:00
Chris Lattner
9e2279bd9d Minor cleanups
Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL

llvm-svn: 8260
2003-08-31 19:29:52 +00:00
Chris Lattner
0fd60ef271 Initial checkin of the CallGraphSCCPass class
llvm-svn: 8247
2003-08-31 01:54:59 +00:00