1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 22:42:46 +02:00
Commit Graph

468 Commits

Author SHA1 Message Date
Chris Lattner
275dd432ab Add two new methods which can be used to enable a bunch of transformations
in common cases.

llvm-svn: 12407
2004-03-15 01:58:54 +00:00
Misha Brukman
6ed546e3d2 Doxygenified and cleand up comments.
llvm-svn: 12294
2004-03-11 23:08:20 +00:00
Chris Lattner
2fef10e580 new method
llvm-svn: 12263
2004-03-09 19:36:59 +00:00
Chris Lattner
bf888377d5 Switch over to using edge profile information as the basic profiling representation,
from basic block counts.

llvm-svn: 12241
2004-03-08 22:03:45 +00:00
Chris Lattner
3b0551752b We don't want to make this a pure interface, as it makes all implementors
bear the burden of implementing what will be all exactly the same methods.
They just want to provide the information in differing ways.

llvm-svn: 12239
2004-03-08 21:30:18 +00:00
Chris Lattner
09255cd709 Rearrange some methods, implement the dominates method
llvm-svn: 12237
2004-03-08 21:07:12 +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
525635b764 Add support for representing edge counts
llvm-svn: 12228
2004-03-08 18:19:37 +00:00
Chris Lattner
fb8eb94027 Rename method, add new method
llvm-svn: 12103
2004-03-03 22:00:20 +00:00
Chris Lattner
43d5238d45 De-inline methods
llvm-svn: 12101
2004-03-03 20:55:15 +00:00
Chris Lattner
ed70152b7d Add new method
llvm-svn: 12056
2004-03-01 19:36:50 +00:00
Chris Lattner
176413cedb Fix the "partial pool allocator" on em3d and others. The problem is that
DSNodes, unlike other GraphTraits nodes, can have null outgoing edges, and
df_iterator doesn't take this into consideration.  As a workaround, the
successor iterator now handles null nodes and 'indicates' that null has
no successors.

llvm-svn: 12025
2004-03-01 01:42:26 +00:00
Misha Brukman
13230a9e07 Doxygenify comments.
llvm-svn: 12015
2004-02-29 23:55:11 +00:00
Chris Lattner
7906b0bc03 Update comments and add warning
llvm-svn: 11691
2004-02-21 22:27:20 +00:00
Chris Lattner
1316ee07fa Add a method useful for updating DSA
llvm-svn: 11636
2004-02-19 21:27:50 +00:00
Chris Lattner
19d997875e Add an important prototype
llvm-svn: 11320
2004-02-11 06:11:06 +00:00
Chris Lattner
427c8ee657 Factor this code out of llvm-prof
llvm-svn: 11314
2004-02-11 05:54:25 +00:00
Chris Lattner
a81258a786 An initial implementation of an LLVM ProfileInfo class which is designed to
eventually allow Passes to use profiling information to direct them.

llvm-svn: 11294
2004-02-10 22:11:42 +00:00
Chris Lattner
b38552cf42 Remove some unneeded stuff
llvm-svn: 11286
2004-02-10 21:19:49 +00:00
Chris Lattner
32a3eb0b88 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.

llvm-svn: 11175
2004-02-08 01:27:18 +00:00
Chris Lattner
29067016a4 Switch the Nodes list from being an std::vector<DSNode*> to an ilist<DSNode>
llvm-svn: 11173
2004-02-08 00:53:26 +00:00
Chris Lattner
e78429de24 Change to use iterators instead of direct access
llvm-svn: 11170
2004-02-08 00:22:41 +00:00
Chris Lattner
48a0d7e1c0 Abstract out the Nodes collection. Instead of providing a getNodes() method,
provide node_begin/end iterators, which are only guaranteed to be
bidirectional, not random access.

