1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
Commit Graph

738 Commits

Author SHA1 Message Date
Chris Lattner
37f099ae83 Make the first operand of this method be modifiable.
llvm-svn: 20730
2005-03-21 09:39:20 +00:00
Chris Lattner
64f3947426 add a method
llvm-svn: 20729
2005-03-21 09:38:39 +00:00
Chris Lattner
7550f93ef5 If merging two calls like: foo(A) and bar(B, C), make sure the result has two
arguments, not one.

llvm-svn: 20728
2005-03-21 09:18:39 +00:00
Chris Lattner
df1aa8b6ed rename a method add a data structure.
llvm-svn: 20722
2005-03-21 04:46:35 +00:00
Chris Lattner
334f54c1a0 Remove the InlinedGlobals set which is always empty.
llvm-svn: 20715
2005-03-20 04:30:16 +00:00
Chris Lattner
d5c24fc737 add a method
llvm-svn: 20709
2005-03-20 03:29:39 +00:00
Chris Lattner
e0771155f6 rename some methods and add some new methods for dealing with the globals list
in a DSNode.

llvm-svn: 20701
2005-03-20 02:38:39 +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
ea7615d853 add 3 methods
llvm-svn: 20667
2005-03-17 23:45:35 +00:00
Chris Lattner
0332fdf1d9 remove use of compat_iterator
llvm-svn: 20642
2005-03-16 22:42:01 +00:00
Chris Lattner
82b219432d remove warning, make computeGGToGMapping return an invnodemap.
llvm-svn: 20621
2005-03-15 17:52:07 +00:00
Chris Lattner
4db93bc8d2 add support for hashing nodehandles.
llvm-svn: 20620
2005-03-15 17:51:51 +00:00
Chris Lattner
0376862732 add iterators for return nodes list.
llvm-svn: 20617
2005-03-15 16:46:11 +00:00
Jeff Cohen
c6d8a9188b Do it right...
llvm-svn: 20605
2005-03-15 06:21:40 +00:00
Jeff Cohen
c456e6eceb Fix VC++ breakage.
llvm-svn: 20604
2005-03-15 06:15:08 +00:00
Chris Lattner
eb2e04e812 Rename method, add counterpart.
llvm-svn: 20592
2005-03-15 00:58:09 +00:00
Chris Lattner
fa7bf4a21e Add a useful method.
llvm-svn: 20587
2005-03-14 19:22:33 +00:00
Chris Lattner
252d6277b5 Add support for printing EQ graphs
llvm-svn: 20581
2005-03-13 19:50:40 +00:00
Chris Lattner
a4bd8bd9b0 remove this from the PA namespace, leaving it in the llvm ns
llvm-svn: 20574
2005-03-12 12:08:52 +00:00
Chris Lattner
848760c21f Move this from the pool allocator project to here, where it logically belongs.
llvm-svn: 20570
2005-03-12 11:51:30 +00:00
Chris Lattner
43d8ea234d export two methods
llvm-svn: 20526
2005-03-09 05:34:23 +00:00
Chris Lattner
ef140e77e6 new helper method
llvm-svn: 20491
2005-03-06 20:55:34 +00:00
Chris Lattner
f1e7201a6c Fix a case where we incorrectly returned hasComputableLoopEvolution for
a ternary commutative expr.  Remove FIXME that does not need to be fixed
(can't happen).

llvm-svn: 20335
2005-02-26 18:40:02 +00:00
Chris Lattner
e7d2b05fb0 Add a new method to make it easy to update graphs.
llvm-svn: 20194
2005-02-15 18:40:55 +00:00
Chris Lattner
4d1409f15a Add a new replaceSymbolicValuesWithConcrete method to the SCEV class,
adjust const'ness a bit to be more correct.

llvm-svn: 20145
2005-02-13 04:34:51 +00:00
Chris Lattner
7636e86e7e Add some iterators that should have come in long ago
llvm-svn: 20085
2005-02-09 03:14:29 +00:00
Chris Lattner
a378bec169 Hopefully fix the build on Darwin with GCC 3.3
llvm-svn: 20064
2005-02-07 16:09:01 +00:00
Chris Lattner
0febe1ed81 Add some new members
llvm-svn: 20034
2005-02-04 19:58:06 +00:00
Chris Lattner
820991042d add new member
llvm-svn: 20033
2005-02-04 19:57:57 +00:00
Chris Lattner
22eb2f789e Add a new method.
llvm-svn: 20017
2005-02-03 18:40:05 +00:00
Chris Lattner
3757dc8600 remove dead method
llvm-svn: 19977
2005-02-01 21:37:06 +00:00
Chris Lattner
ee6bc42f3e * Make some methods more const correct.
* Change the FunctionCalls and AuxFunctionCalls vectors into std::lists.
  This makes many operations on these lists much more natural, and avoids
  *exteremely* expensive copying of DSCallSites (e.g. moving nodes around
  between lists, erasing a node from not the end of the vector, etc).

With a profile build of analyze, this speeds up BU DS from 25.14s to
12.59s on 176.gcc.  I expect that it would help TD even more, but I don't
have data for it.

This effectively eliminates removeIdenticalCalls and children from the
profile, going from 6.53 to 0.27s.

llvm-svn: 19939
2005-01-30 23:51:02 +00:00
Chris Lattner
382abe80a0 Improve conformance with the Misha spelling benchmark suite
llvm-svn: 19930
2005-01-30 00:09:23 +00:00
Chris Lattner
aa4ae8f5b3 Adjust to ilist changes.
llvm-svn: 19923
2005-01-29 18:41:12 +00:00
Jeff Cohen
29092b4f26 Get VC++ compiling again
llvm-svn: 19869
2005-01-28 07:29:32 +00:00
Chris Lattner
d009d52fe5 Add some methods.
llvm-svn: 19817
2005-01-24 19:55:34 +00:00
Jeff Cohen
a7f1ae5dc0 Apply feed back from Chris:
1. Rename createLoaderPass to CreateProfileLoaderPass
  2. Opt shouldn't use the pass registered in CodeGen.

llvm-svn: 19431
2005-01-10 03:56:27 +00:00
Jeff Cohen
f692cd303d Add last four createXxxPass functions
llvm-svn: 19424
2005-01-09 20:42:52 +00:00
Jeff Cohen
6827f061cc Get lib/Analysis/DataStructure to compile with VC++
llvm-svn: 19412
2005-01-09 04:18:28 +00:00
Jeff Cohen
6c0db8d863 Add even more missing createXxxPass functions.
llvm-svn: 19402
2005-01-08 22:01:16 +00:00
Chris Lattner
40cf227b6a Make code fit in 80 cols
llvm-svn: 19016
2004-12-17 17:02:54 +00:00
Chris Lattner
78b1a2c137 Make the AliasAnalysis interface more precise for common cases.
llvm-svn: 18956
2004-12-15 07:21:39 +00:00
Chris Lattner
8cb5c70203 Move method out of line
llvm-svn: 18666
2004-12-08 21:04:10 +00:00
Reid Spencer
d50c86f078 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual

llvm-svn: 18589
2004-12-07 04:03:45 +00:00
Chris Lattner
c57746a1e0 Change interface to this method a bit
llvm-svn: 18274
2004-11-27 18:37:04 +00:00
Chris Lattner
ab36efe42b Add a new interface
llvm-svn: 18266
2004-11-26 21:36:25 +00:00
Chris Lattner
5242fcc785 Add an assertion and a method
llvm-svn: 17353
2004-10-30 04:03:47 +00:00
Chris Lattner
dd0094e4ed Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!

llvm-svn: 17281
2004-10-27 16:14:51 +00:00
Chris Lattner
df0849be71 Make sure any client of Dominators.h links in Dominators.cpp
llvm-svn: 16986
2004-10-14 15:46:59 +00:00
Chris Lattner
1bd3fdd438 Remove unneeded typedef, patch by Morten Ofstad
llvm-svn: 16984
2004-10-14 14:51:09 +00:00
Chris Lattner
4436e1c174 Add std:: prefix for compilers without correct koenig lookup implemented.
Patch contributed by Paolo Invernizzi

llvm-svn: 16933
2004-10-12 16:10:39 +00:00
Chris Lattner
43c0372c0b 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Chris Lattner
110bbafcf7 Add CallGraphNode::removeAnyCallEdgeTo method
llvm-svn: 16398
2004-09-18 21:34:34 +00:00
Chris Lattner
e9772b7a63 Implement new changeFunction method, nuke a never implemented one.
Add comments and doxygenify others.

llvm-svn: 16387
2004-09-18 00:22:43 +00:00
Chris Lattner
33596a1fba Make sure to update the list end when an element is removed from it. This
fixes a crash in LICM when processing povray.

llvm-svn: 16367
2004-09-15 17:00:41 +00:00
Chris Lattner
20b39fdfb9 Add an AliasSetTracker::copyValue method
llvm-svn: 16343
2004-09-14 19:15:12 +00:00
Alkis Evlogimenos
0c50e0f211 Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!

llvm-svn: 16152
2004-09-03 18:19:51 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
0b9b58e550 Add standard print/dump methods to CallGraph classes.
llvm-svn: 15569
2004-08-08 03:27:49 +00:00
Brian Gaeke
45adb41f46 Make the create...() functions for some of these passes return a FunctionPass *.
llvm-svn: 15276
2004-07-27 17:43:21 +00:00
Chris Lattner
f08a512d4d New methods
llvm-svn: 15229
2004-07-26 05:50:09 +00:00
Chris Lattner
31d9cbf7bb Add support for free instructions
llvm-svn: 15197
2004-07-25 07:57:37 +00:00
Chris Lattner
e3adc34ea7 Clean up reference counting to stop "leaking" alias sets
llvm-svn: 15099
2004-07-22 07:58:18 +00:00
Chris Lattner
67c1deddfc Add a bunch of new functionality, primarily to do with removing aliasing
pointers from an AST.

llvm-svn: 15065
2004-07-21 07:03:57 +00:00
Chris Lattner
f9976c5dbf Make the AST interface a bit richer by returning whether an insertion caused
an insertion or not (because the pointer set already existed).

llvm-svn: 15064
2004-07-21 05:18:04 +00:00
Chris Lattner
40107200fc Remove dead file
llvm-svn: 14981
2004-07-18 23:44:15 +00:00
Reid Spencer
d7fbd79a5b bug 122:
remove redundant isa<GlobalValue>
ensure isa<GlobalValue> case is processed before is<Constant>

llvm-svn: 14926
2004-07-17 23:36:58 +00:00
Chris Lattner
5ab6b23a7d Fix for PR341
llvm-svn: 14846
2004-07-15 02:50:38 +00:00
Chris Lattner
c2b3e11473 All of these now live in the DataStructure directory
llvm-svn: 14664
2004-07-07 06:32:53 +00:00
Chris Lattner
bd3218fef2 Move DSA headers into Analysis/DataStructure to make it more obvious
what is implemented by the DataStructure library.

llvm-svn: 14662
2004-07-07 06:29:26 +00:00
Chris Lattner
fb2f56c7c8 As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken.  The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.

As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call.  This fixes some obscure bugs
handling non-forwarded node handles.

llvm-svn: 14660
2004-07-07 06:12:52 +00:00
Reid Spencer
37b31cbcba Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
that needs it after the Type != Value changes (bug 122).

llvm-svn: 14605
2004-07-04 11:36:31 +00:00
Chris Lattner
89393e9cfd Add new header
llvm-svn: 14461
2004-06-28 06:31:26 +00:00
Chris Lattner
7de3acb655 Move file to lib/Analysis/DataStructure
llvm-svn: 14454
2004-06-28 00:40:43 +00:00
Chris Lattner
08f4d224e7 Moved to lib/analysis/datastructure
llvm-svn: 14451
2004-06-28 00:30:29 +00:00
Chris Lattner
552cc597c5 Moved to lib/Analysis/DataStructure
llvm-svn: 14449
2004-06-28 00:27:34 +00:00
Chris Lattner
de1c8b455c Moved to lib/Analysis/DataStructure
llvm-svn: 14447
2004-06-28 00:20:39 +00:00
Chris Lattner
228e6d64d0 Remove distasteful method which is really part of the indvars pass
llvm-svn: 14359
2004-06-24 06:52:20 +00:00
Misha Brukman
d3374cf482 Remove extra space.
llvm-svn: 14117
2004-06-10 12:51:35 +00:00
Reid Spencer
dccf1747a1 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).

