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
John Criswell
de34542f41
Added LLVM copyright header.
...
llvm-svn: 9321
2003-10-21 15:17:13 +00:00
John Criswell
71d2894956
Added LLVM copyright notice to Makefiles.
...
llvm-svn: 9312
2003-10-20 22:26:57 +00:00
Chris Lattner
489483fe88
Convert this code from using annotations to using a local map
...
llvm-svn: 9310
2003-10-20 20:52:23 +00:00
Chris Lattner
e06b3121c8
Remove using declaration
...
llvm-svn: 9307
2003-10-20 20:38:17 +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
97f3f7e819
Make use of "external" depth-first iterators to avoid revisiting nodes
...
multiple times. This reduces the time to construct post-dominance sets a LOT.
For example, optimizing perlbmk goes from taking 12.9894s to 1.4074s.
llvm-svn: 9091
2003-10-13 16:36:06 +00:00
Chris Lattner
b6c8569f05
Regularize header file comments
...
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
be9a1813c6
Make getNumBackEdges more efficient
...
llvm-svn: 9063
2003-10-12 22:14:27 +00:00
Alkis Evlogimenos
e6fdc87045
Use std::string::size_type for for ColonPos to stop gcc from giving a warning
...
llvm-svn: 8811
2003-10-01 22:49:22 +00:00
Chris Lattner
471405e2ba
DOn't crash if program calls the null pointer
...
llvm-svn: 8708
2003-09-24 23:42:58 +00:00
Chris Lattner
36559daef0
Remove explicit use of BasicBlock::succ_iterator
...
llvm-svn: 8706
2003-09-24 22:18:35 +00:00
Chris Lattner
883cc51630
Functions reachable from the arguments of unresolvable call nodes should
...
not have their arguments marked complete
llvm-svn: 8639
2003-09-20 23:58:33 +00:00
Chris Lattner
681a690f26
The Globals graph must become complete at the end of the BU phase!
...
llvm-svn: 8638
2003-09-20 23:27:05 +00:00
Chris Lattner
a85a2f8d86
Do not mark incoming arguments to functions complete if the function is pointed to by a global in the globals graph
...
llvm-svn: 8637
2003-09-20 22:24:04 +00:00
Chris Lattner
c2e75f110a
Make sure to add global variable initializers to the Globals graph!
...
llvm-svn: 8636
2003-09-20 21:48:16 +00:00
Chris Lattner
a721b89e37
Don't consider incomplete nodes to be typesafe!
...
llvm-svn: 8635
2003-09-20 21:48:01 +00:00