llvm-svn: 11165
2004-02-07 23:57:09 +00:00
Chris Lattner
2199bb0c7a Actually USE isForwarding method
llvm-svn: 11160
2004-02-07 23:02:32 +00:00
Chris Lattner
6337300b83 As Alkis pointed out to me, I forgot to commit this... :(
llvm-svn: 11159
2004-02-07 22:54:19 +00:00
Chris Lattner
bb4d6f00f9 Add a new pointsToConstantMemory method to the AliasAnalysis interface
which can be implemented to improve the quality of mod-ref information.

llvm-svn: 11020
2004-01-30 22:15:41 +00:00
Misha Brukman
64f7595915 Doxygenify comments.
llvm-svn: 11014
2004-01-30 17:22:50 +00:00
Chris Lattner
fc239578ad Keep track of all of the globals inserted into the scalar map
llvm-svn: 10995
2004-01-28 03:01:22 +00:00
Chris Lattner
268db40292 Pull the ScalarMap out into something that is more structured than what we had
before.  This allows us to have a place to implement optimizations in a
structured way.

llvm-svn: 10994
2004-01-28 02:42:12 +00:00
Chris Lattner
2ead39d5c8 Minor tweaks
llvm-svn: 10983
2004-01-27 21:49:42 +00:00
Chris Lattner
16a5e6bf33 Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
structured access to the globals list, add a couple helper methods.

llvm-svn: 10982
2004-01-27 21:49:25 +00:00
Chris Lattner
95d03595ae * cloneReachable* and clonePartiallyInto are not obsolete
* Make AssertNodeInGraph not be HORRIBLY time consuming
* Eliminate the dead mergeInGlobalsGraph method
*** Add the definition for the new ReachabilityCloner class

llvm-svn: 10981
2004-01-27 21:48:35 +00:00
Chris Lattner
de6ca7bf30 Add new flag, other minor modifications
llvm-svn: 10969
2004-01-23 01:42:32 +00:00
Chris Lattner
99f9b84640 Fix grammar
llvm-svn: 10968
2004-01-23 01:42:16 +00:00
Chris Lattner
a72f3a387a 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.

llvm-svn: 10955
2004-01-22 16:56:13 +00:00
Chris Lattner
7348bd20b1 It doesn't make sense for one side to be const, but not the other.
llvm-svn: 10952
2004-01-22 16:08:51 +00:00
Chris Lattner
5f0e00c8b2 Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
why this one was)

Add new method proto

llvm-svn: 10950
2004-01-22 15:26:52 +00:00
Chris Lattner
f2a7d96dde Specialize std::swap correctly
llvm-svn: 10949
2004-01-22 15:26:15 +00:00
Chris Lattner
3910d21d01 Move SlotCalculator.h from include/llvm to include/llvm/Analysis
llvm-svn: 10930
2004-01-20 19:50:12 +00:00
Chris Lattner
1736f44b1d Improve encapsulation in the Loop and LoopInfo classes by eliminating the
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.

llvm-svn: 10714
2004-01-08 00:09:44 +00:00
Chris Lattner
6ecac445aa Rename ClassifyExpression -> ClassifyExpr
llvm-svn: 10591
2003-12-23 08:03:40 +00:00
Chris Lattner
ddc02fd15d fix grammao
llvm-svn: 10576
2003-12-22 04:08:12 +00:00
Chris Lattner
457dd0b6c7 Add a new AliassetTracker::remove method. Because we need to be able to remove
a pointer from an AliasSet, maintain the pointer values on a doubly linked
list instead of a singly linked list, to permit efficient removal from the
middle of the list.

llvm-svn: 10506
2003-12-18 08:11:56 +00:00
Chris Lattner
69a2e9985d Add capability to represent volatile AliasSet's
llvm-svn: 10456
2003-12-14 04:51:34 +00:00
Brian Gaeke
9b3f9806a2 IncludeFile hack to pull in BasicValueNumbering whenever ValueNumbering.h
is included.

llvm-svn: 10397
2003-12-11 05:05:56 +00:00
Brian Gaeke
045d32a78d IncludeFile hack to pull in BasicAliasAnalysis whenever AliasAnalysis.h
is included.

llvm-svn: 10396
2003-12-11 05:05:02 +00:00
Chris Lattner
d4abe8d28a The recalclulate method was a nasty hack that was once used by the -cee pass,
which never worked itself.  The cee pass still doesn't work, but it doesn't use
this method anymore anyway, so eliminate the method.

