Commit Graph

487 Commits

Author SHA1 Message Date
Chris Lattner
c420ab6c25 When building local graphs, clone the initializer for constant globals into each
local graph that uses the global.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11850 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:31:02 +00:00
Chris Lattner
51c06abbf1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11848 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:08:00 +00:00
Chris Lattner
52fc8d7ec9 Add a bunch more functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:06:40 +00:00
Chris Lattner
153f24070c Try harder to get symbol info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11846 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 23:06:30 +00:00
Chris Lattner
adc1efe81c Add a bunch more functions used by perlbmk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11824 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 17:43:20 +00:00
Chris Lattner
39bb2dc557 Add support for 'rename'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11813 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 22:17:00 +00:00
Chris Lattner
d561209a47 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11810 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-24 22:02:48 +00:00
Chris Lattner
0ad9170327 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11695 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 00:53:54 +00:00
Chris Lattner
d85645f526 Fix an iterator invalidation problem which was causing some nodes to not be
correctly merged over!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11693 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 22:28:26 +00:00
Chris Lattner
5171115cf3 Use handy method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11692 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 22:27:31 +00:00
Chris Lattner
3567937f16 Instead of cloning the globals for main into the globals graph at the end of
BU propagation, clone the globals into the GG of EACH FUNCTION that finishes
processing!  The GlobalsGraph *must* include all globals and effects from
all functions in the program.  Fixing this makes pool allocation work better
on 175.vpr, but it still ultimately crashes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11686 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 00:30:28 +00:00
Chris Lattner
d10b5fd395 There is no need to merge the globals graph into the function graphs at the
end of the BU and CBU passes.  The globals will be marked incomplete, so it
doesn't matter if they are missing some info, and merging isn't guaranteed
to bring everything in anyway!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11684 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 23:52:15 +00:00
Chris Lattner
4e46e320a5 Add two missing returns, which caused us to be very pessimistic about the
printf and scanf families!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11683 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 23:27:09 +00:00
Chris Lattner
8ecc27e667 Add support for some string functions, the scanf family, and sprintf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11673 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 20:27:11 +00:00
Chris Lattner
28a631d37e When we complete the bottom-up pass, make sure to merge the globals in 'main' into
the globals graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11562 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 19:06:47 +00:00
Chris Lattner
304e143b16 Only spit out warning for functions that take pointers, not for sin and the like
Add more special case handling for stdio functions.  I feel dirty, how about you?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11506 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-16 22:57:19 +00:00
Chris Lattner
eee33b2691 memset and bcopy and now unified by the llvm.memset intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11503 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-16 18:37:40 +00:00
Chris Lattner
896481eaa8 No need to scan zero initializers. This should make DSA a bit faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11471 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 05:53:42 +00:00
Chris Lattner
339d8df4c0 Add support for a bunch more functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 21:21:48 +00:00
Chris Lattner
68300db685 Add support for fopen/fclose. Specifically with fopen, we were marking all of the
operands as incomplete, though fopen is known to only read them.  This just adds
fclose for symmetry, though it doesn't gain anything.  This makes the dsgraphs for
181.mcf much more precise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11390 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 20:05:32 +00:00
Chris Lattner
a07b72ff3d Restructure code to handle memcpy/memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11374 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 16:09:54 +00:00
Chris Lattner
d21cd809b6 Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-09 04:37:31 +00:00
Chris Lattner
2dea8d65bc Add one that I missed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11179 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:53:10 +00:00
Chris Lattner
c3f5f7701f Instead of callign removeTriviallyDeadNodes on the global graph every time
removeDeadNodes is called, only call it at the end of the pass being run.
This saves 1.3 seconds running DSA on 177.mesa (5.3->4.0s), which is
pretty big.  This is only possible because of the automatic garbage
collection done on forwarding nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11178 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:51:48 +00:00
Chris Lattner
cd90f21c0c Remove another unneeded call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11177 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:40:40 +00:00
Chris Lattner
cadfac6879 This call is no longer needed now that merging does not produce garbage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11176 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:38:34 +00:00
Chris Lattner
4ff0b9636d Substantially improve the DSA code by removing 'forwarding' nodes from
DSGraphs while they are forwarding.  When the last reference to the forwarding
node is dropped, the forwarding node is autodeleted.  This should simplify
removeTriviallyDead nodes, and is only (efficiently) possible because we are
using an ilist of dsnodes now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11175 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:27:18 +00:00
Chris Lattner
9857c1a6ae Bugfix for ilist conversion. The ilist wants to make an 'end' node which has
G == 0


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11174 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 01:05:37 +00:00
Chris Lattner
28897e1784 Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11173 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:53:26 +00:00
Chris Lattner
9fd37ba721 Change to use node_iterators instead of direct access to Nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11171 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:23:16 +00:00
Chris Lattner
e92e76446e getNodes() is gone, use node_begin/end instead
Rename stats from dsnode -> dsa
Add a new stat


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11167 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 23:58:05 +00:00
Chris Lattner
a84c681637 getNodes() is gone
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11166 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 23:57:26 +00:00
Chris Lattner
a5ca28cafe There is no need to clone over nodes that are going to be dead anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11157 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 22:00:03 +00:00
Chris Lattner
a67138ddff Avoid referencing deleted DSgraphs when merging an SCC into a larger SCC. This
fixes the crash in 176.gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11033 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-31 21:02:18 +00:00
Chris Lattner
92e41d5982 Forward method request to chained aa implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:20:55 +00:00
Chris Lattner
ead9eb75d7 Fix a bug aflicting 265.gap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11006 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-29 08:36:22 +00:00
Chris Lattner
17a93e2e1b Minor bugfixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-29 03:32:15 +00:00
Chris Lattner
62482e5649 Rename DSGraph::ScalarMapTy -> DSScalarMap
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 09:15:42 +00:00
Chris Lattner
28da03b0fe Fix a bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11000 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 03:31:34 +00:00
Chris Lattner
a3fd88d01f Eliminate the call to removeTriviallyDeadNodes from updateFromGlobals graph,
moving it to the start of removeDeadNodes.  This speeds up DSA by 2s on perlbmk
from 41s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10999 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 03:24:41 +00:00
Chris Lattner
6d8f3dcd75 In the TD pass, iterate over globals directly instead of through the whole scalar
map.  This saves 5s in the TD pass, from 22->17s on perlbmk


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10998 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 03:12:48 +00:00
Chris Lattner
34741cf0dd In the TD pass, don't iterate over the scalar map to find the globals, iterate over
the globals directly.  This doesn't save any substantial time, however, because the
globals graph only contains globals!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10997 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 03:07:30 +00:00
Chris Lattner
bdce7b7844 In updateFromGlobalsGraph, instead of iterating over all of the scalars in the
function to find the globals, iterate over all of the globals directly.  This
speeds the function up from 14s to 6.3s on perlbmk, reducing DSA time from
53->46s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10996 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 03:03:06 +00:00
Chris Lattner
a88a55cf10 Minor tweaks, eliminate useless integer pruning optimziation, turn on
timers by default


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10993 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 02:41:32 +00:00
Chris Lattner
239644dc3b Further reduce the number of nodes cloned with getClonedNH, using merge instead.
This reduces the number of nodes allocated, then immediately merged and DNE'd
from 2193852 to 1298049.  unfortunately this only speeds DSA up by ~1.5s (of
53s), because it's spending most of its time waddling through the scalar map :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10992 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 02:11:49 +00:00
Chris Lattner
00948c05b2 Add a timer, fix a minor bug.
Also, use RC::merge when possible, reducing the number of nodes allocated, then immediately merged away from 2985444 to 2193852 on perlbmk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10991 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 02:05:05 +00:00
Chris Lattner
64507e39da Another bugfix, disable "spurious" output.
You gotta love spurious


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10990 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 01:19:52 +00:00
Chris Lattner
352e31f572 fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10989 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 22:54:56 +00:00
Chris Lattner
0b14487591 * Add a new commandline argument to control the "global roots hack". Default
it to be off.  If it looks like it's completely unnecessary after testing, I
  will remove it completely (which is the hope).
