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

824 Commits

Author SHA1 Message Date
Chris Lattner
bb08e801d4 Fix a couple of minor problems. Because PHI nodes can use themselves, this
could cause infinite loops.  Also, getUnderlyingObject can return null

llvm-svn: 12351
2004-03-12 23:12:55 +00:00
Chris Lattner
6bd3783ef8 Implement mod/ref analysis for a trivial case where locals don't escape.
This comes up when you have a local array on the stack and you never pass
the address of elements around.

llvm-svn: 12349
2004-03-12 22:39:00 +00:00
Misha Brukman
ffcf81a11b Simplify code to process CallSites (thanks to Chris).
llvm-svn: 12334
2004-03-12 16:20:49 +00:00
Misha Brukman
b5e89d17c2 Evaluate ModRef information in addition to regular ol' pointer analysis.
llvm-svn: 12331
2004-03-12 06:15:08 +00:00
Misha Brukman
ee27e80a0b Implement getModRefInfo() for DSA to calculate whether a function modifies or
references a pointer.

llvm-svn: 12330
2004-03-12 06:14:22 +00:00
Misha Brukman
da119ce857 Make code more readable.
llvm-svn: 12305
2004-03-12 00:58:41 +00:00
Chris Lattner
405790ecae Fix PR284: [indvars] Induction variable analysis violates LLVM invariants
llvm-svn: 12275
2004-03-10 21:42:19 +00:00
Chris Lattner
9ce3638433 implement new method
llvm-svn: 12264
2004-03-09 19:37:06 +00:00
Chris Lattner
9414c55663 Switch to using edge profiling information as the basic source of profile info
from using basic block counts.

llvm-svn: 12242
2004-03-08 22:04:08 +00:00
Chris Lattner
83c62c84d6 Refactor implementations
llvm-svn: 12240
2004-03-08 21:30:35 +00:00
Chris Lattner
91ea0d3176 Import the trace class from the reoptimizer
llvm-svn: 12236
2004-03-08 20:57:27 +00:00
Chris Lattner
de661f7219 If we have edge counts, we can produce block counts. I've verified that
using an edge profile to produce block counts gives the exact same numbers
as using a block count directly.

llvm-svn: 12232
2004-03-08 20:03:52 +00:00
Chris Lattner
f3a838662e Add initial support for reading edge counts. This will be improved to enable
translation of edge counts into block/function counts when possible.

llvm-svn: 12229
2004-03-08 18:20:18 +00:00
Chris Lattner
1ae4150e31 Fix a bug handling globals that are constants, but are still external
llvm-svn: 12208
2004-03-08 03:52:24 +00:00
Chris Lattner
5a9cae47a4 Fix a minor bug
llvm-svn: 12169
2004-03-05 22:04:07 +00:00
Misha Brukman
75729872be Unbreak the build on Sparc.
llvm-svn: 12161
2004-03-05 20:04:40 +00:00
Chris Lattner
f21e7a75d6 Fix a bug in a previous checkin that broke 175.vpr
llvm-svn: 12128
2004-03-04 21:36:57 +00:00
Chris Lattner
c885697daa Add support for strto* and v*printf
llvm-svn: 12127
2004-03-04 21:03:54 +00:00
Chris Lattner
48b0fd7101 Add non-crappy support for varargs
llvm-svn: 12126
2004-03-04 20:33:47 +00:00
Chris Lattner
ac1eaa43fa Implement a FIXME, improving the efficiency of DSA on povray.
This reduces CBU time from 145s -> 122s (debug build), reduces # allocated nodes
from 129420 to 116477.

llvm-svn: 12125
2004-03-04 19:47:04 +00:00
Chris Lattner
e3fc09a37e Speed up the cbu pass from taking somewhere near the age of the universe to about 90s on povray
llvm-svn: 12123
2004-03-04 19:16:35 +00:00
Chris Lattner
bc7fc82865 Fix BU datastructures with povray!
The problem was that we were merging a field of a node with a value that was
deleted.  Thanks to bugpoint for reducing povray to a nice small 3 function
example.  :)

llvm-svn: 12116
2004-03-04 17:06:53 +00:00
Chris Lattner
e0c90cf983 Minor changes, remove some debugging code that got checked in somehow.
Make sure to scope the NodeMap passed into cloneInto so that it doesn't point
to nodes that are deleted.  Add some FIXME's for future performance enhancements.

llvm-svn: 12115
2004-03-04 17:05:28 +00:00
Chris Lattner
790bd9d970 Only clone nodes that are needed in the caller, don't clone ALL aux calls. This improves
povray from having ~600K nodes and 300K call nodes to 65K nodes and 25K call nodes.

llvm-svn: 12109
2004-03-04 03:57:53 +00:00
Chris Lattner
a141de0f09 Fix a minor bug handling incomplete programs
llvm-svn: 12105
2004-03-03 23:00:19 +00:00
Chris Lattner
0e1cd00f2c Fix a DSA bug that caused DSA to generate incredibly huge graphs and take forever to
do it on povray.  The problem is that we were not copying globals from callees to
callers unless the existed in both graphs.  We should have copied them in the case
where the global pointed to a node that was copied as well.

