Andrew Lenharth
b3dae7cfa9
no heap is happening here
...
llvm-svn: 26781
2006-03-15 19:03:16 +00:00
Andrew Lenharth
c0b65305f1
remove qsort for now
...
llvm-svn: 26779
2006-03-15 18:32:18 +00:00
Andrew Lenharth
fb4df2055f
allow field sensitivity to be a tunable parameter
...
llvm-svn: 26777
2006-03-15 05:43:41 +00:00
Andrew Lenharth
3196422df0
Handle one offset with growth case seen in povray. Namely, if we have an offset,
...
and the offset lands at a field boundary in the old type, construct a new type,
copying the fields masked by the offset from the old type, and unify with that.
llvm-svn: 26775
2006-03-15 04:04:21 +00:00
Andrew Lenharth
c254e5b180
improve mem intrinsics and add a few things povray uses
...
llvm-svn: 26774
2006-03-15 03:43:59 +00:00
Nate Begeman
d5811b965d
Fix PR681 by using the standard Lengauer and Tarjan algorithm for dominator
...
set construction, rather than intersecting various std::sets. This reduces
the memory usage for the testcase in PR681 from 496 to 26MB of ram on my
darwin system, and reduces the runtime from 32.8 to 0.8 seconds on a
2.5GHz G5. This also enables future code sharing between Dom and PostDom
now that they share near-identical implementations.
llvm-svn: 26707
2006-03-11 02:20:46 +00:00
Chris Lattner
bb40a9fa58
Use autogenerated mod/ref info for intrinsics.
...
llvm-svn: 26670
2006-03-09 22:31:29 +00:00
Chris Lattner
3e19c23765
Fix a crash compiling Obsequi
...
llvm-svn: 26529
2006-03-04 21:48:01 +00:00
Chris Lattner
071faf25e0
Be more conservative with our symbolic alias analysis. In particular,
...
don't assume that A[1][0] and A[0][i] can't alias. "i" might be out of
range, or even negative. This fixes a miscompilation of 188.ammp (which
does bad pointer tricks) with the new CFE.
Testcase here: Analysis/BasicAA/2006-03-03-BadArraySubscript.ll
llvm-svn: 26515
2006-03-04 02:06:34 +00:00
Chris Lattner
bce2626d8a
updates for recent changes
...
llvm-svn: 26481
2006-03-03 01:21:36 +00:00
Chris Lattner
093c159efb
Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
...
PR709, and paving the way for future progress.
llvm-svn: 26476
2006-03-03 00:00:25 +00:00
Chris Lattner
94f936d8ef
add an assert
...
llvm-svn: 26178
2006-02-14 20:14:17 +00:00
Chris Lattner
a6da69cab0
Pull the InsertCastOfTo out of the header, implement CSE'ing of arguments.
...
llvm-svn: 25973
2006-02-04 09:51:53 +00:00
Chris Lattner
b6a1865bca
Value# select instructions, allowing -gcse to remove duplicates
...
llvm-svn: 25969
2006-02-04 09:15:29 +00:00
Chris Lattner
6806c02380
Add explicit iostream #includes
...
llvm-svn: 25513
2006-01-22 23:19:18 +00:00
Chris Lattner
469640e506
Add explicit #includes of <iostream>
...
llvm-svn: 25509
2006-01-22 22:53:01 +00:00
Reid Spencer
b4f9a6f110
For PR411:
...
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.
llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Chris Lattner
c020bcf850
Change ET-Forest to automatically recalculate its DFSnum's if too many slow
...
queries are made.
Patch by Daniel Berlin!
llvm-svn: 25323
2006-01-14 20:55:09 +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
Nate Begeman
82049eba2c
Add bswap intrinsics as documented in the Language Reference
...
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Chris Lattner
9db9f8a902
Switch loopinfo to using ETForest instead of DominatorSet to compute itself.
...
Patch by Daniel Berlin!
llvm-svn: 25199
2006-01-11 05:08:29 +00:00
Reid Spencer
cfc60f3484
Remove unused inclusion of SymbolTable.h
...
llvm-svn: 25170
2006-01-10 03:48:34 +00:00
Chris Lattner
a60738316e
Fix a problem exposed by the et-forest work. Load-vn needs these passes live
...
whenever it is live, not just when load-vn is computed initially
llvm-svn: 25146
2006-01-08 09:10:04 +00:00
Chris Lattner
6c9cbdba1a
Initial implementation of the ET-Forest data structure for dominators and
...
post-dominators. This code was written/adapted by Daniel Berlin!
llvm-svn: 25144
2006-01-08 08:22:18 +00:00
Chris Lattner
44497859f9
Make the -print-alias-sets pass work for printing out something other than
...
the default aa impl results.
llvm-svn: 25062
2006-01-03 06:05:22 +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
John Criswell
757035ead9
Prefix DSA specific options with dsa.
...
Make the dsa-alloc-list and dsa-free-list options hidden.
llvm-svn: 24864
2005-12-19 20:14:38 +00:00
John Criswell
45bb70d8f9
Added an option to specify the names of heap freeing functions.
...
llvm-svn: 24863
2005-12-19 19:54:23 +00:00
John Criswell
aa0fed0148
Added a command line option that allows the user to specify a list of
...
functions that allocate memory.
llvm-svn: 24862
2005-12-19 17:38:39 +00:00
Sumant Kowshik
a69fcbdeb8
Collapsing node if variable length struct with final field of length zero
...
llvm-svn: 24621
2005-12-06 18:04:30 +00:00
Chris Lattner
b14c41378d
post-dom-frontiers requires proper post-dominance
...
llvm-svn: 24409
2005-11-18 07:28:26 +00:00
Andrew Lenharth
5278ca3fa2
prevent cse of readcyclecounter
...
llvm-svn: 24303
2005-11-11 19:02:54 +00:00
Andrew Lenharth
01aa56397d
continued readcyclecounter support
...
llvm-svn: 24300
2005-11-11 16:47:30 +00:00
Chris Lattner
f0b77f9acc
Fix a problem that Nate noticed with LSR:
...
When inserting code for an addrec expression with a non-unit stride, be
more careful where we insert the multiply. In particular, insert the multiply
in the outermost loop we can, instead of the requested insertion point.
This allows LSR to notice the mul in the right loop, reducing it when it gets
to it. This allows it to reduce the multiply, where before it missed it.
This happens quite a bit in the test suite, for example, eliminating 2
multiplies in art, 3 in ammp, 4 in apsi, reducing from 1050 multiplies to
910 muls in galgel (!), from 877 to 859 in applu, and 36 to 30 in bzip2.
This speeds up galgel from 16.45s to 16.01s, applu from 14.21 to 13.94s and
fourinarow from 66.67s to 63.48s.
This implements Transforms/LoopStrengthReduce/nested-reduce.ll
llvm-svn: 24102
2005-10-30 06:24:33 +00:00
Chris Lattner
21193ac3c0
remove a dead file
...
llvm-svn: 24085
2005-10-29 04:43:38 +00:00
John Criswell
970af11af8
Move some constant folding functions into LLVMAnalysis since they are used
...
by Analysis and Transformation passes.
llvm-svn: 24038
2005-10-27 16:00:10 +00:00
John Criswell
fe5f33b120
Move some constant folding code shared by Analysis and Transform passes
...
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.
llvm-svn: 24036
2005-10-27 15:54:34 +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
8df7c01299
don't bother building the archive version of this library
...
llvm-svn: 23927
2005-10-24 01:08:20 +00:00
Chris Lattner
ca014adf8e
expose a ctor
...
llvm-svn: 23924
2005-10-24 01:00:45 +00:00
Chris Lattner
75d4f6fbcb
implement some prototypes
...
llvm-svn: 23920
2005-10-24 00:38:38 +00:00
Chris Lattner
b45e57c2dd
move this to the analyze tool
...
llvm-svn: 23918
2005-10-24 00:27:36 +00:00
Chris Lattner
cd002b2461
wrap a long line
...
llvm-svn: 23507
2005-09-28 22:30:58 +00:00
Chris Lattner
b35df5f5bc
Add a new getLoopLatch() method.
...
llvm-svn: 23315
2005-09-12 17:03:55 +00:00
Chris Lattner
898e50ecb3
floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
...
in mesa.
llvm-svn: 23015
2005-08-24 16:58:56 +00:00
Chris Lattner
e515416396
Fix Transforms/LoopStrengthReduce/2005-08-15-AddRecIV.ll
...
llvm-svn: 22797
2005-08-16 00:37:01 +00:00
Chris Lattner
587a75b6e0
Teach LLVM to know how many times a loop executes when constructed with
...
a < expression, e.g.: for (i = m; i < n; ++i)
llvm-svn: 22793
2005-08-15 23:33:51 +00:00
Chris Lattner
35c0e2ee33
Fix an obvious oops
...
llvm-svn: 22742
2005-08-10 00:59:40 +00:00
Chris Lattner
b310ac4a86
implement two helper methods
...
llvm-svn: 22736
2005-08-09 23:36:33 +00:00
Misha Brukman
41acd5e08d
* Unbreak optimized build (noticed by Eric van Riet Paap)
...
* Comment #endif clauses for readability
llvm-svn: 22646
2005-08-04 14:16:48 +00:00
Chris Lattner
590642eb91
add support for Graphviz when viewing CFGs
...
llvm-svn: 22620
2005-08-03 17:55:05 +00:00
Nate Begeman
2bca4d9b7b
Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
...
other passes may use it.
llvm-svn: 22557
2005-07-30 00:12:19 +00:00
Jeff Cohen
5f4ef3c5a8
Eliminate all remaining tabs and trailing spaces.
...
llvm-svn: 22523
2005-07-27 06:12:32 +00:00
Andrew Lenharth
23167c3be9
Remove glibc specific functions, and mark a couple as C99
...
llvm-svn: 22384
2005-07-11 20:35:20 +00:00
Andrew Lenharth
c51a74cc02
because on alpha:
...
# define errno (*__errno_location ())
*shakes head
llvm-svn: 22383
2005-07-11 17:41:12 +00:00
Andrew Lenharth
5488847304
the correct fix was to fix AliasAnalysis.getModRefInfo
...
llvm-svn: 22268
2005-06-20 15:25:22 +00:00
Andrew Lenharth
805d84a077
prevent GCSE from forwarding stores to loads around vaarg. This is uggly, and I am trying to fix the AliasInfo, as it should catch the problem instead.
...
llvm-svn: 22266
2005-06-20 15:02:05 +00:00
Andrew Lenharth
9144ec4764
core changes for varargs
...
llvm-svn: 22254
2005-06-18 18:34:52 +00:00
Chris Lattner
bb0bfc4702
By definition, 'tail' calls cannot access the stack frame of their caller.
...
Expose this as a simple form of mod/ref information. This implements
BasicAA/tailcall-modref.ll
llvm-svn: 21796
2005-05-08 23:58:12 +00:00
Chris Lattner
b2d3ac8349
These intrinsics do not access memory
...
llvm-svn: 21718
2005-05-06 05:21:04 +00:00
Misha Brukman
c0aac8e858
Remove extra blank line
...
llvm-svn: 21706
2005-05-05 23:43:47 +00:00
Chris Lattner
1c636f1118
Add llvm.sqrt intrinsic, patch contributed by Morten Ofstad
...
llvm-svn: 21627
2005-04-30 03:44:07 +00:00
Chris Lattner
59ecb57e4a
These functions can set errno!
...
llvm-svn: 21609
2005-04-28 21:52:31 +00:00
Chris Lattner
eb2a461acf
Make interval partition print correctly, patch contributed by
...
Vladimir Prus!
llvm-svn: 21566
2005-04-26 14:48:28 +00:00
Chris Lattner
ecac782786
Correctly handle global-argument aliases induced in main
...
llvm-svn: 21537
2005-04-25 19:16:31 +00:00
Chris Lattner
5965359d8f
Don't mess up SCC traversal when a node has null edges out of it.
...
llvm-svn: 21536
2005-04-25 19:16:17 +00:00
Chris Lattner
4bbf66b7a2
Propagate eq sets through the bu graphs to the cbu and eq graphs, fixing
...
a crash of the sfv on 188.ammp
llvm-svn: 21478
2005-04-23 21:11:05 +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
4c5c96f35f
add support for taking and resolving the address of free.
...
llvm-svn: 21396
2005-04-21 16:09:43 +00:00
Chris Lattner
6febe5ef40
Fix a crash analyzing MultiSource/Benchmarks/MallocBench/gs
...
llvm-svn: 21245
2005-04-12 03:59:27 +00:00
Chris Lattner
747eee2707
Don't make this require loopsimplify. It works BETTER with loop simplify
...
but should not require it.
llvm-svn: 21123
2005-04-06 21:45:00 +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
d2df8ca403
fix some VC compilation problems, thanks to Jeff C for pointing this out!
...
llvm-svn: 21044
2005-04-02 20:17:09 +00:00
Chris Lattner
a7913e66e1
EquivClassGraphs is now in DataStructure.h
...
llvm-svn: 21042
2005-04-02 20:08:17 +00:00
Chris Lattner
526cc17b55
use a callee_iterator typedef.
...
llvm-svn: 21038
2005-04-02 20:02:41 +00:00
Chris Lattner
990ed1d201
Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
...
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.
This speeds up the CompleteBU pass from 1.99s to .15s on povray and the
eqgraph passes from 1.5s to .16s on the same.
llvm-svn: 21031
2005-04-02 19:17:18 +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
2e1971c19d
Fix a problem where we not marking incoming arguments to functions with
...
external linkage as incomplete.
llvm-svn: 20927
2005-03-29 19:16:59 +00:00
Chris Lattner
8de8b7bf40
there is no point comparing against null pointer.
...
llvm-svn: 20925
2005-03-29 17:44:52 +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
2db10ba297
remove ...
...
llvm-svn: 20883
2005-03-27 21:57:09 +00:00
Chris Lattner
f290da862d
speed up steens by using spliceFrom, improve its precision by realizing that
...
an incomplete node cannot alias a complete node.
llvm-svn: 20882
2005-03-27 21:56:55 +00:00
Chris Lattner
ea69f1f9e8
teach andersens about undef
...
llvm-svn: 20881
2005-03-27 18:58:23 +00:00
Chris Lattner
82166467c3
Don't give up completely, maybe other AA can say something about this.
...
llvm-svn: 20873
2005-03-27 00:02:33 +00:00
Chris Lattner
3f08e7899f
Factor out percentage printing into its own function. Make two changes to
...
the function: print more precision XX.X% instead of XX%, and cast to ULL
before scaling by 100/1000 to avoid wrap around for large numbers of queries
(such as occur for 253.perlbmk and 176.gcc)
llvm-svn: 20872
2005-03-26 23:56:33 +00:00
Chris Lattner
2ba37389c9
Cache mapping information for a call site after computing it for a mod/ref
...
query. If the next mod/ref query happens to be for the same call site
(which is extremely likely), use the cache instead of recomputing the
callee/caller mapping. This makes -aa-eval ***MUCH*** faster with
ds-aa
llvm-svn: 20871
2005-03-26 23:29:03 +00:00
Chris Lattner
139f43b340
Remove more long dead code: dsa doesn't provide must alias info
...
llvm-svn: 20870
2005-03-26 22:54:46 +00:00
Chris Lattner
1a02d15dab
remove some unsafe code that has long been dead
...
llvm-svn: 20869
2005-03-26 22:48:42 +00:00
Chris Lattner
9cc932d3b3
slightly improve mod/ref for DSAA by checking the globals graph for fallback
...
llvm-svn: 20868
2005-03-26 22:47:03 +00:00
Chris Lattner
b3baff1830
Teach steens-aa two things about mod/ref information:
...
1. If memory never escapes the program, it cannot be mod/ref'd by external
functions.
2. If memory is global never mod/ref'd in the program, it cannot be mod/ref'd
by any call.
llvm-svn: 20867
2005-03-26 22:43:20 +00:00
Chris Lattner
68ee8f572c
Interchange this loop so that we test all pointers against one call site
...
before moving on to the next call site. This will be a more efficient way
to compute the mod/ref set for AA implementations like DSA.
llvm-svn: 20866
2005-03-26 22:16:44 +00:00
Chris Lattner
d21e220035
no really, don't double count these nodes either!
...
llvm-svn: 20837
2005-03-25 20:54:45 +00:00
Chris Lattner
b7ffd50537
Don't count all of the nodes in the SCC once for each function in the SCC.
...
llvm-svn: 20836
2005-03-25 20:37:32 +00:00
Chris Lattner
5ecec08ab5
Grow the EQ classes for globals at the end of the BU pass. This shrinks
...
memory usage in the TD pass for 254.gap from 31.3MB to 3.9MB.
llvm-svn: 20834
2005-03-25 16:45:43 +00:00
Chris Lattner
8d9f3735cd
Treat free operations as volatile, since they cannot be moved. This fixes
...
Transforms/LICM/2005-03-24-LICM-Aggregate-Crash.ll
llvm-svn: 20830
2005-03-25 05:49:37 +00:00
Chris Lattner
3322e28f75
remove a debugging timer.
...
llvm-svn: 20827
2005-03-25 00:06:09 +00:00
Chris Lattner
278bac843c
Two changes here:
...
1. Instead of copying Local graphs to the BU graphs to start with, use
spliceFrom to do the job (which is constant time in this case). On
176.gcc, this chops off .17s from the bu pass.
2. When building SCC graphs, simplify the logic and use spliceFrom to
do the heavy lifting, instead of cloneInto/delete. This slices
another .14s off 176.gcc.
llvm-svn: 20826
2005-03-25 00:05:04 +00:00
Chris Lattner
a396eb8ae9
Make the spliceFrom case where one graph is completely empty be constant time.
...
llvm-svn: 20825
2005-03-25 00:02:41 +00:00
Chris Lattner
127dd12427
add a new DSGraph::spliceFrom method, which violently takes the content of
...
one graph and plops it into another, without breaking a sweat.
llvm-svn: 20824
2005-03-24 23:46:04 +00:00
Chris Lattner
301764e28c
This replaces the correct but slow code with a more aggressive scc-finder
...
based approach to find globals and call sites that need to be copied. This
speeds up the BU pass on 176.gcc from 22s back up to 2.3s. Not as good
as 1.5s, but at least it's correct :)
llvm-svn: 20820
2005-03-24 23:06:02 +00:00
Chris Lattner
1b5b559011
only look at successors of globals. This gets us down to "only" 22s in the
...
bu pass for 176.gcc
llvm-svn: 20818
2005-03-24 21:17:27 +00:00
Chris Lattner
189d7bb9ee
Unfortunately, a previous patch was not safe. Revert it, reimplement
...
something correct. Unfortunately this takes 176.gcc's BU phase back
up to 29s from 1.5. This fixes DSGraph/2005-03-24-Global-Arg-Alias.ll
llvm-svn: 20817
2005-03-24 21:07:47 +00:00
Chris Lattner
923d925953
don't bother |'ing in 0's
...
llvm-svn: 20815
2005-03-24 18:42:51 +00:00
Chris Lattner
ba6006d84b
be more aggressive about incompleteness marking
...
llvm-svn: 20814
2005-03-24 18:42:28 +00:00
Chris Lattner
19d7f2883d
Fix a crash while promoting a value out of a loop from a global variable
...
when using ds-aa
llvm-svn: 20802
2005-03-24 04:22:04 +00:00
Chris Lattner
f0d919ece9
teach ds-aa about mod/ref for external function calls.
...
llvm-svn: 20801
2005-03-24 03:04:50 +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
8424b0f82e
Make this more efficient by only making one virtual method call.
...
llvm-svn: 20793
2005-03-23 23:26:58 +00:00
Chris Lattner
07eac1e698
Make this a bit more aggressive
...
llvm-svn: 20792
2005-03-23 22:06:41 +00:00
Chris Lattner
9f9da538d6
a hack to allow count-aa to work with ds-aa :(
...
llvm-svn: 20791
2005-03-23 21:59:34 +00:00
Chris Lattner
ccb6faad7e
Add two options to allow -count-aa to print queries either (1) all queries,
...
or (2) only queries that are not successful (e.g. return may alias)
llvm-svn: 20790
2005-03-23 21:59:07 +00:00
Chris Lattner
61130216ec
turn a dead conditional into an assert.
...
llvm-svn: 20787
2005-03-23 20:12:08 +00:00
Chris Lattner
01f0879c48
Totally gut mergeInGraph. There is absolutely no reason to be merging
...
global roots in from callees to callers. The BU graphs do not have accurate
globals information and all of the clients know it. Instead, just make sure
the GG is up-to-date, and they will be perfectly satiated.
This speeds up the BU pass on 176.gcc from 5.5s to 1.5s, and Loc+BU+TD
from 7s to 2.7s.
llvm-svn: 20786
2005-03-23 20:08:59 +00:00
Chris Lattner
048ae36b93
wrap a long line
...
llvm-svn: 20785
2005-03-23 16:43:11 +00:00
Chris Lattner
e36d77b726
Make -steens-aa more conservative (aka correct) by making sure to obey
...
incompleteness flags.
Make it more aggressive by taking field sensitive information into
account.
llvm-svn: 20781
2005-03-23 01:48:09 +00:00
Chris Lattner
7d3df410ab
implement Analysis/DSGraph/field-sensitive.ll
...
llvm-svn: 20779
2005-03-23 01:47:19 +00:00
Chris Lattner
310d1a3882
Several changes here:
...
1. Increase max node size from 64->256 to avoid collapsing an important
structure in 181.mcf
2. If we have multiple calls to an indirect call node with an indirect
callee, fold these call nodes together, to avoid DSA turning apoc into
a flaming fireball of death when analyzing 176.gcc.
With this change, 176.gcc now takes ~7s to analyze for loc+bu+td, with
5.7s of that in the BU pass.
llvm-svn: 20775
2005-03-22 23:54:52 +00:00
Chris Lattner
ca174306f0
Mark external globals incomplete in the BU Globals graph, fixing
...
Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll
llvm-svn: 20773
2005-03-22 22:10:22 +00:00
Chris Lattner
f00684079a
Directly count the number of memory instructions.
...
llvm-svn: 20766
2005-03-22 03:55:10 +00:00
Chris Lattner
495f00946e
Remove an iteration pass over the entire scalarmap for each function created
...
by not allowing integer constants to get into the scalar map in the first
place.
llvm-svn: 20764
2005-03-22 02:45:13 +00:00
Chris Lattner
250726ec25
When making a clone of a DSGraph from the BU pass, make sure to remember that
...
this clone is supposed to be used for *ALL* of the functions in the SCC.
This fixes the memory explosion problem the TD pass was having, reducing the
memory growth from 24MB -> 3.5MB on povray and 270MB ->8.3MB on perlbmk!
This obviously also speeds up the TD pass *a lot*.
llvm-svn: 20763
2005-03-22 01:50:42 +00:00
Chris Lattner
e05c633099
Don't use operator[], use the new method instead, which is faster. This speeds
...
up the TD pass about 30% for povray and perlbmk. It's still not clear why
copying a 5MB set of graphs turns into a 25MB set of graphs though :(
llvm-svn: 20762
2005-03-22 01:42:59 +00:00
Chris Lattner
fcae88f280
Now that the dead ctor is gone, nothing uses the old node mapping exported by
...
cloneInto: make it an internally used mapping.
llvm-svn: 20760
2005-03-22 00:36:51 +00:00
Chris Lattner
8016c975c9
remove a dead ctor
...
llvm-svn: 20759
2005-03-22 00:33:35 +00:00
Chris Lattner
ea2c02bcca
now that the second argument is always this->ReturnNodes, don't bother passing it.
...
llvm-svn: 20758
2005-03-22 00:29:44 +00:00
Chris Lattner
571578143c
instead of using a local RetValMap, just use the graph we are cloning into
...
for the return node map.
llvm-svn: 20757
2005-03-22 00:25:52 +00:00
Chris Lattner
d05ab9cab4
now that the valuemapping is always the local scalar map, we can eliminate
...
this identity merge.
llvm-svn: 20755
2005-03-22 00:22:45 +00:00
Chris Lattner
19944fade3
remove the second argument to cloneInto
...
llvm-svn: 20754
2005-03-22 00:21:05 +00:00
Chris Lattner
03b7f99338
add some timers, don't clone aux nodes
...
llvm-svn: 20752
2005-03-22 00:12:00 +00:00
Chris Lattner
410da35a1f
move this out of line
...
llvm-svn: 20751
2005-03-22 00:09:45 +00:00
Chris Lattner
5f10e6dda1
don't generate temporary scalarmaps.
...
llvm-svn: 20749
2005-03-22 00:04:21 +00:00
Chris Lattner
848ef879c5
allow passing clone flags down to cloneInto
...
llvm-svn: 20748
2005-03-21 22:49:53 +00:00
Chris Lattner
c1439d539f
Enhance the TD pass to build composite graphs when we have indirect call
...
sites that target multiple callees. If we have a function table, for
example, with N callees, and M callers call through it, we used to have
to perform O(M*N) graph inlinings. Now we perform O(M+N) inlinings.
This speeds up the td pass on perlbmk from 36.26s to 25.75s.
llvm-svn: 20743
2005-03-21 20:31:29 +00:00
Chris Lattner
d90f5bab82
make this const correct
...
llvm-svn: 20741
2005-03-21 20:28:50 +00:00
Chris Lattner
040426aee0
Fix a major problem where we didn't add call graph edges for call sites with
...
more than 1 callee. This fixes Analysis/DSGraph/FunctionPointerTable-const.ll
llvm-svn: 20740
2005-03-21 20:20:49 +00:00
Chris Lattner
e8a43291cd
Ugh, for some reason, I can't call this unless the reference is const!?!?!?
...
llvm-svn: 20732
2005-03-21 10:00:45 +00:00
Chris Lattner
13429dc5af
The reachability cloner should add arguments to merged calls when the RHS of
...
the merge has more operands than the LHS.
llvm-svn: 20731
2005-03-21 09:39:51 +00:00
Chris Lattner
7269f15e8f
'note to self'
...
llvm-svn: 20727
2005-03-21 08:43:32 +00:00
Chris Lattner
98f7e1c370
Change the way that the TD pass inlines graphs. Instead of inlining each
...
graph into all of the functions it calls when we visit a graph, change it so
that the graph visitor inlines all of the callers of a graph into the current
graph when it visits it.
While we're at it, inline global information from the GG instead of from each
of the callers. The GG contains a superset of the info that the callers do
anyway, and this way we only need to do it one time (not one for each caller).
This speeds up the TD pass substantially on several programs, and there is
still room for improvement. For example, the TD pass used to take 147s
on perlbmk, it now takes 36s. On povray, we went from about 5s to 1.97s.
134.perl is down from ~1s for Loc+BU+TD to .6s.
The TD pass needs a lot of improvement though, which will occur with later
patches.
llvm-svn: 20723
2005-03-21 04:55:35 +00:00
Chris Lattner
c5cdc2260d
Don't strip modref bits when inlining down the call graph. This fixes
...
the DSGraph/2003-06-30-TopDownResolve.ll regression from last night.
llvm-svn: 20717
2005-03-20 18:02:56 +00:00
Chris Lattner
21ef7678d6
Remove the ability to keep track of inlined globals, which is always dead.
...
llvm-svn: 20716
2005-03-20 04:30:30 +00:00
Chris Lattner
571c62a008
This call is always a noop, remove it.
...
llvm-svn: 20714
2005-03-20 04:29:54 +00:00
Chris Lattner
b1cabb6541
remove some pointless asserts
...
llvm-svn: 20713
2005-03-20 04:29:39 +00:00
Chris Lattner
ded489ec3b
-steens doesn't use the inlined globals facility.
...
llvm-svn: 20712
2005-03-20 04:23:57 +00:00
Chris Lattner
ff634f4e32
Build EC's for globals twice. The first is after constructing the initial
...
Globals Graph for the local pass, the second is after all of the locals
graphs have been constructed. This allows for many additional global EC's
to be recognized that weren't before. This speeds up analysis of programs
like 177.mesa, where it changes DSA from taking 0.712s to 0.4018s.
llvm-svn: 20711
2005-03-20 03:32:35 +00:00
Chris Lattner
36a810ac40
Add a new DSNode::removeGlobal method.
...
llvm-svn: 20710
2005-03-20 03:29:54 +00:00
Chris Lattner
5ae215248f
Transform BU pass to not use the horrible DSCallSiteIterator class.
...
llvm-svn: 20708
2005-03-20 02:42:07 +00:00
Chris Lattner
a550a5b173
Implement new methods for dealing with DSNode global lists, rename uses of
...
old methods.
llvm-svn: 20707
2005-03-20 02:41:38 +00:00
Chris Lattner
e68e808bcd
use simpler methods.
...
llvm-svn: 20706
2005-03-20 02:41:16 +00:00
Chris Lattner
1ffdd57e0a
method was renamed.
...
llvm-svn: 20705
2005-03-20 02:40:27 +00:00
Chris Lattner
5635a88fcb
print out equiv class info.
...
llvm-svn: 20704
2005-03-20 02:40:11 +00:00
Chris Lattner
e7a8e8677e
some methods got renamed
...
llvm-svn: 20703
2005-03-20 02:40:04 +00:00
Chris Lattner
711e083c26
Make use of simpler DSNode methods.
...
llvm-svn: 20702
2005-03-20 02:39:49 +00:00
Chris Lattner
61f3befdc8
#ifdef out a function only used by #ifdef'd code.
...
llvm-svn: 20700
2005-03-20 02:14:15 +00:00
Chris Lattner
e965bd16bb
comment cleanup
...
llvm-svn: 20699
2005-03-20 01:18:00 +00:00
Chris Lattner
9379e69af9
Create an equivalence class of global variables that DSA will never be able
...
to tell apart anyway, and only track the leader for of these equivalence
classes in our graphs.
This dramatically reduces the number of GlobalValue*'s that appear in scalar
maps, which A) reduces memory usage, by eliminating many many scalarmap entries
and B) reduces time for operations that need to execute an operation for each
global in the scalar map.
As an example, this reduces the memory used to analyze 176.gcc from 1GB to
511MB, which (while it's still way too much) is better because it doesn't hit
swap anymore. On eon, this shrinks the local graphs from 14MB to 6.8MB,
shrinks the bu+td graphs of povray from 50M to 40M, shrinks the TD graphs of
130.li from 8.8M to 3.6M, etc.
This change also speeds up DSA on large programs where this makes a big
difference. For example, 130.li goes from 1.17s -> 0.56s, 134.perl goes
from 2.14 -> 0.93s, povray goes from 15.63s->7.99s (!!!).
This also apparently either fixes the problem that caused DSA to crash on
perlbmk and gcc, or it hides it, because DSA now works on these. These
both take entirely too much time in the TD pass (147s for perl, 538s for
gcc, vs 7.67/5.9s in the bu pass for either one), but this is a known
problem that I'll deal with later.
llvm-svn: 20696
2005-03-19 22:23:45 +00:00
Chris Lattner
c1b9b56a2c
Switch to use the new interface for the EquivalenceClasses class, and fix
...
a bug involving SCC's who have multiple members that are part of an EC.
llvm-svn: 20678
2005-03-19 05:15:27 +00:00
Chris Lattner
bed1c18a44
do not bother inlining nullary functions without return values. The only
...
effect these calls can have is due to global variables, and these passes
all use the globals graph to capture their effect anyway. This speeds up
the BU pass very slightly on perlbmk, reducing the number of dsnodes
allocated from 98913 to 96423.
llvm-svn: 20676
2005-03-18 23:19:47 +00:00
Chris Lattner
30525a04c1
fix a bogus assertion
...
llvm-svn: 20675
2005-03-18 23:18:30 +00:00
Chris Lattner
5bd948b4d7
another fastpath
...
llvm-svn: 20674
2005-03-18 23:18:20 +00:00
Chris Lattner
e29503a805
expose this pass to both opt and analyze
...
llvm-svn: 20672
2005-03-18 05:27:57 +00:00
Chris Lattner
a8e1a5250a
remove a bogus optimization. This only works if there are no globals in the
...
graph, and the combination of a function that does not reference globals, takes
not arguments and returns no value is pretty rare.
llvm-svn: 20670
2005-03-18 00:23:59 +00:00
Chris Lattner
3f181d7880
Rewrite DSAA::getModRefInfo to compute the mapping between caller and callee
...
to determine mod/ref behavior, instead of creating a *copy* of the caller
graph and inlining the callee graph into the copy.
This speeds up aa-eval on Ptrdist/yacr2 from 109.13s to 3.98s, and gives
identical results. The speedup is similar on other programs.
llvm-svn: 20669
2005-03-18 00:21:03 +00:00
Chris Lattner
b8d85c1a74
implement a new method.
...
llvm-svn: 20668
2005-03-17 23:45:54 +00:00
Chris Lattner
488a80a292
add some possibly bogus assertions.
...
llvm-svn: 20665
2005-03-17 20:33:27 +00:00
Chris Lattner
9c9f68c42f
Do not include the Function* for direct call/invoke instructions in the
...
alias evaluation. Clients really don't care.
llvm-svn: 20664
2005-03-17 20:25:04 +00:00
Chris Lattner
b5525529bd
simplify this function a bit, allow DS-AA to build on/improve the mod/ref
...
results returned by AA, not just use one or the other.
llvm-svn: 20662
2005-03-17 20:16:58 +00:00
Chris Lattner
8dd1491e71
Clean up some code, handle null pointer specially to avoid an assertion
...
llvm-svn: 20660
2005-03-17 19:56:56 +00:00
Chris Lattner
ea7e6548dc
Two changes:
...
1. Chain to the parent implementation of M/R analysis if we can't find
any information. It has some heuristics that often do well.
2. Do not clear all flags, this can make invalid nodes by turning nodes
that used to be collapsed into non-collapsed nodes (fixing crashes)
llvm-svn: 20659
2005-03-17 19:56:18 +00:00
Chris Lattner
7b9020a059
Fix the missing symbols problem Bill was hitting. Patch contributed by
...
Bill Wendling!!
llvm-svn: 20649
2005-03-17 15:38:16 +00:00
Chris Lattner
5251047abd
Do not create ridiculously huge DSNodes, as described in the comments.
...
This speeds up the BU pass on 172.mgrid from 62.3 -> 0.1242s.
llvm-svn: 20648
2005-03-17 05:25:34 +00:00
Chris Lattner
62462c2314
remove use of compat_iterator.
...
llvm-svn: 20643
2005-03-16 22:42:19 +00:00
Chris Lattner
f901355379
make sure to mark nodes in the globals graph incomplete after computing it
...
so that external globals (and whatever they point to) are marked incomplete.
llvm-svn: 20628
2005-03-15 22:47:18 +00:00
Chris Lattner
21a79edb27
fix crashes when we only have a prototype for main.
...
llvm-svn: 20627
2005-03-15 22:10:04 +00:00
Chris Lattner
dadf4b369e
Fix a crash that happens when mapping something like this:
...
{ short, short }
to
short
where the second short maps onto the second field of the first struct. In
this case, the struct index is not aligned, so we should avoid calling
getLink(2), which asserts out.
llvm-svn: 20626
2005-03-15 21:36:50 +00:00
Chris Lattner
dd3fb83f32
Make computeGGToGMapping compute an invnodemap
...
llvm-svn: 20622
2005-03-15 17:52:18 +00:00
Chris Lattner
d31a3d0e82
Finally fix (the right way) the problem where functions like this:
...
void foo() {
G = 1;
}
would have an empty DSGraph even though G (a global) is directly used
in the function.
llvm-svn: 20619
2005-03-15 17:14:09 +00:00
Chris Lattner
92d0c1c1ba
Start using retnodes_* for iteration.
...
llvm-svn: 20618
2005-03-15 16:55:04 +00:00
Chris Lattner
451fa32685
avoid varialbe name collisions
...
llvm-svn: 20606
2005-03-15 06:29:12 +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
Chris Lattner
28f1caa639
Don't crash if computing a mapping to a node with zero size
...
llvm-svn: 20595
2005-03-15 04:40:24 +00:00
Chris Lattner
26415d7432
rename method, add counterpart
...
llvm-svn: 20593
2005-03-15 00:58:16 +00:00
Chris Lattner
1bdb8b7e7e
add a method to compute a commonly used mapping.
...
llvm-svn: 20588
2005-03-14 19:22:47 +00:00
Chris Lattner
9071175625
regardless of whether or not the client things we should mark globals incomplete,
...
ALWAYS mark them incomplete if they are external!
llvm-svn: 20586
2005-03-13 20:36:01 +00:00
Chris Lattner
b9e2a4dec0
Make sure to remove incomplete markers before we add to them! :)
...
llvm-svn: 20585
2005-03-13 20:32:26 +00:00
Chris Lattner
5a6609771a
The incoming arguments to main (the argv list) are not complete!
...
llvm-svn: 20584
2005-03-13 20:22:10 +00:00
Chris Lattner
2eff970892
After finishing BU analysis, move all global variables from the globals
...
graph into main and mark them complete.
llvm-svn: 20583
2005-03-13 20:15:06 +00:00
Chris Lattner
68c3caccb1
ADd support for printing eqgraphs.
...
llvm-svn: 20582
2005-03-13 19:51:24 +00:00
Chris Lattner
9cc2c3e9d6
Replace linear search with logrithmic one.
...
llvm-svn: 20580
2005-03-13 19:05:05 +00:00
Chris Lattner
97ac0a8780
make sure to mark nodes returned from functions as incomplete
...
llvm-svn: 20576
2005-03-12 14:58:28 +00:00
Chris Lattner
dd6bcbe820
remove this from the PA namespace, leaving it in the llvm ns
...
llvm-svn: 20574
2005-03-12 12:08:52 +00:00
Chris Lattner
2dd9a09837
Move this from the pool allocator project to here, where it logically belongs.
...
llvm-svn: 20570
2005-03-12 11:51:30 +00:00
Chris Lattner
562c180879
Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation
...
that Alkis found with Java, thanks Alkis!
llvm-svn: 20531
2005-03-09 16:29:52 +00:00
Chris Lattner
adb043c2d8
Export two methods for getting -X and A-B.
...
llvm-svn: 20527
2005-03-09 05:34:41 +00:00
Chris Lattner
7c832fb0b2
Make sure the two arguments of a setcc instruction point to the same node.
...
llvm-svn: 20462
2005-03-05 19:04:31 +00:00
Chris Lattner
c01e2f76c3
Trivial cleanup patch
...
llvm-svn: 20436
2005-03-04 20:27:46 +00:00
Chris Lattner
dc166eb8f7
Fix spelling, patch contributed by Gabor Greif
...
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Chris Lattner
0b0f3520cb
DCE a dead function
...
llvm-svn: 20339
2005-02-26 23:36:45 +00:00
Chris Lattner
f05d2b3178
1 + 100 + 51 == 152, not 52.
...
If we fold three constants together (c1+c2+c3), make sure to keep
LHSC updated, instead of reusing (in this case), the 1 instead of the
partial sum.
llvm-svn: 20337
2005-02-26 18:50:19 +00:00
Chris Lattner
e99ee2b35d
Handle null a bit more carefully.
...
Actually teach dsa about select instructions. This doesn't affect the
graph in any way other than not setting a spurious U marker on pointer
nodes that are selected.
llvm-svn: 20324
2005-02-25 01:27:48 +00:00
Chris Lattner
468fd33abb
This instruction:
...
X = gep null, ...
Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.
llvm-svn: 20316
2005-02-24 19:55:31 +00:00
Chris Lattner
d13cc49e19
Fix a bug introduced by revision 1.187 of this file.
...
llvm-svn: 20308
2005-02-24 18:48:07 +00:00
Chris Lattner
3166471603
Remove use of bind_obj, deleter, and finegrainify namespacification.
...
llvm-svn: 20277
2005-02-22 23:27:21 +00:00
Chris Lattner
47555decfb
Scary typo that fixes Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll
...
and PR515.
llvm-svn: 20224
2005-02-17 16:54:16 +00:00
Chris Lattner
3e708301d2
Add a sanity check.
...
llvm-svn: 20195
2005-02-15 18:48:48 +00:00
Chris Lattner
219002ed8f
Add a new method to make it easy to update graphs.
...
llvm-svn: 20194
2005-02-15 18:40:55 +00:00
Chris Lattner
7b0fbe7ccf
Correct the recursive PHI node handling routines in a way that CANNOT induce
...
infinite loops (using the new replaceSymbolicValuesWithConcrete method).
This patch reverts this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20050131/023830.html
... which was an attempted fix for this problem. Unfortunately, that patch
caused test/Regression/Transforms/IndVarsSimplify/exit_value_tests.llx to fail
and slightly castrated the entire analysis. This patch fixes it right.
This patch is dedicated to jeffc, for making me deal with this. :)
llvm-svn: 20146
2005-02-13 04:37:18 +00:00
Chris Lattner
5ce5a094aa
Use new edge iterators to simplify some code.
...
llvm-svn: 20086
2005-02-09 03:20:43 +00:00
Chris Lattner
863d9c9068
IndCallGraphMap is now a pointer to a new'd map.
...
llvm-svn: 20065
2005-02-07 16:09:15 +00:00
Chris Lattner
4585abd549
If we have an indirect call site that calls N functions, inline the N functions
...
into a temporary graph, remember it for later, then inline the tmp graph into
the call site.
In the case where there are other call sites to the same set of functions, this
permits us to just inline the temporary graph instead of all of the callees.
This turns N*M inlining situations into an N+M inlining situation.
llvm-svn: 20036
2005-02-04 19:59:49 +00:00
Chris Lattner
d1000686cd
Split mergeInGraph into two methods.
...
llvm-svn: 20035
2005-02-04 19:58:28 +00:00
Chris Lattner
ba954f3284
Fix the Regression/Transforms/DSAnalysis/recursion.ll regression.
...
llvm-svn: 20031
2005-02-04 18:58:04 +00:00
Chris Lattner
3dd3df2b55
Refactor getFunctionArgumentsForCall out of mergeInGraph.
...
llvm-svn: 20018
2005-02-03 18:40:25 +00:00
Chris Lattner
16a53243c6
Eliminate some duplicated debug code
...
llvm-svn: 19980
2005-02-01 21:55:40 +00:00
Chris Lattner
5ce51e83af
Eliminate self-recursion as a special case.
...
llvm-svn: 19979
2005-02-01 21:49:43 +00:00
Chris Lattner
50cebc6b9b
Eliminate use of DSCallSiteIterator in key loop. This is a half step to
...
a tasty speedup.
llvm-svn: 19978
2005-02-01 21:37:27 +00:00
Chris Lattner
63a46cee87
Signficantly speed up printing by not emitting the same file twice with
...
different names. Large SCC's tend to be big, so this saves a lot of time.
llvm-svn: 19970
2005-02-01 19:10:48 +00:00
Chris Lattner
d6106a41fe
Do not revisit nodes in the SCC traversal. This speeds up the BU pass a bit.
...
llvm-svn: 19968
2005-02-01 17:35:52 +00:00
Chris Lattner
1230cf25ba
Fix a problem where we could infinitely recurse on phi nodes.
...
llvm-svn: 19955
2005-02-01 00:18:30 +00:00
Chris Lattner
2ca79d339e
Rename variables to work with VC++'s hokey scoping rules.
...
llvm-svn: 19942
2005-01-31 00:10:58 +00:00
Chris Lattner
2977b857c2
Fix some scary bugs that VC++ detected.
...
llvm-svn: 19941
2005-01-31 00:10:45 +00:00
Chris Lattner
a1b39fa5ad
* Make some methods more const correct.
...
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists.
This makes many operations on these lists much more natural, and avoids
*exteremely* expensive copying of DSCallSites (e.g. moving nodes around
between lists, erasing a node from not the end of the vector, etc).
With a profile build of analyze, this speeds up BU DS from 25.14s to
12.59s on 176.gcc. I expect that it would help TD even more, but I don't
have data for it.
This effectively eliminates removeIdenticalCalls and children from the
profile, going from 6.53 to 0.27s.
llvm-svn: 19939
2005-01-30 23:51:02 +00:00
Chris Lattner
1ec230e665
Due to previous simplifications, we can simplify the data structures being
...
used here.
llvm-svn: 19913
2005-01-29 07:04:10 +00:00
Chris Lattner
ce0fa4c109
Properly handle volatile.
...
llvm-svn: 19912
2005-01-29 06:42:34 +00:00
Chris Lattner
a194357025
Remove some useless map operations. Loads/stores that are in the same
...
BB as the load are not included in the Cand* sets at all.
llvm-svn: 19911
2005-01-29 06:39:25 +00:00
Chris Lattner
be62e72273
Before doing expensive global analysis, check to make sure the pointer is
...
not invalidated on entry and on exit of the block. This fixes some N^2
behavior in common cases, and speeds up gcc another 5% to 22.35s.
llvm-svn: 19910
2005-01-29 06:31:53 +00:00
Chris Lattner
fe7a9a242e
Minor simplification/speedup. Replaces a set lookup with a pointer comparison.
...
This speeds up 176.gcc from 25.73s to 23.48s, which is 9.5%
llvm-svn: 19907
2005-01-29 06:20:55 +00:00
Chris Lattner
787aed675d
Eliminate generality that is not buying us anything. In particular, this
...
will cause us to miss cases where the input pointer to a load could be value
numbered to another load. Something like this:
%X = load int* %P1
%Y = load int* %P2
Those are obviously the same if P1/P2 are the same. The code this patch
removes attempts to handle that. However, since GCSE iterates, this doesn't
actually buy us anything: GCSE will first replace P1 or P2 with the other
one, then the load can be value numbered as equal.
Removing this code speeds up gcse a lot. On 176.gcc in debug mode, this
speeds up gcse from 29.08s -> 25.73s, a 13% savings.
llvm-svn: 19906
2005-01-29 06:11:16 +00:00
Chris Lattner
b25abcb1fa
If we see:
...
%A = alloca int
%V = load int* %A
value number %V to undef, not 0.
llvm-svn: 19905
2005-01-29 05:57:01 +00:00
Chris Lattner
c782335e33
Remove this code as it is currently completely broken and unmaintained.
...
If needed, this can be resurrected from CVS.
Note that several of the interfaces (e.g. the IPModRef ones) are supersumed
by generic AliasAnalysis interfaces that have been written since this code
was developed (and they are not DSA specific).
llvm-svn: 19864
2005-01-28 06:12:46 +00:00
Chris Lattner
2e2edef9c6
Make -ds-aa more useful, allowing it to be updated as xforms hack on the program.
...
llvm-svn: 19818
2005-01-24 20:00:14 +00:00
Chris Lattner
2f8e4ad870
Silence VC++ warnings.
...
llvm-svn: 19506
2005-01-12 04:51:37 +00:00
Jeff Cohen
703f7db254
Apply feed back from Chris:
...
1. Rename createLoaderPass to CreateProfileLoaderPass
2. Opt shouldn't use the pass registered in CodeGen.
llvm-svn: 19431
2005-01-10 03:56:27 +00:00
Jeff Cohen
292845d2d9
Add last four createXxxPass functions
...
llvm-svn: 19424
2005-01-09 20:42:52 +00:00
Jeff Cohen
14903e0148
Get lib/Analysis/DataStructure to compile with VC++
...
llvm-svn: 19412
2005-01-09 04:18:28 +00:00
Jeff Cohen
cede1ce95a
Add even more missing createXxxPass functions.
...
llvm-svn: 19402
2005-01-08 22:01:16 +00:00
Misha Brukman
e50986b39f
Wrap at 80 cols
...
llvm-svn: 19121
2004-12-23 21:17:41 +00:00
Reid Spencer
454a8afc6d
Try to speed up gccld hot spot in BasicVN::getEqualNumberNodes by making
...
a function call at the core of the loop inline and removing unused
stack variables from an often called function. This doesn't improve things
much, the real saving will be by reducing the number of calls to this
function (100K+ when linking kimwitu++).
llvm-svn: 19119
2004-12-23 21:13:26 +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
aefd5fa18a
Eliminate a virtual method call
...
llvm-svn: 18964
2004-12-15 18:14:04 +00:00
Chris Lattner
869d6a40a9
Fix a bug in -no-aa that caused two DSGraph tests to XPASS.
...
llvm-svn: 18962
2004-12-15 17:13:24 +00:00
Chris Lattner
71d04bce55
Adjust to new alias analysis interfaces
...
llvm-svn: 18957
2004-12-15 07:22:13 +00:00
Alkis Evlogimenos
346ee4c9fb
Add testcase and fix for yet another case where we query the size an
...
abstract type.
llvm-svn: 18678
2004-12-08 23:56:15 +00:00
Alkis Evlogimenos
b1ff6d7921
Add testcase and fix for another case where we query the size an
...
abstract type.
llvm-svn: 18676
2004-12-08 23:42:11 +00:00
Chris Lattner
5a0680245f
Move method out of line for better ICC support
...
Add some ifdefs for some stuff I like to be able to toggle easily
llvm-svn: 18665
2004-12-08 21:03:56 +00:00
Chris Lattner
8351112192
Properly extern this.
...
llvm-svn: 18664
2004-12-08 21:00:59 +00:00
Chris Lattner
d349d4a49c
Work correctly with ICC, Patch contributed by Bjørn Wennberg
...
llvm-svn: 18630
2004-12-08 16:22:26 +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
a27dd47e7a
This patch prevents an infinite recursion while compiling 103.su2cor.
...
All SPEC CFP 95 programs now work, though the JIT isn't loading -lf2c right
so they aren't testing correctly.
llvm-svn: 18499
2004-12-04 20:54:32 +00:00
Chris Lattner
1b784b117d
Fix DeadStoreElimination/2004-11-28-LiveStoreDeleted.ll
...
llvm-svn: 18308
2004-11-28 20:30:15 +00:00
Chris Lattner
24bba4d237
When merging to alias sets, if they are both must alias, the result is not
...
a must alias set unless all of the pointers in the resultant set are must
aliased together.
llvm-svn: 18275
2004-11-27 18:37:42 +00:00
Chris Lattner
eeaa29c377
Add a new interface
...
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Chris Lattner
f30656b437
When evaluating an AA, pass in size info
...
llvm-svn: 18264
2004-11-26 21:05:39 +00:00
Chris Lattner
63b45b4768
The trick with globals actually works with allocas and malloc too
...
llvm-svn: 18262
2004-11-26 20:01:48 +00:00
Chris Lattner
75819a81b2
A store or load cannot alias a global if the accessed amount is larger then
...
the global.
This implements Regression/Analysis/BasicAA/global-size.ll
llvm-svn: 18261
2004-11-26 19:20:01 +00:00
Chris Lattner
1b4e78d9e6
Mission accomplished!
...
llvm-svn: 17990
2004-11-19 16:22:24 +00:00
Chris Lattner
c368b63515
Simplify conditional and fix LICM/2004-11-17-UndefIndexCrash.ll
...
by saying what we mean
llvm-svn: 17913
2004-11-17 17:39:39 +00:00
Reid Spencer
f5e3cfe6d6
Standardize on 'class' instead of 'struct'. Gets rid of warnings in VC++
...
Patch contributed by Jeff Cohen.
llvm-svn: 17889
2004-11-16 06:58:55 +00:00
Chris Lattner
068c0cf56a
Fix a bug that was preventing povray and namd from pool allocating correctly.
...
llvm-svn: 17632
2004-11-08 21:08:46 +00:00
Chris Lattner
1feea5ffc9
Handle assert_fail special
...
llvm-svn: 17631
2004-11-08 21:08:28 +00:00
Chris Lattner
303bdd1e4b
Remove dead var
...
llvm-svn: 17485
2004-11-05 04:52:08 +00:00
Chris Lattner
a67a030d9d
Don't call Constant::getNullValue when the argument could be VoidTy
...
llvm-svn: 17457
2004-11-03 18:51:26 +00:00
Chris Lattner
e3c00e9eee
Fix comment
...
llvm-svn: 17377
2004-10-31 21:54:51 +00:00
Chris Lattner
70fdac83e3
Improve comment
...
llvm-svn: 17375
2004-10-31 19:57:43 +00:00
Chris Lattner
3f7dbfc898
Add more paranoid assertions :)
...
llvm-svn: 17367
2004-10-31 17:45:40 +00:00
Chris Lattner
c76fef1248
Fix some more problems where we called getOffset before getNode()
...
llvm-svn: 17358
2004-10-30 07:21:19 +00:00
Chris Lattner
8aa0bafe1a
Fix three bugs:
...
1. Calls to external global VARIABLES should not be treated as a call to an
external function
2. Efficiently deleting an element from a vector by using std::swap with
the back, then pop_back is NOT a good way to keep the vector sorted.
3. Our hope of having stuff get deleted by making them redundant just won't
work. In particular, if we have three calls in sequence that should be
merged: A, B, C first we unify B into A. To be sure that they appeared
identical (so B would be erased) we set B = A. On the next step, we
unified C into A and set C = A. Unfortunately, this is no guarantee that
C = B, so we would fail to delete the dead call. Switch to a more
explicit scheme.
llvm-svn: 17357
2004-10-30 05:41:23 +00:00
Chris Lattner
bc740090a9
Fix more undefined behavior
...
llvm-svn: 17356
2004-10-30 04:22:45 +00:00
Chris Lattner
ba96f0fd83
* Add a method
...
* change some uses of NH.getNode() in a bool context to use !NH.isNull()
* Fix a bunch of places where we depended on the (undefined) order of
evaluation of arguments to function calls to ensure that getNode() was
called before getOffset(). In practice, this was NOT happening.
llvm-svn: 17354
2004-10-30 04:05:01 +00:00
Alkis Evlogimenos
6bbc57ec12
Fix library name.
...
llvm-svn: 17306
2004-10-28 05:36:48 +00:00
Reid Spencer
57cbe39d1e
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Chris Lattner
7dfc2d29ac
Convert 'struct' to 'class' in various places to adhere to the coding standards
...
and work better with VC++. Patch contributed by Morten Ofstad!
llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner
fda51a5933
add support for UndefValue
...
llvm-svn: 17260
2004-10-26 16:23:03 +00:00
Chris Lattner
43df507fef
Patch to support MSVC, contributed by Morten Ofstad
...
llvm-svn: 17214
2004-10-25 18:40:08 +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
98e541457b
Add support for unreachable
...
llvm-svn: 17056
2004-10-16 18:21:33 +00:00
Chris Lattner
61753bf847
Add support for undef
...
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Chris Lattner
2978437b76
Add support
...
llvm-svn: 17052
2004-10-16 18:16:19 +00:00
Chris Lattner
3c3e058406
Be more careful about looking for constants when we really want constantint's.
...
llvm-svn: 17029
2004-10-16 16:07:10 +00:00
Chris Lattner
52a126cb3e
Do not use the same variable name for two different variables in the
...
same scope. This confused VC++ (and probably people too!). Patch by
Morten Ofstad!
llvm-svn: 16985
2004-10-14 14:59:16 +00:00
Reid Spencer
ace94df71f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Chris Lattner
ec901cc6cd
This nutty patch has been in my tree since before 1.3 went out, and it needs
...
to go in. This patch allows us to compute the trip count of loops controlled
by values loaded from constant arrays. The cannonnical example of this is
strlen when passed a constant argument:
for (int i = 0; "constantstring"[i]; ++i) ;
return i;
In this case, it will compute that the loop executes 14 times, which means
that the exit value of i is 14. Because of this, the loop gets DCE'd and
we are happy. This also applies to anything that does similar things, e.g.
loops like this:
const float Array[] = { 0.1, 2.1, 3.2, 23.21 };
for (int i = 0; Array[i] < 20; ++i)
and is actually fairly general.
The problem with this is that it almost never triggers. The reason is that
we run indvars and the loop optimizer only at compile time, which is before
things like strlen and strcpy have been inlined into the program from libc.
Because of this, it almost never is used (it triggers twice in specint2k).
I'm committing it because it DOES work, may be useful in the future, and
doesn't slow us down at all. If/when we start running the loop optimizer
at link-time (-O4?) this will be very nice indeed :)
llvm-svn: 16926
2004-10-12 01:49:27 +00:00
Chris Lattner
6faf3949f6
Fix SingleSource/Benchmarks/McGill/chomp
...
llvm-svn: 16912
2004-10-11 04:07:27 +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
3ae7bb6b7c
Fix a nasty dangling pointer problem, due to a free'd pointer being left in
...
a map. This caused problems if a later object happened to be allocated at
the free'd object's address.
llvm-svn: 16813
2004-10-07 20:01:31 +00:00
Chris Lattner
af88fcd4c9
Dont' let null nodes sneak past cast instructions
...
llvm-svn: 16779
2004-10-06 19:29:13 +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
6614946443
Convert code to compile with vc7.1.
...
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
2004-09-15 17:06:42 +00:00
Chris Lattner
6fa9665095
Add some assertions
...
llvm-svn: 16366
2004-09-15 16:59:47 +00:00
Chris Lattner
ab64481f1d
Implement an AliasSetTracker::copyValue method
...
llvm-svn: 16344
2004-09-14 19:15:32 +00:00
Alkis Evlogimenos
a5c04ee50f
Fixes to make LLVM compile with vc7.1.
...
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
2004-09-03 18:19:51 +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
Chris Lattner
7e36902bd9
Hide this option
...
llvm-svn: 15415
2004-08-02 20:16:21 +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
Misha Brukman
2b3387a6d9
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15328
2004-07-29 17:05:13 +00:00
Alkis Evlogimenos
fd7a2d4477
Merge i*.h headers into Instructions.h as part of bug403.
...
llvm-svn: 15325
2004-07-29 12:17:34 +00:00
Chris Lattner
c21acbfea4
Fix test/Regression/Analysis/BasicAA/2004-07-28-MustAliasbug.llx
...
This also fixes the miscompilation of MallocBench/gs with dead store
elimination enabled.
llvm-svn: 15324
2004-07-29 07:56:39 +00:00
Brian Gaeke
38b79e8fbc
Make the create...() functions for some of these passes return a FunctionPass *.
...
llvm-svn: 15276
2004-07-27 17:43:21 +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
731381dc0e
Remove a bogus assertion
...
llvm-svn: 15261
2004-07-27 07:22:21 +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
Chris Lattner
9b323c3521
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
aa05a6e5a1
Make basicaa a bit more aggressive
...
llvm-svn: 15252
2004-07-27 02:18:52 +00:00
Chris Lattner
6b570266b8
basic-aa can actually provide simple mod/ref info
...
llvm-svn: 15251
2004-07-27 02:13:55 +00:00
Chris Lattner
782ab98c56
This was implemented back in march
...
llvm-svn: 15250
2004-07-27 01:59:42 +00:00
Chris Lattner
bf8c3c405e
Add some new methods
...
llvm-svn: 15230
2004-07-26 05:50:23 +00:00
Chris Lattner
0c73a1ff05
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
924c68dcb2
Add support for free instructions
...
llvm-svn: 15197
2004-07-25 07:57:37 +00:00
Chris Lattner
053427ff4f
Clean up reference counting to stop "leaking" alias sets
...
llvm-svn: 15099
2004-07-22 07:58:18 +00:00
Brian Gaeke
902dcf0729
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
abc4f4523f
Add capability to remove aliasing aliassets from an AST
...
llvm-svn: 15066
2004-07-21 07:04:26 +00:00
Chris Lattner
2cfaef23e4
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
fdcf624939
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
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
3bbaaaa940
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
2e8690bf57
Print modref information in a useful way.
...
llvm-svn: 14907
2004-07-17 06:43:20 +00:00
Chris Lattner
eed1a6f3dc
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
597555fd45
Be compatible with IA64
...
llvm-svn: 14864
2004-07-16 00:04:13 +00:00
Chris Lattner
3c42077c37
Fixes for PR341
...
llvm-svn: 14843
2004-07-15 02:31:46 +00:00
Chris Lattner
558cebc775
Fix for PR341
...
llvm-svn: 14842
2004-07-15 02:26:49 +00:00
Chris Lattner
cbdf371d30
Simplify logic.
...
llvm-svn: 14825
2004-07-14 20:27:12 +00:00
Chris Lattner
b2db87a5ca
Disable some code that isn't helping matters
...
llvm-svn: 14682
2004-07-08 07:25:51 +00:00
Chris Lattner
97cf20e1b8
Headers moved
...
llvm-svn: 14665
2004-07-07 06:35:22 +00:00
Chris Lattner
f6118db088
Move all of the DSA headers into the Analysis/DataStructure subdir.
...
llvm-svn: 14663
2004-07-07 06:32:21 +00:00
Chris Lattner
deb7676f0f
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
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
9b55c11c56
Moved IPModRef out of the public include dir
...
llvm-svn: 14455
2004-06-28 00:41:23 +00:00
Chris Lattner
32c79788cc
Move DependenceGraph.* to lib/Analysis/DataStructure
...
llvm-svn: 14452
2004-06-28 00:32:33 +00:00
Chris Lattner
135fb4be7c
Moving to lib/Analysis/DataStructure
...
llvm-svn: 14450
2004-06-28 00:29:42 +00:00
Chris Lattner
dfe8056225
Move MemoryDepAnalysis.h into lib/Analysis/DataStructure
...
llvm-svn: 14448
2004-06-28 00:27:16 +00:00
Chris Lattner
f6729a3bcc
Move PgmDependenceGraph.h out of the public include hierarchy
...
llvm-svn: 14446
2004-06-28 00:20:04 +00:00
Chris Lattner
74e2acfcdd
Simplify code
...
llvm-svn: 14424
2004-06-26 19:31:26 +00:00
Chris Lattner
f019e346f4
Fix header
...
llvm-svn: 14394
2004-06-25 04:24:22 +00:00
Chris Lattner
5e08b93a34
Remove distasteful method which is really part of the indvars pass
...
llvm-svn: 14359
2004-06-24 06:52:20 +00:00
Chris Lattner
0441388aff
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
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
Misha Brukman
ddc90adca3
File depends on DSA, moved to lib/Analysis/DataStructure
...
llvm-svn: 14325
2004-06-22 18:11:38 +00:00
Chris Lattner
881d959fd4
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
baaed7ee90
REALLY fix PR378: crash in scalar evolution analysis
...
llvm-svn: 14275
2004-06-20 20:32:16 +00:00
Chris Lattner
6bfca8f5f1
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
eb3e84078d
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
feda9d0583
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
6b7275996c
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
fbf4dc3bd0
isnan is dead
...
llvm-svn: 14191
2004-06-15 21:52:58 +00:00
Chris Lattner
66f313725c
llvm.isnan doesn't access memory
...
llvm-svn: 14151
2004-06-11 06:17:13 +00:00
Chris Lattner
4c7a24af44
Don't grab the condition of unconditional branches!
...
This fixes PR363
llvm-svn: 14076
2004-06-08 21:50:30 +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
Vikram S. Adve
f6c4ee0744
Recognize memalign and friends, and handle them specially.
...
llvm-svn: 13741
2004-05-25 08:14:52 +00:00
Chris Lattner
62c37008a4
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
59c8ed8843
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
e345f6b5ab
Updates to work with the new auto-forwarding AA interface changes
...
llvm-svn: 13682
2004-05-23 21:14:27 +00:00
Chris Lattner
e657eb17cc
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
befe4c510e
Update to match the autochaining interface that the AA interface uses
...
llvm-svn: 13680
2004-05-23 21:13:51 +00:00
Chris Lattner
32502b8d4a
Implement the interfaces to update value numbering information. Add an
...
assert.
llvm-svn: 13679
2004-05-23 21:13:24 +00:00
Chris Lattner
746e1e1808
Rename a method
...
llvm-svn: 13676
2004-05-23 21:10:58 +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
Vikram S. Adve
159ed21b67
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
17fcb67a20
Fine grainify namespacification
...
llvm-svn: 13436
2004-05-09 06:22:29 +00:00
Brian Gaeke
e330adf842
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
600f2045a9
Add stub support for reading BBTraces.
...
llvm-svn: 13352
2004-05-04 17:11:14 +00:00
Brian Gaeke
34c13fbe94
Share ProfilingType enum with the C profiling runtime libraries.
...
llvm-svn: 13346
2004-05-04 16:53:07 +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
372d5bc9ab
Wrapped code and comments at 80 cols; doxygenified some comments.
...
llvm-svn: 13264
2004-04-29 04:05:30 +00:00
Misha Brukman
a70ae90722
Reorder #includes as per style guide.
...
llvm-svn: 13263
2004-04-29 04:04:47 +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