* Callers of the DSNode "copy ctor" can not choose to not copy links.
* Make node collapsing not create a garbage node in some cases, avoiding a
  memory allocation, and a subsequent DNE.
* When merging types, allow two functions of different types to be merged
  without collapsing.
* Use DSNodeHandle::isNull more often instead of DSNodeHandle::getNode() == 0,
  as it is much more efficient.
*** Implement the new, more efficient reachability cloner class
    In addition to only cloning nodes that are reachable from interesting
    roots, this also fixes the huge inefficiency we had where we cloned lots
    of nodes, only to merge them away immediately after they were cloned.
    Now we only actually allocate a node if there isn't one to merge it into.
* Eliminate the now-obsolete cloneReachable* and clonePartiallyInto methods
* Rewrite updateFromGlobalsGraph to use the reachability cloner
* Rewrite mergeInGraph to use the reachability cloner
* Disable the scalar map scanning code in removeTriviallyDeadNodes.  In large
  SCC's, this is extremely expensive.  We need a better data structure for the
  scalar map, because we really want to scan the unique node handles, not ALL
  of the scalars.
* Remove the incorrect SANER_CODE_FOR_CHECKING_IF_ALL_REFERRERS_ARE_FROM_SCALARMAP code.
* Move the code for eliminating integer nodes from the trivially dead
  eliminator to the dead node eliminator.