llvm-svn: 10302
2003-12-07 00:55:32 +00:00
Chris Lattner
c96fd2cf0c Rewrite dominators implementation. Now domset is constructed from immdom,
instead of the other way around.

llvm-svn: 10300
2003-12-07 00:36:16 +00:00
Chris Lattner
1c0824d019 Move this method out of the generic dominators calculation code
llvm-svn: 10298
2003-12-07 00:35:19 +00:00
Chris Lattner
d08cd3b1e1 be GCC 3.4 clean
llvm-svn: 10264
2003-11-29 19:55:12 +00:00
Chris Lattner
6a0a73554a Add methods for implementation
llvm-svn: 9963
2003-11-13 05:05:34 +00:00
Chris Lattner
3c72015317 Add an initial version of the CompleteBUDataStructures pass
llvm-svn: 9955
2003-11-13 01:42:38 +00:00
Chris Lattner
fb07beec2c Add argument
llvm-svn: 9921
2003-11-12 17:58:09 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
2b0c87be66 Add new method
llvm-svn: 9879
2003-11-11 05:08:36 +00:00
Chris Lattner
a71b07eeca 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.

llvm-svn: 9659
2003-11-02 22:27:28 +00:00
Chris Lattner
29f03b2d39 Including the symbol table in the FindUsedTypes analysis was the WRONG way
to fix test/Regression/CBackend/2003-10-23-UnusedType.ll.  This completely
neutered the deadtypeelim pass.

llvm-svn: 9646
2003-11-02 01:28:41 +00:00
Chris Lattner
586db4056a When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
llvm-svn: 9611
2003-10-30 05:17:30 +00:00
Chris Lattner
9def45d1d0 Add new method
llvm-svn: 9570
2003-10-28 23:10:44 +00:00
Chris Lattner
6612e3dfd5 Fix bug in eon hopefully
llvm-svn: 9442
2003-10-23 19:33:44 +00:00
John Criswell
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
7e21039f40 Remove usage of use_size()
llvm-svn: 9134
2003-10-15 16:43:24 +00:00
Misha Brukman
32c5aec6ec Fix spelling.
llvm-svn: 9021
2003-10-10 17:42:19 +00:00
Chris Lattner
c228625040 Use graph traits to perform generic interval construction
llvm-svn: 8809
2003-10-01 22:28:00 +00:00
Chris Lattner
679ad2c46d Add graph traits specializations for intervals
llvm-svn: 8808
2003-10-01 22:27:36 +00:00
Chris Lattner
4e4c763dfc Standardize header file comments
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
d6c9d2ca72 Add prototype
llvm-svn: 8640
2003-09-21 00:28:18 +00:00
Chris Lattner
b12a8a6177 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!

llvm-svn: 8629
2003-09-20 16:34:13 +00:00
Chris Lattner
3e98c3aaeb Unsquishify
llvm-svn: 8612
2003-09-20 01:23:29 +00:00
Chris Lattner
2233d8b00a Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)

llvm-svn: 8537
2003-09-15 15:47:40 +00:00
Chris Lattner
27fcbcd3a3 Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive

llvm-svn: 8468
2003-09-11 16:25:06 +00:00
Chris Lattner
e7c33c0f65 Rework dominator and post dominator information so that we do not have to
unify all exit nodes of a function to compute post-dominance information.
This does not work with functions that have both unwind and return nodes,
because we cannot unify these blocks.  The new implementation is better
anyway. :)

