1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

9474 Commits

Author SHA1 Message Date
Chris Lattner
81a96c578c 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
4c9d4fe24f 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
Andrew Lenharth
5bd65ee784 two things: 1)evilness reduction patch, reduces the number of instructions hiding in the small jump CC moving code. 2)implement div of small data types by FP DIV (also reduces evilness and should speed things up)
llvm-svn: 20756
2005-03-22 00:24:07 +00:00
Chris Lattner
bd9d33173c 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
ffa612a1fd remove the second argument to cloneInto
llvm-svn: 20754
2005-03-22 00:21:05 +00:00
Chris Lattner
940600a185 add some timers, don't clone aux nodes
llvm-svn: 20752
2005-03-22 00:12:00 +00:00
Chris Lattner
21b3519b2e move this out of line
llvm-svn: 20751
2005-03-22 00:09:45 +00:00
Chris Lattner
e1c098449c don't generate temporary scalarmaps.
llvm-svn: 20749
2005-03-22 00:04:21 +00:00
Chris Lattner
1ce92ebd00 allow passing clone flags down to cloneInto
llvm-svn: 20748
2005-03-21 22:49:53 +00:00
Chris Lattner
97fc8f85d1 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
8b4af69d5b make this const correct
llvm-svn: 20741
2005-03-21 20:28:50 +00:00
Chris Lattner
15ab6ab0c1 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
Misha Brukman
04d6d0666d We may be adding functions to the Module during initialization, so
conservatively, it's modified

llvm-svn: 20735
2005-03-21 19:22:14 +00:00
Chris Lattner
7c6e697cc6 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
83ce1e319c 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
3dd7af56a4 'note to self'
llvm-svn: 20727
2005-03-21 08:43:32 +00:00
Chris Lattner
ce471ff361 Remove a bunch of cruft and dead code for handling the case when types were
defined in function constant pools.  The assembler grammar has long
disallowed functions from having constant pools, so all of this stuff is
dead.

This makes it an immediate error for functions to refer to nonexisting
types, fixing Regression/Verifier/2005-03-21-UndefinedTypeReference.ll.

Before, references to non-existing types in functions would only be
detected when the subsequent function was parsed, due to the call to
"ResolveTypes".  "ResolveTypes" has not resolved any types for a long time,
instead it emitted an error message if no resolved types are left.  Since
the only caller of this method is in the module code, just inline it.

llvm-svn: 20726
2005-03-21 06:27:42 +00:00
Tanya Lattner
156e5a6897 Make this method non-const. Making it const causes the const version of
getIGroup to be called instead of the non-const one.  These two methods
have (??) different behavior, so this change fixes bugs.

llvm-svn: 20724
2005-03-21 06:07:43 +00:00
Chris Lattner
1f266b60f8 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
85387b86fa 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
da405e3c5d 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
0d3ba2a064 This call is always a noop, remove it.
llvm-svn: 20714
2005-03-20 04:29:54 +00:00
Chris Lattner
715493901e remove some pointless asserts
llvm-svn: 20713
2005-03-20 04:29:39 +00:00
Chris Lattner
a09de3da5d -steens doesn't use the inlined globals facility.
llvm-svn: 20712
2005-03-20 04:23:57 +00:00
Chris Lattner
cb59ad59dc 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
4928678f91 Add a new DSNode::removeGlobal method.
llvm-svn: 20710
2005-03-20 03:29:54 +00:00
Chris Lattner
f61874f79a Transform BU pass to not use the horrible DSCallSiteIterator class.
llvm-svn: 20708
2005-03-20 02:42:07 +00:00
Chris Lattner
1648378d0e 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
2a3687ecb0 use simpler methods.
llvm-svn: 20706
2005-03-20 02:41:16 +00:00
Chris Lattner
dddb514aa9 method was renamed.
llvm-svn: 20705
2005-03-20 02:40:27 +00:00
Chris Lattner
4c11b8e07d print out equiv class info.
llvm-svn: 20704
2005-03-20 02:40:11 +00:00
Chris Lattner
73ae41b317 some methods got renamed
llvm-svn: 20703
2005-03-20 02:40:04 +00:00
Chris Lattner
da7b948969 Make use of simpler DSNode methods.
llvm-svn: 20702
2005-03-20 02:39:49 +00:00
Chris Lattner
51f7c8a068 #ifdef out a function only used by #ifdef'd code.
llvm-svn: 20700
2005-03-20 02:14:15 +00:00
Chris Lattner
904a0ddcc5 comment cleanup
llvm-svn: 20699
2005-03-20 01:18:00 +00:00
Chris Lattner
f17cd879c0 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
f53c9e2578 Fix the 3 regressions last night, due to my buggy patch from yesterday.
llvm-svn: 20689
2005-03-19 17:35:11 +00:00
Alkis Evlogimenos
19bea8930f Add new function getPtrPtrFromArrayPtr().
llvm-svn: 20684
2005-03-19 11:40:31 +00:00
Alkis Evlogimenos
d8f23f17f0 Stop using deprecated interface.
llvm-svn: 20679
2005-03-19 09:22:17 +00:00
Chris Lattner
773569df86 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
54b0239649 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
a9f266472f fix a bogus assertion
llvm-svn: 20675
2005-03-18 23:18:30 +00:00
Chris Lattner
1ebf12b477 another fastpath
llvm-svn: 20674
2005-03-18 23:18:20 +00:00
Chris Lattner
35084f46a3 remove use of getPrev() and getNext() on ilist nodes.
llvm-svn: 20673
2005-03-18 16:12:37 +00:00
Chris Lattner
7a4832c53a expose this pass to both opt and analyze
llvm-svn: 20672
2005-03-18 05:27:57 +00:00
Chris Lattner
c2d54235d7 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
57989f2b9a 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
a7e0e70f53 implement a new method.
llvm-svn: 20668
2005-03-17 23:45:54 +00:00
Chris Lattner
be0eb11431 add some possibly bogus assertions.
llvm-svn: 20665
2005-03-17 20:33:27 +00:00
Chris Lattner
097c55f578 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