llvm-svn: 13785
2004-05-26 07:37:11 +00:00
Chris Lattner
bdc2cf6dec Several *major* changes to the AA interfaces:
1. Provide interfaces so that clients can update alias analyses to reflect
   the changes made by the transformations.
2. Change how alias analysis implementations work overall.  In particular,
   now clients will automatically forward to chained AA implementations: they
   don't have to remember to do it themselves.

llvm-svn: 13678
2004-05-23 21:12:38 +00:00
Chris Lattner
fe63a87a98 Add interfaces to update value numbering results
llvm-svn: 13677
2004-05-23 21:11:17 +00:00
Chris Lattner
0588bd19d2 Rename a method
llvm-svn: 13676
2004-05-23 21:10:58 +00:00
Vikram S. Adve
893c53a559 Fix size/offset assertion to allow negative offsets and folded nodes.
llvm-svn: 13644
2004-05-23 07:34:53 +00:00
Chris Lattner
628e839194 It's not clear to me whether the old version was correct C++ code, but in
any case it's not portable.

llvm-svn: 13621
2004-05-21 18:38:16 +00:00
Brian Gaeke
6e9dd8d3cc Define erase forwarding method on traces
llvm-svn: 13591
2004-05-17 21:17:21 +00:00
Brian Gaeke
e9fab81769 Add BBTrace accessor method and data member.
llvm-svn: 13351
2004-05-04 17:11:13 +00:00
Brian Gaeke
c9d203e3d2 New header file containing profile info enums shared between the C++ analysis
libraries and the C runtime support library

