Commit Graph

794 Commits

Author SHA1 Message Date
Chris Lattner
e735b2de30 Fix a soon-to-be-missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11707 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-22 06:26:17 +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
d6a556b3fd Cosmetic improvements to this option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11331 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 19:14:04 +00:00
Chris Lattner
945871df86 Actually load profiling information now! Block layout can use real, live,
actual profile info, and works!  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11324 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 18:21:05 +00:00
Chris Lattner
c6fca42a66 Fix a typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11323 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 18:20:41 +00:00
Chris Lattner
ecefc96f05 Fix copy-and-pastos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11319 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 06:10:18 +00:00
Chris Lattner
927fec3c38 Add skeleton profileinfoloader pass. This will be enhanced to actually LOAD
a profile tommorow.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11318 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 06:10:05 +00:00
Chris Lattner
bc44aa61c4 Factor this code out of llvm-prof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11314 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 05:54:25 +00:00
Chris Lattner
b060194a70 Make sure to register the 'no profile' implementation as the default for ProfileInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11309 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 04:47:54 +00:00
Chris Lattner
40c5767b70 Simplify implementation, and probably speed things up too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11308 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 03:57:16 +00:00
Chris Lattner
171de656eb An initial implementation of an LLVM ProfileInfo class which is designed to
eventually allow Passes to use profiling information to direct them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 22:11:42 +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
3b303d91d7 In a "seeing the forest through the trees" kinda situation, I realized that a
complete rewrite of load-vn will make it a bit faster.  This changes speeds up
the gcse pass (which uses load-vn) from 25.45s to 0.42s on the testcase in
PR209.

I've also verified that this gives the exact same results as the old one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-05 17:20:00 +00:00
Chris Lattner
57ef9a2392 This is a big diff with no functionality change. We just reorder some code,
which causes big reindentation.  While I'm at it, I fix the fixme by removing
some dead code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11131 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-05 05:56:23 +00:00
Chris Lattner
270db367e0 finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11130 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-05 05:51:40 +00:00
Tanya Lattner
1ad5bc5616 Fixed Chris' typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11128 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-05 04:45:21 +00:00
Chris Lattner
adf9b90411 Implement optimizations for handling large basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11126 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-05 00:36:43 +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
a4dd6743e7 Fix thinko
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11027 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:48:02 +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
bc1daaa8bb Implement the pointsToConstantMemory() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11022 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:17:24 +00:00
Chris Lattner
f4d904d7e3 Improve mod/ref information based on the pointsToConstantMemory method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11021 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:16:42 +00:00
Misha Brukman
10d208d7b1 Order #includes alphabetically, per style guide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11015 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 17:26:24 +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