Commit Graph

1237 Commits

Author SHA1 Message Date
Chris Lattner
65512d2525 a hack to allow count-aa to work with ds-aa :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:34 +00:00
Chris Lattner
cf9f20189f 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20790 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:07 +00:00
Chris Lattner
c14f59cb72 turn a dead conditional into an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20787 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 20:12:08 +00:00
Chris Lattner
e3f1d8a525 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20786 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 20:08:59 +00:00
Chris Lattner
eb39492deb wrap a long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20785 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 16:43:11 +00:00
Chris Lattner
943814bb01 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20781 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:48:09 +00:00
Chris Lattner
2f72f9462b implement Analysis/DSGraph/field-sensitive.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20779 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 01:47:19 +00:00
Chris Lattner
1e9d1475bc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20775 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 23:54:52 +00:00
Chris Lattner
9547adef58 Mark external globals incomplete in the BU Globals graph, fixing
Analysis/DSGraph/2005-03-22-IncompleteGlobal.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20773 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 22:10:22 +00:00
Chris Lattner
6ae7e9837c Directly count the number of memory instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20766 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 03:55:10 +00:00
Chris Lattner
a513fb127f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20764 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 02:45:13 +00:00
Chris Lattner
9308a35532 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*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20763 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 01:50:42 +00:00
Chris Lattner
3bc703ba22 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 :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20762 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 01:42:59 +00:00
Chris Lattner
a2197139b5 Now that the dead ctor is gone, nothing uses the old node mapping exported by
cloneInto: make it an internally used mapping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20760 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:36:51 +00:00
Chris Lattner
5805c426dc remove a dead ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20759 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:33:35 +00:00
Chris Lattner
d65145bd3d now that the second argument is always this->ReturnNodes, don't bother passing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:29:44 +00:00
Chris Lattner
560af8aa97 instead of using a local RetValMap, just use the graph we are cloning into
for the return node map.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20757 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:25:52 +00:00
Chris Lattner
271d6884e3 now that the valuemapping is always the local scalar map, we can eliminate
this identity merge.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20755 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:22:45 +00:00
Chris Lattner
3c920fa861 remove the second argument to cloneInto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20754 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:21:05 +00:00
Chris Lattner
24c47c5c45 add some timers, don't clone aux nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20752 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:12:00 +00:00
Chris Lattner
612f0b74d4 move this out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:09:45 +00:00
Chris Lattner
7080c3e54e don't generate temporary scalarmaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20749 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:04:21 +00:00
Chris Lattner
f09ecffa0d allow passing clone flags down to cloneInto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20748 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 22:49:53 +00:00
Chris Lattner
275b301740 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20743 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 20:31:29 +00:00
Chris Lattner
b3439374ac make this const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20741 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 20:28:50 +00:00
Chris Lattner
eb144f5e73 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20740 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 20:20:49 +00:00
Chris Lattner
c26f6d3899 Ugh, for some reason, I can't call this unless the reference is const!?!?!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20732 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 10:00:45 +00:00
Chris Lattner
3f90a94c5d The reachability cloner should add arguments to merged calls when the RHS of
the merge has more operands than the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20731 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 09:39:51 +00:00
Chris Lattner
c2b94805fb 'note to self'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20727 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 08:43:32 +00:00
Chris Lattner
d57e55ec0d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 04:55:35 +00:00
Chris Lattner
53491b3db7 Don't strip modref bits when inlining down the call graph. This fixes
the DSGraph/2003-06-30-TopDownResolve.ll regression from last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20717 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 18:02:56 +00:00
Chris Lattner
cc9bda6a41 Remove the ability to keep track of inlined globals, which is always dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20716 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:30:30 +00:00
Chris Lattner
36474c923f This call is always a noop, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:29:54 +00:00
Chris Lattner
bc6f966a44 remove some pointless asserts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20713 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:29:39 +00:00
Chris Lattner
5f75ff65bc -steens doesn't use the inlined globals facility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20712 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:23:57 +00:00
Chris Lattner
9b426bdd81 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20711 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 03:32:35 +00:00
Chris Lattner
7cdf321256 Add a new DSNode::removeGlobal method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20710 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 03:29:54 +00:00
Chris Lattner
6b9eb35442 Transform BU pass to not use the horrible DSCallSiteIterator class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20708 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:42:07 +00:00
Chris Lattner
82c6c72862 Implement new methods for dealing with DSNode global lists, rename uses of
old methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20707 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:41:38 +00:00
Chris Lattner
2496d696f0 use simpler methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20706 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:41:16 +00:00
Chris Lattner
977b705d74 method was renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20705 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:40:27 +00:00
Chris Lattner
f5c7ad8949 print out equiv class info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20704 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:40:11 +00:00
Chris Lattner
bf30e7268c some methods got renamed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20703 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:40:04 +00:00
Chris Lattner
9454dda28a Make use of simpler DSNode methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20702 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:39:49 +00:00
Chris Lattner
1cee779cec #ifdef out a function only used by #ifdef'd code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20700 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:14:15 +00:00
Chris Lattner
48427b539f comment cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 01:18:00 +00:00
Chris Lattner
f4f6227989 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20696 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 22:23:45 +00:00
Chris Lattner
605a87cc19 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20678 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 05:15:27 +00:00
Chris Lattner
5021b8c2d6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20676 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 23:19:47 +00:00
Chris Lattner
db7436aae8 fix a bogus assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20675 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 23:18:30 +00:00
Chris Lattner
0c9707a190 another fastpath
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20674 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 23:18:20 +00:00
Chris Lattner
41b162faba expose this pass to both opt and analyze
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20672 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 05:27:57 +00:00
Chris Lattner
4707b895b6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20670 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 00:23:59 +00:00
Chris Lattner
511f60c707 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20669 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-18 00:21:03 +00:00
Chris Lattner
4ffe5d8038 implement a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20668 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 23:45:54 +00:00
Chris Lattner
1c8327bd50 add some possibly bogus assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20665 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 20:33:27 +00:00
Chris Lattner
ddc77c458a Do not include the Function* for direct call/invoke instructions in the
alias evaluation.  Clients really don't care.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20664 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 20:25:04 +00:00
Chris Lattner
50cb9b40c2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20662 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 20:16:58 +00:00
Chris Lattner
94f8470fe3 Clean up some code, handle null pointer specially to avoid an assertion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20660 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 19:56:56 +00:00
Chris Lattner
2e2cce69bc 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)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20659 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 19:56:18 +00:00
Chris Lattner
5b3a4553c1 Fix the missing symbols problem Bill was hitting. Patch contributed by
Bill Wendling!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 15:38:16 +00:00
Chris Lattner
ec3f5c4fd7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20648 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 05:25:34 +00:00
Chris Lattner
84b80a214a remove use of compat_iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20643 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 22:42:19 +00:00
Chris Lattner
38065a7e01 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20628 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 22:47:18 +00:00
Chris Lattner
49e88e80c7 fix crashes when we only have a prototype for main.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20627 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 22:10:04 +00:00
Chris Lattner
4d5af8e894 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20626 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 21:36:50 +00:00
Chris Lattner
36a13cdeea Make computeGGToGMapping compute an invnodemap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20622 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 17:52:18 +00:00
Chris Lattner
2af8c5185a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20619 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 17:14:09 +00:00
Chris Lattner
a5f47ea23d Start using retnodes_* for iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20618 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 16:55:04 +00:00
Chris Lattner
5d85f8f66e avoid varialbe name collisions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20606 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 06:29:12 +00:00
Chris Lattner
e4d5c441e0 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:54:21 +00:00
Chris Lattner
841957ebaf Don't crash if computing a mapping to a node with zero size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20595 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 04:40:24 +00:00
Chris Lattner
b0f92e3ed3 rename method, add counterpart
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20593 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 00:58:16 +00:00
Chris Lattner
b2b17bb65b add a method to compute a commonly used mapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20588 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-14 19:22:47 +00:00
Chris Lattner
e2bc7b2517 regardless of whether or not the client things we should mark globals incomplete,
ALWAYS mark them incomplete if they are external!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20586 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:36:01 +00:00
Chris Lattner
270cf5025e Make sure to remove incomplete markers before we add to them! :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20585 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:32:26 +00:00
Chris Lattner
b5ecd2e378 The incoming arguments to main (the argv list) are not complete!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20584 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:22:10 +00:00
Chris Lattner
a66e353cf9 After finishing BU analysis, move all global variables from the globals
graph into main and mark them complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20583 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 20:15:06 +00:00
Chris Lattner
adfd5f14b4 ADd support for printing eqgraphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20582 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:51:24 +00:00
Chris Lattner
2787e03d0e Replace linear search with logrithmic one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20580 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:05:05 +00:00
Chris Lattner
a4319e5826 make sure to mark nodes returned from functions as incomplete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20576 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 14:58:28 +00:00
Chris Lattner
b25959a632 remove this from the PA namespace, leaving it in the llvm ns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20574 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 12:08:52 +00:00
Chris Lattner
7aed7179bd Move this from the pool allocator project to here, where it logically belongs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20570 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 11:51:30 +00:00
Chris Lattner
50bc9ef507 Fix Regression/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll, a miscompilation
that Alkis found with Java, thanks Alkis!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20531 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 16:29:52 +00:00
Chris Lattner
bac5b46396 Export two methods for getting -X and A-B.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20527 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 05:34:41 +00:00
Chris Lattner
3267265d78 Make sure the two arguments of a setcc instruction point to the same node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20462 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:04:31 +00:00
Chris Lattner
f57cc3b7e2 Trivial cleanup patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-04 20:27:46 +00:00
Chris Lattner
f8db8a0432 Fix spelling, patch contributed by Gabor Greif
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20342 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 06:15:51 +00:00
Chris Lattner
7192e501eb DCE a dead function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20339 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-26 23:36:45 +00:00
Chris Lattner
7ffc07dcf7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20337 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-26 18:50:19 +00:00
Chris Lattner
6e84bd7d59 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20324 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-25 01:27:48 +00:00
Chris Lattner
753b113cdf This instruction:
X = gep null, ...

Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20316 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 19:55:31 +00:00
Chris Lattner
d7642c4f2d Fix a bug introduced by revision 1.187 of this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20308 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 18:48:07 +00:00
Chris Lattner
13d0108666 Remove use of bind_obj, deleter, and finegrainify namespacification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20277 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-22 23:27:21 +00:00
Chris Lattner
2352fec205 Scary typo that fixes Regression/Transforms/IndVarsSimplify/2005-02-17-TruncateExprCrash.ll
and PR515.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20224 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-17 16:54:16 +00:00
Chris Lattner
7a0c775044 Add a sanity check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20195 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:48:48 +00:00
Chris Lattner
d672ab936f Add a new method to make it easy to update graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20194 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:40:55 +00:00
Chris Lattner
4dc534c7fe 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.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20146 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 04:37:18 +00:00
Chris Lattner
6be079491f Use new edge iterators to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20086 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-09 03:20:43 +00:00
Chris Lattner
bcc70bcb25 IndCallGraphMap is now a pointer to a new'd map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20065 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 16:09:15 +00:00