llvm-svn: 13347
2004-05-04 16:57:57 +00:00
Chris Lattner
2e752b62b4 Initialize member out of paranoia
llvm-svn: 13319
2004-05-02 16:06:40 +00:00
Chris Lattner
adacba2678 Fix warning
llvm-svn: 13189
2004-04-27 18:21:56 +00:00
Brian Gaeke
9679a3b445 Because I like being able to instantiate the cfgprinter from external projects,
this header file is born.

llvm-svn: 13176
2004-04-26 16:27:53 +00:00
Brian Gaeke
1aada2b128 Fix a typo in a comment.
llvm-svn: 13174
2004-04-26 16:26:21 +00:00
Chris Lattner
b2e1576e72 Remove the SCEV::expandCodeFor method, add a new SCEVVisitor class.
llvm-svn: 13133
2004-04-23 21:28:25 +00:00
Chris Lattner
c79f8aeb82 Add an ugly cast
llvm-svn: 13107
2004-04-22 15:00:36 +00:00
Chris Lattner
bfc19a576a Add a method
llvm-svn: 13105
2004-04-22 14:56:51 +00:00
Chris Lattner
522abc00b8 Allow getting the module from a call graph
llvm-svn: 13086
2004-04-20 21:52:12 +00:00
Chris Lattner
6aa66a1cae Eliminate a poorly conceived method
llvm-svn: 13065
2004-04-19 06:26:46 +00:00
Chris Lattner
c35a86f48b * Improve file header comment
* Remove #include
* Add some methods to update loop/loopinfo
* Stop explicitly holding the loop depth in the Loop class.  Instead, just
  dynamically calculate it.  This makes it easier to update LoopInfo as a
  result of transformations.