* removeDeadNodes no longer uses removeTriviallyDeadNodes, as it contains a
  superset of the node removal power.
* Only futz around with the globals graph in removeDeadNodes if it is modified


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10987 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 22:03:40 +00:00
Chris Lattner
f325e3981e Rewrite to use the reachability cloner interface. Also, make this much more
efficient in the case where a function calls into the same graph multiple times
(ie, it either contains multiple calls to the same function, or multiple calls
to functions in the same SCC graph)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 21:53:14 +00:00
Chris Lattner
02da032b03 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 21:51:19 +00:00
Chris Lattner
825a02ae36 Get clone flags right, so we don't build InlinedGlobals only to clear them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 21:50:41 +00:00
Chris Lattner
091f776081 Initial support for implementing clonePartiallyInto in terms of cloneReachableSubgraph, though this support is currently disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10970 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 01:44:53 +00:00
Chris Lattner
2f561384fb Eliminated the CompletedNodes argument to the cloneReachable* methods. This
map was only used to implement a marginal GlobalsGraph optimization, and it
actually slows the analysis down (due to the overhead of keeping it), so just
eliminate it entirely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10955 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 16:56:13 +00:00
Chris Lattner
93ddd7ea10 Ok, I'm tired of pulling out all my timers to check stuff in, just do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10954 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 16:36:28 +00:00
Chris Lattner
5254a8dda8 Bug fix: X.mergeWith(Y) was not updating Y if Y was a null node handle!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 16:31:08 +00:00
Chris Lattner
4c6cb7a2b1 Start implementing DSGraph::clonePartiallyInto and implement mergeInGraph
in terms of it.