llvm-svn: 12104
2004-03-03 22:01:09 +00:00
Chris Lattner
a6540122dc Deinline methods, add fast exit
llvm-svn: 12102
2004-03-03 20:55:27 +00:00
Chris Lattner
309a57f0c0 Fix a node mapping problem that was causing the pool allocator to locally allocate
nodes that were globally live, thus breaking programs.

llvm-svn: 12094
2004-03-03 05:34:31 +00:00
Chris Lattner
ea4242a575 FINALLY be able to get symbolic type names in the globals graph!
llvm-svn: 12082
2004-03-02 21:39:43 +00:00
Chris Lattner
833646d6b8 Really, only if reopen
llvm-svn: 12080
2004-03-02 20:46:18 +00:00
Chris Lattner
e7c638e989 Correctly add an array marker on a node when appropriate!
llvm-svn: 12055
2004-03-01 19:02:54 +00:00
Chris Lattner
9bf85f216b Expand on my note-to-self
llvm-svn: 12029
2004-03-01 02:44:44 +00:00
Chris Lattner
9e71c09ff5 Only clone global nodes between graphs if both graphs have the global.
llvm-svn: 11928
2004-02-27 20:05:15 +00:00
Chris Lattner
138a7dfb62 ADD MORE FUNCTIONS!
llvm-svn: 11927
2004-02-27 20:04:48 +00:00
Chris Lattner
d359fbf991 Be a good little compiler and handle direct calls efficiently, even if there
are beastly ConstantPointerRefs in the way...

llvm-svn: 11883
2004-02-26 22:07:22 +00:00
Chris Lattner
9e55e31b2d Fix typo
llvm-svn: 11864
2004-02-26 03:45:03 +00:00
Chris Lattner
7990e4dcd0 The node doesn't have to be _no_ node flags, it just has to be complete and
not have any globals.

llvm-svn: 11863
2004-02-26 03:43:43 +00:00
Chris Lattner
948fffa8a2 Add _more_ functions
llvm-svn: 11862
2004-02-26 03:43:08 +00:00
Chris Lattner
9fd0c48f80 Two changes:
1. Functions do not make things incomplete, only variables
 2. Constant global variables no longer need to be marked incomplete, because
    we are guaranteed that the initializer for the global will be in the
    graph we are hacking on now.  This makes resolution of indirect calls happen
    a lot more in the bu pass, supports things like vtables and the C counterparts
    (giant constant arrays of function pointers), etc...

Testcase here: test/Regression/Analysis/DSGraph/constant_globals.ll

llvm-svn: 11852
2004-02-25 23:36:08 +00:00
Chris Lattner
7d273bc532 When building local graphs, clone the initializer for constant globals into each
local graph that uses the global.

llvm-svn: 11850
2004-02-25 23:31:02 +00:00
Chris Lattner
9fe3bf296d Simplify the dead node elimination stuff
Make the incompleteness marker faster by looping directly over the globals
instead of over the scalars to find the globals

Fix a bug where we didn't mark a global incomplete if it didn't have any
outgoing edges.  This wouldn't break any current clients but is still wrong.

llvm-svn: 11848
2004-02-25 23:08:00 +00:00
Chris Lattner
a9f67b5ab8 Add a bunch more functions
llvm-svn: 11847
2004-02-25 23:06:40 +00:00
Chris Lattner
d99d965f8c Try harder to get symbol info
llvm-svn: 11846
2004-02-25 23:06:30 +00:00
Chris Lattner
4f09004dff Add a bunch more functions used by perlbmk
llvm-svn: 11824
2004-02-25 17:43:20 +00:00
Chris Lattner
9036c86b14 Add support for 'rename'
llvm-svn: 11813
2004-02-24 22:17:00 +00:00
Chris Lattner
d9652be664 Add support for remove, fwrite, and fread
Also fix problem where we didn't check to see if a node pointer was null.
Though fclose(null) doesn't make a lot of sense, 300.twolf does it.

llvm-svn: 11810
2004-02-24 22:02:48 +00:00
Chris Lattner
63b79422f3 Fix a soon-to-be-missing #include
llvm-svn: 11707
2004-02-22 06:26:17 +00:00
Chris Lattner
573441bfbd Use isNull instead of getNode() to test for existence of a node, this is cheaper.
FIX MAJOR BUG, whereby we didn't merge null edges correctly. Correcting this
fixes poolallocation on 175.vpr, and possibly others.

llvm-svn: 11695
2004-02-22 00:53:54 +00:00
Chris Lattner
7bff00313e Fix an iterator invalidation problem which was causing some nodes to not be
correctly merged over!

llvm-svn: 11693
2004-02-21 22:28:26 +00:00
Chris Lattner
458704f675 Use handy method
llvm-svn: 11692
2004-02-21 22:27:31 +00:00