llvm-svn: 13059
2004-04-19 03:03:19 +00:00
Chris Lattner
0ce3a74370 Provide an interface that is more convenient for iterating over the blocks
in a loop.

llvm-svn: 13052
2004-04-18 23:37:03 +00:00
Chris Lattner
83017d0b1b Add new method.
llvm-svn: 13049
2004-04-18 22:45:16 +00:00
Chris Lattner
7174acca00 Change the ExitBlocks list from being explicitly contained in the Loop
structure to being dynamically computed on demand.  This makes updating
loop information MUCH easier.

llvm-svn: 13045
2004-04-18 22:14:10 +00:00
Chris Lattner
b17c6d4732 Add a new method
llvm-svn: 13035
2004-04-18 06:54:34 +00:00
Chris Lattner
a8ec64511a Allow clients to delete loops, add a new method
llvm-svn: 13031
2004-04-18 05:37:42 +00:00
Chris Lattner
5c992ad183 Add some helpful methods
llvm-svn: 12959
2004-04-15 15:15:40 +00:00
Chris Lattner
0d220df227 Publically export all of these classes from the ScalarEvolutions.cpp file
llvm-svn: 12957
2004-04-15 15:06:59 +00:00
Chris Lattner
fd1cfeeb1d Add some methods that are useful for updating loop information.
llvm-svn: 12871
2004-04-12 20:26:17 +00:00
Chris Lattner
12e1831ffe Change the call graph class to have TWO external nodes, making call graph
SCC passes much more useful.  In particular, this should fix the incredibly
stupid missed inlining opportunities that the inliner suffered from.

