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

17911 Commits

Author SHA1 Message Date
Jeff Cohen
c5c4aa7911 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
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
5fc6764893 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
f279754707 Each DS collection now contains an equivalence class of globals values.
llvm-svn: 20694
2005-03-19 22:12:33 +00:00
Chris Lattner
09ef2499f6 add a method to clear globals from a node
llvm-svn: 20693
2005-03-19 22:12:03 +00:00
Chris Lattner
19068b431e 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
d9b3369aa9 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
e4d74b8d85 implement a proper copy ctor, operator= and add a helper method.
llvm-svn: 20690
2005-03-19 19:26:14 +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
b3103a3768 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
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
Misha Brukman
83083ec46a 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
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
ea7615d853 add 3 methods
llvm-svn: 20667
2005-03-17 23:45:35 +00:00
Misha Brukman
9851f41670 Recognize an IA64 when we see one
llvm-svn: 20666
2005-03-17 20:56:22 +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
Duraid Madina
ad26d89f4a typo/denial
llvm-svn: 20663
2005-03-17 20:23:27 +00:00
Chris Lattner
5368664b75 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
430c826ae1 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
44cbb1f79f 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
341917d75b clean up warnings when building in release mode
llvm-svn: 20658
2005-03-17 19:00:40 +00:00
Duraid Madina
be2487fbcc now the angry bug reports have somewhere to go!
llvm-svn: 20657
2005-03-17 18:57:02 +00:00
Chris Lattner
f02e163076 statically link ia64 into llc
llvm-svn: 20656
2005-03-17 18:39:06 +00:00
Duraid Madina
0b84eec44b OK, IA64 is statically linked into llc
llvm-svn: 20655
2005-03-17 18:37:05 +00:00
Duraid Madina
08bd58412a build the IA64 target as a .so for now
llvm-svn: 20654
2005-03-17 18:29:04 +00:00
Duraid Madina
8b010ff8d2 dainty
llvm-svn: 20653
2005-03-17 18:23:22 +00:00
Duraid Madina
79022e1b87 and so it begins...
PHASE 1: write instruction selector
PHASE 2: ???
PHASE 3: profit!

llvm-svn: 20652
2005-03-17 18:17:03 +00:00
Chris Lattner
79ba9d58fd Don't emit two comparisons when comparing a FP value against zero!
llvm-svn: 20651
2005-03-17 16:29:26 +00:00
Chris Lattner
50a8d2ea43 spiff up the nightly tester output one more notch
llvm-svn: 20650
2005-03-17 16:07:45 +00:00
Chris Lattner
c9a3ea81bf 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
1a8b3193af 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
b193c0854c Fix a bug where we would consider " .99" and "1.0" different because of the
leading whitespace.

llvm-svn: 20647
2005-03-17 04:49:04 +00:00
Chris Lattner
e0b373b2c3 remove compat_iterator, which is dead in the tree.
llvm-svn: 20644
2005-03-16 22:42:45 +00:00
Chris Lattner
46930f8df5 remove use of compat_iterator.
llvm-svn: 20643
2005-03-16 22:42:19 +00:00
Chris Lattner
0332fdf1d9 remove use of compat_iterator
llvm-svn: 20642
2005-03-16 22:42:01 +00:00
Chris Lattner
282fa1268c Print out who commits and what files were modified at the bottom of the test summary log sent to llvm-commits.
llvm-svn: 20641
2005-03-16 17:09:53 +00:00
Jeff Cohen
0927944d4a Do #include HashExtras.h with VC++
llvm-svn: 20640
2005-03-16 05:49:58 +00:00
Jeff Cohen
b169eae709 Don't provide default hash struct instantiation.
llvm-svn: 20639
2005-03-16 05:49:06 +00:00
Misha Brukman
674bbc7112 Convert tabs to spaces
llvm-svn: 20638
2005-03-16 05:42:00 +00:00
Jeff Cohen
f52b95ac20 Add adapter class to let VC++ hash_map use GCC's hash struct.
llvm-svn: 20637
2005-03-16 05:25:09 +00:00