Commit Graph

1198 Commits

Author SHA1 Message Date
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