llvm-svn: 12860
2004-04-12 05:36:32 +00:00
Chris Lattner
ba50022f83 Make comments above APIs reflect what they should do.
llvm-svn: 12830
2004-04-11 16:42:50 +00:00
Chris Lattner
d0345fb4a1 New method to allow more efficient clients
llvm-svn: 12829
2004-04-11 16:35:30 +00:00
Chris Lattner
3def8f7eab Note to self: SAVE FILES!
llvm-svn: 12823
2004-04-10 22:32:47 +00:00
Chris Lattner
50afdb258f Add an interface to update value numbering
llvm-svn: 12822
2004-04-10 22:32:09 +00:00
Chris Lattner
697d1d7df2 Clarify interface
llvm-svn: 12805
2004-04-10 06:11:29 +00:00
Chris Lattner
409ef7935c Remove obsolete files
llvm-svn: 12633
2004-04-02 20:56:24 +00:00
Chris Lattner
292d3956ae cleanup some long-dead code
llvm-svn: 12628
2004-04-02 20:46:26 +00:00
Chris Lattner
74911ffd6b Add a new analysis
llvm-svn: 12619
2004-04-02 20:23:17 +00:00
Chris Lattner
c0fede30c5 Make the verifier API more complete and useful
llvm-svn: 12608
2004-04-02 15:44:33 +00:00
Chris Lattner
6a3efa7a38 Tweak argument
llvm-svn: 12412
2004-03-15 04:08:18 +00:00
Chris Lattner
a546ebb664 Deinline a couple of methods. Improve comment.
llvm-svn: 12411
2004-03-15 04:07:59 +00:00
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
Chris Lattner
8ef5ebb1d7 Constness changes
llvm-svn: 7002
2003-06-30 05:10:09 +00:00
Chris Lattner
e6df85809f Substantial revamp: DSGraphs now may contain the graphs for multiple functions
in the same graph

llvm-svn: 6991
2003-06-30 03:14:23 +00:00
Chris Lattner
ff71b43ac7 Remove prototype for dead method
llvm-svn: 6989
2003-06-30 03:13:28 +00:00
Chris Lattner
4b3d2c7c90 Add support for gathering sets of must aliases
llvm-svn: 6971
2003-06-29 00:23:11 +00:00
Chris Lattner
c059f6cce9 Add new DSGraph::ScalarMapTy typedef to avoid pulling representation issues
into callers of getScalarMap

llvm-svn: 6944
2003-06-28 21:57:13 +00:00
Chris Lattner
3b60ccaedb Add new 'isComplete' method
llvm-svn: 6943
2003-06-28 21:56:42 +00:00
Chris Lattner
6c12776232 Remove a ton of extraneous #includes
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
Chris Lattner
7a098ad5dc Whoops, accidentally lost a #include
llvm-svn: 6841
2003-06-22 03:04:58 +00:00
Chris Lattner
ddfeef3d7a Remove support for the MultiObject flag, which was just fundamentally broken
llvm-svn: 6839
2003-06-22 03:03:24 +00:00
Chris Lattner
d07e211972 Lots of changes to make the NodeType field private to DSNode.
Add new MultiObject flag