Though clonePartiallyInto is not cloning partial graphs yet, this change
dramatically speeds up inlining of graphs with many scalars.  For example,
this change speeds up the BU pass on 253.perlbmk from 69s to 36s, because
it avoids iteration over the scalar map, which can get pretty large.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10951 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 15:30:58 +00:00
Chris Lattner
4a85776993 Allow disabling of ALL printing overhead when performing timings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 13:42:43 +00:00
Chris Lattner
fa3711a0f8 Do not depend on index type to determine whether it is a structure or sequential index
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10221 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 20:19:55 +00:00
Chris Lattner
1e2385b941 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10138 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 21:54:22 +00:00
Chris Lattner
179bc7dcb1 Implement a small optimization to handling of GEP's that are equivalent to casts.
This results in substantially reduced collapsing for some testcases


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-14 17:09:46 +00:00
Chris Lattner
a366c98077 Trying to get the dsgraph for an external function is bad for DSA's health
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9979 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 18:48:11 +00:00
Chris Lattner
79390d48d0 Implement the CompleteBU pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9964 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 05:05:41 +00:00
Chris Lattner
6acfe92b32 Minor code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9962 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 05:04:19 +00:00
Chris Lattner
a190766a54 Disable integer tracking by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9960 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 03:10:49 +00:00
Chris Lattner
95724a4aec Add an initial version of the CompleteBUDataStructures class, which is currently
identical to the BU pass, but has an accurate call graph


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9956 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 01:43:00 +00:00
Chris Lattner
9a92729581 Fine-grainify namespaces for this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9948 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 23:11:14 +00:00
Chris Lattner
afc1dbafb4 Add new argument to disable checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9922 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 17:58:22 +00:00
Chris Lattner
d8ea8a5027 Print return nodes for graphs with multiple functions in them correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9914 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:58:19 +00:00
Chris Lattner
9dc4185763 Don't crash if no gg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9913 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:57:58 +00:00
Chris Lattner
c5f0afad2c Cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9907 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 00:40:34 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
413406c068 Compute node offsets correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9895 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 20:12:32 +00:00
Chris Lattner
400433dfea Add new method for computing node mappings. This is used by the pool allocator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9880 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 05:08:59 +00:00
Chris Lattner
67ce57ac49 Add support for memmove
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9824 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 03:32:52 +00:00
Chris Lattner
fb8c61056f Handle bzero and memset in the local analysis, because we were missing the fact
that memset returns its argument!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9811 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 21:55:50 +00:00
Chris Lattner
492dda9fd5 This doesn't use DSCallSiteIterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9809 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-08 21:17:37 +00:00
Chris Lattner
0271345368 Fix name collision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9722 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 05:55:45 +00:00
Chris Lattner
15869aa2c7 All DSGraphs keep a reference to the targetdata they are created with. This is
used to eliminate the hard coded, hacked in, sparc specific, global TargetData.
Changing the TargetData used to actually match the code fixes problems, and
eliminates a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9659 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 22:27:28 +00:00
Chris Lattner
dbfe36e51e Fix bug: test/Regression/Analysis/DSGraph/2003-11-02-NodeCollapsing.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9658 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 21:02:20 +00:00
John Criswell
856ba76200 Added LLVM copyright header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 15:17:13 +00:00
John Criswell
e488e9360b Added LLVM copyright notice to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9312 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:26:57 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Alkis Evlogimenos
b5c1af4773 Use std::string::size_type for for ColonPos to stop gcc from giving a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8811 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 22:49:22 +00:00
Chris Lattner
fbc2d84ce9 DOn't crash if program calls the null pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8708 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-24 23:42:58 +00:00
Chris Lattner
11fc9301fb Functions reachable from the arguments of unresolvable call nodes should
not have their arguments marked complete


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 23:58:33 +00:00
Chris Lattner
ec157b7cde The Globals graph must become complete at the end of the BU phase!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8638 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 23:27:05 +00:00
Chris Lattner
3b0a9be238 Do not mark incoming arguments to functions complete if the function is pointed to by a global in the globals graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8637 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 22:24:04 +00:00
Chris Lattner
26c4fc3b69 Make sure to add global variable initializers to the Globals graph!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 21:48:16 +00:00
Chris Lattner
9970bf6288 Don't consider incomplete nodes to be typesafe!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8635 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 21:48:01 +00:00
Chris Lattner
bab8c28924 Remove trivially dead nodes was not removing nodes that were dead due to forwarding!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8634 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 21:34:07 +00:00
Chris Lattner
894263bc9f Add special case handling for calloc and realloc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8630 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:50:46 +00:00
Chris Lattner
808a7aeec7 Switch from using CallInst's to represent call sites to using the LLVM
CallSite class.  Now we can represent function calls by invoke instructions
too!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8629 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:34:13 +00:00
Chris Lattner
192cd9cccd Make this work better for constants that aren't necessarily in ANY graph, such as null pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8628 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 16:12:57 +00:00
Chris Lattner
7892549796 Keep track of the number of typed/untyped memory accesses theyre are in the program
VS: ----------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 01:20:46 +00:00
Misha Brukman
2f2d06506c Fixed spelling and grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8478 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 18:14:24 +00:00
Chris Lattner
758fefc0f0 Final cleanup: remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 18:01:36 +00:00
Chris Lattner
273328e8e0 Not only is this a lot smaller, it actually works if there is already a
function with the right name in the module.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8290 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:53:46 +00:00
Chris Lattner
09a670587a If "These should be used only by the auto-parallelization pass", we might as
well put them INTO the auto-par pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8288 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 16:49:38 +00:00