llvm-svn: 8459
2003-09-10 20:36:51 +00:00
Brian Gaeke
7eaecc239a Make createVerifierPass return a FunctionPass *.
llvm-svn: 8449
2003-09-10 19:37:04 +00:00
Chris Lattner
620f051422 Spelling fixes
llvm-svn: 8429
2003-09-10 05:24:09 +00:00
Chris Lattner
05498bc768 Remove explicit passing of SCC's around as objects.
llvm-svn: 8267
2003-08-31 19:46:48 +00:00
Chris Lattner
d96c9204b6 This should use Support/iterator, not <iterator>
llvm-svn: 8266
2003-08-31 19:46:22 +00:00
Chris Lattner
0295b0692d Cleanups, move the getAnalysisUsage method to the .cpp file
llvm-svn: 8265
2003-08-31 19:41:17 +00:00
Chris Lattner
b860fafea2 s/Meth/F
llvm-svn: 8244
2003-08-31 01:38:00 +00:00
Chris Lattner
2e6dfe808d Add new methods, update comments
llvm-svn: 7962
2003-08-18 22:10:57 +00:00
Misha Brukman
56f7db4178 Spell `necessary' correctly.
llvm-svn: 7944
2003-08-18 14:43:39 +00:00
Chris Lattner
0674b75f99 Fix bug: LoopPreheaders/2003-08-15-PreheadersFail.ll
llvm-svn: 7915
2003-08-16 20:57:16 +00:00
Chris Lattner
bd872cdaaf Add a comment to the method decl
llvm-svn: 7609
2003-08-05 18:38:16 +00:00
Sumant Kowshik
9d60ea4810 Added declaration of mergeInGlobalsGraph
llvm-svn: 7607
2003-08-05 17:06:18 +00:00
Chris Lattner
2bf24be50e Remove #includes
llvm-svn: 7339
2003-07-26 22:56:46 +00:00
Chris Lattner
be4a5081d1 #include <cassert> as necessary...
llvm-svn: 7315
2003-07-25 17:58:41 +00:00
Chris Lattner
9390472890 Use the C++ <cassert> header, not the C <assert.h> header
llvm-svn: 7310
2003-07-25 17:34:17 +00:00
Chris Lattner
1351c304dc Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Vikram S. Adve
2d617afa1a (1) Added DSGraph::cloneReachableSubgraph and DSGraph::cloneReachableNodes
to clone the subgraph reachable from a set of root nodes, into the
    current graph, merging the global nodes into those in the current graph.
(2) Added DSGraph::updateFromGlobalGraph() to rematerialize nodes from the
    globals graph into the current graph in both BU and TD passes.
(3) Added hash_set<const GlobalValue*> InlinedGlobals: a set of globals to
    track which globals have been inlined into the current graph from
    callers or callees.  In the TD pass, such globals are up-to-date and
    do not need to be rematerialized from the GlobalsGraph.
(4) Added StripIncompleteBit/KeepIncompleteBit to remove incomplete bit
    when cloning nodes into the globals graph.

llvm-svn: 7190
2003-07-16 21:45:15 +00:00
Chris Lattner
727a2aaf1e INCLUDE_PARENT_GRAPH is required
llvm-svn: 7089
2003-07-02 23:57:21 +00:00
Chris Lattner
05ead58250 Remove dead method
llvm-svn: 7083
2003-07-02 23:43:06 +00:00
Chris Lattner
fd4af836c2 Add new methods
llvm-svn: 7057
2003-07-02 04:37:00 +00:00
Chris Lattner
9e36c26ed9 Disable the parent graph code when not compiled in DEBUG mode
llvm-svn: 7056
2003-07-02 04:33:55 +00:00
Chris Lattner
a80bdacdce TD pass keeps track of which functions have complete arguments
llvm-svn: 7048
2003-07-01 21:12:10 +00:00
Chris Lattner
215aabe53f Add new operator= impl
llvm-svn: 7047
2003-07-01 21:11:59 +00:00
Chris Lattner
c5f892c867 Ok, I'm a moron. Fixed now
llvm-svn: 7035
2003-07-01 17:15:11 +00:00
Chris Lattner
c09d40c234 Fix major problem that was causing all kinds of nasty foldings
llvm-svn: 7034
2003-07-01 17:10:50 +00:00
Chris Lattner
e0dbd43e2f Add new methods to BUDS for keeping track of a precise call graph
llvm-svn: 7028
2003-07-01 16:27:15 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
cb32be085b Add new method
llvm-svn: 7007
2003-06-30 05:57:30 +00:00
Chris Lattner
6de58997b5 Be more const correct
llvm-svn: 7004
2003-06-30 05:27:05 +00:00