Commit Graph

17966 Commits

Author SHA1 Message Date
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 0ebba657df add a method
llvm-svn: 20709
2005-03-20 03:29:39 +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 9991eeb575 rename some methods and add some new methods for dealing with the globals list
in a DSNode.

llvm-svn: 20701
2005-03-20 02:38:39 +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
Misha Brukman 42f1cfd637 Constant-propagate the value of `isL' variable and eliminate it.
llvm-svn: 20698
2005-03-19 23:39:50 +00:00
Jeff Cohen f4ab9e5965 Silence VC++ warning about mixing intptr_t and bool, and about unused variable isL.
llvm-svn: 20697
2005-03-19 22:36:39 +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 4037048300 Make each scalar map contain a reference to an equivalence class of global
variables.  Do not insert a global into the scalar map unless it is the
leader of its equivalence class.

llvm-svn: 20695
2005-03-19 22:13:13 +00:00
Chris Lattner 1ce80fb008 Each DS collection now contains an equivalence class of globals values.
llvm-svn: 20694
2005-03-19 22:12:33 +00:00
Chris Lattner 6c5b90f36c add a method to clear globals from a node
llvm-svn: 20693
2005-03-19 22:12:03 +00:00
Chris Lattner 300dc0bc90 Two fixes for the copy ctor/operator=:
1. Make sure to clear() 'this' before adding elements to it
  2. Make sure that the leaders of the RHS EC are the leaders of the LHS EC.

llvm-svn: 20692
2005-03-19 21:02:12 +00:00
Chris Lattner 325f234d79 add some methods, fix a major bug in getLeader() that was causing things to
not be unified correctly.

llvm-svn: 20691
2005-03-19 20:42:43 +00:00
Chris Lattner e6364c2702 implement a proper copy ctor, operator= and add a helper method.
llvm-svn: 20690
2005-03-19 19:26:14 +00:00
Chris Lattner 484bfc4d26 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 9160d5fd8b Add new function getPtrPtrFromArrayPtr().
llvm-svn: 20684
2005-03-19 11:40:31 +00:00
Alkis Evlogimenos 1a48561432 Stop using deprecated interface.
llvm-svn: 20679
2005-03-19 09:22:17 +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 c3256647e7 Rewrite this class, making the following improvements:
1. It now actually uses tarjan's algorithm, so it is a efficient inverse
     ackerman's function for union operations, not linear time.
  2. It now stores one copy of the data in the set instead of two.
  3. It now works for elements other than pointers.
  4. It now has a more STL-like interface that exposes iterators instead
     of internal implementation details.

llvm-svn: 20677
2005-03-19 05:14:29 +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 bed9657ff6 remove use of getPrev() and getNext() on ilist nodes.
llvm-svn: 20673
2005-03-18 16:12:37 +00:00
Chris Lattner e29503a805 expose this pass to both opt and analyze
llvm-svn: 20672
2005-03-18 05:27:57 +00:00
Misha Brukman f12594d56f We shall have IA64 as a new experimental backend released with LLVM 1.5
llvm-svn: 20671
2005-03-18 00:48:56 +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 49ec9eeede add 3 methods
llvm-svn: 20667
2005-03-17 23:45:35 +00:00
Misha Brukman 72c27e6112 Recognize an IA64 when we see one
llvm-svn: 20666
2005-03-17 20:56:22 +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
Duraid Madina 8a3aa43422 typo/denial
llvm-svn: 20663
2005-03-17 20:23:27 +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
Duraid Madina df642ff2ae clean up warnings when building in release mode
llvm-svn: 20658
2005-03-17 19:00:40 +00:00
Duraid Madina bf01370fc3 now the angry bug reports have somewhere to go!
llvm-svn: 20657
2005-03-17 18:57:02 +00:00
Chris Lattner 206f2ecaf2 statically link ia64 into llc
llvm-svn: 20656
2005-03-17 18:39:06 +00:00