llvm-svn: 6793
2003-06-19 21:14:22 +00:00
John Criswell
4781723de6 Included assert.h so that the code compiles under newer versions of GCC.
llvm-svn: 6682
2003-06-11 14:01:36 +00:00
Chris Lattner
506de1c176 Minor cleanups:
* LLVM #include should use "", not <>
  * Fix line wrapping
  * Remove noncopyable base class to improve doxygen output

llvm-svn: 6577
2003-06-03 15:30:01 +00:00
Chris Lattner
cf6eb5232a Add more graph traits specializations for dominator tree nodes
llvm-svn: 5751
2003-03-20 21:21:05 +00:00
Chris Lattner
3e34da7458 Add a few new 'add' methods. Move the iterator around
llvm-svn: 5690
2003-03-03 23:27:52 +00:00
Chris Lattner
41e9bb787e Don't apply type information to loads
llvm-svn: 5683
2003-03-03 17:13:22 +00:00
Chris Lattner
6046dda16e Add dump method for loops
llvm-svn: 5670
2003-02-28 16:54:37 +00:00
Chris Lattner
cffe1c533c Add graph traits specializations for loop nesting information...
llvm-svn: 5666
2003-02-28 03:05:15 +00:00
Chris Lattner
e6443c72fe Add new Loop::hasExitBlock helper method
llvm-svn: 5663
2003-02-27 22:48:28 +00:00
Chris Lattner
c37308604f Change behavior of changeExitBlock function to replace all instances of exit block
llvm-svn: 5661
2003-02-27 22:37:44 +00:00
Chris Lattner
db73d0ceab Make the interface to update a little more efficient
llvm-svn: 5651
2003-02-27 20:24:17 +00:00
Chris Lattner
4efef545d2 * LoopInfo now keeps track of exit blocks from the loop
* New LoopInfo::isLoopHeader method
  * Remove some #if 0 code

llvm-svn: 5649
2003-02-27 00:37:22 +00:00
Chris Lattner
5baf8bb966 Make the aliassettracker much more precise by actually tracking size
information for various accesses.  What a concept.

llvm-svn: 5647
2003-02-26 22:11:00 +00:00
Chris Lattner
374168a56e BasicAA doesn't need a public header
llvm-svn: 5639
2003-02-26 19:41:46 +00:00
Chris Lattner
f3a3d13d24 Tweak to work with new AA implementation
llvm-svn: 5632
2003-02-26 19:25:04 +00:00
Chris Lattner
8a8dc5b686 Checkin of new alias analysis interface:
* Takes into account the size of the memory reference to determine aliasing.
  * Expose mod/ref information in a more consistent way

llvm-svn: 5631
2003-02-26 19:24:47 +00:00
Chris Lattner
f2009dbddb This is a substantial rewrite of the AliasSetTracker class which now uses
a union-find based algorithm, is significantly faster, and is more general.
It will also scale to handle call instructions correctly, which is a nice
added bonus.

This includes a new pass -print-alias-sets which can be used to show how
alias sets are formed for a particular analysis.

llvm-svn: 5619
2003-02-24 20:37:56 +00:00
Chris Lattner
120d135f05 Move node forwarding code from being inlined to being out-of-line.
This brings a 11.6% speedup to steens, and a 3.6 overall speedup to ds-aa

llvm-svn: 5552
2003-02-13 19:09:00 +00:00
Chris Lattner
522cb6d282 Implement a "union-findy" version of DS-Analysis, which eliminates the
Referrers list on DSNodes.

llvm-svn: 5536
2003-02-11 23:11:51 +00:00
Chris Lattner
d4faf8a5da Fix uninitialized member problem
llvm-svn: 5534
2003-02-11 06:36:00 +00:00
Chris Lattner
fade2f7d18 Bugfix for calling dump() after the links vector has been cleared
llvm-svn: 5533
2003-02-10 22:46:47 +00:00