Commit Graph

810 Commits

Author SHA1 Message Date
Chris Lattner
9e3c5a2bde If merging two calls like: foo(A) and bar(B, C), make sure the result has two
arguments, not one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20728 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 09:18:39 +00:00
Chris Lattner
7757b9fe9f rename a method add a data structure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20722 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 04:46:35 +00:00
Chris Lattner
1fd7d4a670 Remove the InlinedGlobals set which is always empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20715 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 04:30:16 +00:00
Chris Lattner
3ee382c68f add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20709 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 03:29:39 +00:00
Chris Lattner
a4c1b5f3e6 rename some methods and add some new methods for dealing with the globals list
in a DSNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20701 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-20 02:38:39 +00:00
Chris Lattner
6269be8aca 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20695 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 22:13:13 +00:00
Chris Lattner
ed53fe9945 Each DS collection now contains an equivalence class of globals values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20694 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 22:12:33 +00:00
Chris Lattner
ce325fdb87 add a method to clear globals from a node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20693 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-19 22:12:03 +00:00
Chris Lattner
0f34412293 add 3 methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20667 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 23:45:35 +00:00
Chris Lattner
df6001380a remove use of compat_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20642 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-16 22:42:01 +00:00
Chris Lattner
a9fec4ed81 remove warning, make computeGGToGMapping return an invnodemap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20621 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 17:52:07 +00:00
Chris Lattner
adea6306d4 add support for hashing nodehandles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20620 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 17:51:51 +00:00
Chris Lattner
60cc3e1c4e add iterators for return nodes list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20617 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 16:46:11 +00:00
Jeff Cohen
805213e65c Do it right...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20605 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 06:21:40 +00:00
Jeff Cohen
0ef161eef9 Fix VC++ breakage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20604 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 06:15:08 +00:00
Chris Lattner
e448580492 Rename method, add counterpart.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20592 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 00:58:09 +00:00
Chris Lattner
62b2b22573 Add a useful method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20587 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-14 19:22:33 +00:00
Chris Lattner
bc341e616e Add support for printing EQ graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20581 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-13 19:50:40 +00:00
Chris Lattner
b25959a632 remove this from the PA namespace, leaving it in the llvm ns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20574 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-12 12:08:52 +00:00
Chris Lattner
8694c076c7 Fix some crashes noted by John Mellor-Crummey's group.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20558 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-11 00:00:56 +00:00
Chris Lattner
df28a31435 export two methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20526 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 05:34:23 +00:00
Chris Lattner
51a4ad475b new helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20491 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 20:55:34 +00:00
Chris Lattner
803513b364 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20335 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-26 18:40:02 +00:00
Chris Lattner
d672ab936f Add a new method to make it easy to update graphs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20194 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 18:40:55 +00:00
Chris Lattner
afc0dc7184 Add a new replaceSymbolicValuesWithConcrete method to the SCEV class,
adjust const'ness a bit to be more correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20145 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 04:34:51 +00:00
Chris Lattner
748ca4de2c Add some iterators that should have come in long ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20085 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-09 03:14:29 +00:00
Chris Lattner
ddf5a35eed Hopefully fix the build on Darwin with GCC 3.3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20064 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-07 16:09:01 +00:00
Chris Lattner
eefc71be20 Add some new members
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20034 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 19:58:06 +00:00
Chris Lattner
fbafcb7468 add new member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20033 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-04 19:57:57 +00:00
Chris Lattner
3a826203c7 Add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20017 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-03 18:40:05 +00:00
Chris Lattner
321f68306f remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19977 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-01 21:37:06 +00:00
Chris Lattner
a9548d9fd9 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19939 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 23:51:02 +00:00
Chris Lattner
bca81448ac Improve conformance with the Misha spelling benchmark suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-30 00:09:23 +00:00
Chris Lattner
3cf8e6857e Adjust to ilist changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 18:41:12 +00:00
Jeff Cohen
a5ba89421e Get VC++ compiling again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19869 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-28 07:29:32 +00:00
Chris Lattner
d5af7c4df6 Add some methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19817 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-24 19:55:34 +00:00
Jeff Cohen
6e400f76e6 Apply feed back from Chris:
1. Rename createLoaderPass to CreateProfileLoaderPass
  2. Opt shouldn't use the pass registered in CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19431 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-10 03:56:27 +00:00
Jeff Cohen
1d7b5de7ee Add last four createXxxPass functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19424 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 20:42:52 +00:00
Jeff Cohen
2611dd4448 Get lib/Analysis/DataStructure to compile with VC++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19412 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-09 04:18:28 +00:00
Jeff Cohen
534927d82d Add even more missing createXxxPass functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19402 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-08 22:01:16 +00:00
Chris Lattner
fb752ba02a Make code fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19016 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 17:02:54 +00:00
Chris Lattner
248e8ebeff Make the AliasAnalysis interface more precise for common cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18956 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:21:39 +00:00
Chris Lattner
833408d484 Move method out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18666 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 21:04:10 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Chris Lattner
276636c93b Change interface to this method a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18274 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-27 18:37:04 +00:00
Chris Lattner
07bfa52405 Add a new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18266 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-26 21:36:25 +00:00
Chris Lattner
033a7d5389 Substantially cleanup/speedup the eq graphs pass by walking the callgraph
a DSGraph at a time instead of a function at a time.  This is also more
correct, though it doesn't seem to fix any programs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17435 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-02 17:51:11 +00:00
Chris Lattner
4457f7ea46 Remove more dead methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 21:07:05 +00:00
Chris Lattner
dddc13f986 Delete a dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17412 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 21:04:47 +00:00
Chris Lattner
fcb7d950bc Rename FoldedGraph -> DSInfo to be consistent with other passes
delete some dead methods


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17410 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 21:02:23 +00:00
Chris Lattner
77408b8987 Get rid of the EquivClassGraphArgsInfo class, and the map that held it.
We only need one instance of the vector that it contains at a time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 20:37:00 +00:00
Chris Lattner
68f9658fcb Eliminate the cloneGraph method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17405 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-01 19:54:06 +00:00
Chris Lattner
31d3f671be * Do not refer to ActualCallees in CBU, when we can do it locally.
* *DO NOT* print CBU graphs when asked to print our own.  This is just
  FREAKING confusing and misleading: it's better to not print anything.
* Simplify and clean up some code
* Add some more paranoia assertion checking code that I found to track
  down this bug:
* Fix a nasty bug that was causing us to crash on Prolangs-C++/objects,
  where we were missing processing some graphs.  This hunk is the bugfix:

-    if (!I->isExternal() && !FoldedGraphsMap.count(I))
+    if (!I->isExternal() && !ValMap.count(I))

  urg!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17386 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 23:41:26 +00:00
Chris Lattner
4bbf3dfbe6 Simplify graph traversal, improve grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17383 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 23:01:34 +00:00
Chris Lattner
ab8544aa75 Do not do horrible things to the CBU graphs. In particular, we do NOT own
the CBU graphs, copy them instead of hacking on the CBU graphs.

Also, instead of forwarding request from ECGraphs clients to the CBU graphs
clients, service them ourselves.

Finally, remove a broken "optimization"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17378 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 21:56:11 +00:00
Chris Lattner
5b3ed508f6 Add an assertion and a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-30 04:03:47 +00:00
Chris Lattner
1fca5ff62b Convert 'struct' to 'class' in various places to adhere to the coding standards
and work better with VC++.  Patch contributed by Morten Ofstad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17281 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 16:14:51 +00:00
Chris Lattner
5fb00c5893 Make sure any client of Dominators.h links in Dominators.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 15:46:59 +00:00
Chris Lattner
15f47878e4 Remove unneeded typedef, patch by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16984 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 14:51:09 +00:00
Chris Lattner
5c3734e349 Add std:: prefix for compilers without correct koenig lookup implemented.
Patch contributed by Paolo Invernizzi


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16933 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 16:10:39 +00:00
Chris Lattner
b12914bfc0 '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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Chris Lattner
d55c9bf318 Adjust to API changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16429 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:35:27 +00:00
Chris Lattner
cd382a3725 Add CallGraphNode::removeAnyCallEdgeTo method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16398 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 21:34:34 +00:00
Chris Lattner
ff8c495386 Implement new changeFunction method, nuke a never implemented one.
Add comments and doxygenify others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16387 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-18 00:22:43 +00:00
Chris Lattner
7e0e9c635f Make sure to update the list end when an element is removed from it. This
fixes a crash in LICM when processing povray.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16367 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-15 17:00:41 +00:00
Chris Lattner
e2fe784500 Add an AliasSetTracker::copyValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16343 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 19:15:12 +00:00
Chris Lattner
5148b63329 Adjust to #include movage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16329 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 04:08:41 +00:00
Alkis Evlogimenos
20aa474f8f Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 18:19:51 +00:00
Reid Spencer
551ccae044 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/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
af8a42445c Add standard print/dump methods to CallGraph classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15569 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-08 03:27:49 +00:00
Brian Gaeke
96d4bf7aee Make the create...() functions for some of these passes return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15276 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 17:43:21 +00:00
Chris Lattner
558cb5f4a1 New methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15229 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-26 05:50:09 +00:00
Chris Lattner
5c88260f70 Add support for free instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15197 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-25 07:57:37 +00:00
Chris Lattner
b8a31ace2c Clean up reference counting to stop "leaking" alias sets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15099 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 07:58:18 +00:00
Chris Lattner
877ad7d80b Add a bunch of new functionality, primarily to do with removing aliasing
pointers from an AST.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15065 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 07:03:57 +00:00
Chris Lattner
12c1155403 Make the AST interface a bit richer by returning whether an insertion caused
an insertion or not (because the pointer set already existed).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15064 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 05:18:04 +00:00
Chris Lattner
e30ab88209 Remove dead file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14981 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 23:44:15 +00:00
Reid Spencer
31c0da4483 bug 122:
remove redundant isa<GlobalValue>
ensure isa<GlobalValue> case is processed before is<Constant>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14926 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:36:58 +00:00
Chris Lattner
94009a5954 Fix for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14846 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:50:38 +00:00
Chris Lattner
8adbec89ce Headers moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14665 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:35:22 +00:00
Chris Lattner
7ff5daa0b6 All of these now live in the DataStructure directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14664 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:32:53 +00:00
Chris Lattner
6c49989b3e Move DSA headers into Analysis/DataStructure to make it more obvious
what is implemented by the DataStructure library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14662 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:29:26 +00:00
Chris Lattner
efffdc9408 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14660 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-07 06:12:52 +00:00
Reid Spencer
e0bc0c1822 Move SlotCalculator.h to lib/Bytecode/Writer since that is the only place
that needs it after the Type != Value changes (bug 122).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14605 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 11:36:31 +00:00
Chris Lattner
15fde2eb83 Add new header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14461 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 06:31:26 +00:00
Chris Lattner
c3f44c082f Move file to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14454 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:40:43 +00:00
Chris Lattner
1ffa817210 Moved to lib/analysis/datastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:30:29 +00:00
Chris Lattner
ae7502cb5f Moved to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14449 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:27:34 +00:00
Chris Lattner
e1ba478cd6 Moved to lib/Analysis/DataStructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14447 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-28 00:20:39 +00:00
Chris Lattner
5aa20212cc Remove distasteful method which is really part of the indvars pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-24 06:52:20 +00:00
Misha Brukman
236b7e2142 Remove extra space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14117 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-10 12:51:35 +00:00
Reid Spencer
798ff64328 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:37:11 +00:00
Chris Lattner
ab8c565768 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13678 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:12:38 +00:00
Chris Lattner
bc78225518 Add interfaces to update value numbering results
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13677 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:11:17 +00:00
Chris Lattner
c43e0ae350 Rename a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13676 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 21:10:58 +00:00
Vikram S. Adve
c5204fb6f8 Complete rewrite of the code that merges DS graphs for equivalence classes
of functions called at a common call site.  The rewrite inlines the
resulting graphs bottom-up on the SCCs of the CBU call graph.  It also
simplifies the merging of equivalence classes by exploiting the fact that
functions in non-trivial SCCs are already merged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13645 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 07:54:02 +00:00
Vikram S. Adve
44860ccaf2 Fix size/offset assertion to allow negative offsets and folded nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13644 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-23 07:34:53 +00:00
Chris Lattner
d49b120414 It's not clear to me whether the old version was correct C++ code, but in
any case it's not portable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13621 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-21 18:38:16 +00:00
Brian Gaeke
71d3a87ec1 Define erase forwarding method on traces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13591 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-17 21:17:21 +00:00
Brian Gaeke
7e3f82e6a5 Add BBTrace accessor method and data member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 17:11:13 +00:00
Brian Gaeke
dc0bedcd25 New header file containing profile info enums shared between the C++ analysis
libraries and the C runtime support library


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13347 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 16:57:57 +00:00
Chris Lattner
1570cb14d7 Initialize member out of paranoia
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13319 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-02 16:06:40 +00:00
Chris Lattner
0ebf428e48 Fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-27 18:21:56 +00:00
Brian Gaeke
21e232501a Because I like being able to instantiate the cfgprinter from external projects,
this header file is born.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13176 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-26 16:27:53 +00:00
Brian Gaeke
e0baeec4fe Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13174 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-26 16:26:21 +00:00
Chris Lattner
2cdf0a7a32 Remove the SCEV::expandCodeFor method, add a new SCEVVisitor class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13133 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 21:28:25 +00:00
Chris Lattner
7d221c53e5 Add an ugly cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13107 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-22 15:00:36 +00:00
Chris Lattner
e1beb8f59d Add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13105 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-22 14:56:51 +00:00
Chris Lattner
78637fe9d6 Allow getting the module from a call graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13086 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-20 21:52:12 +00:00
Chris Lattner
06ac2bef15 Eliminate a poorly conceived method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13065 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-19 06:26:46 +00:00
Chris Lattner
072b163424 * 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13059 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-19 03:03:19 +00:00
Chris Lattner
4e77cc46ac Provide an interface that is more convenient for iterating over the blocks
in a loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13052 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-18 23:37:03 +00:00
Chris Lattner
88d3ef2c74 Add new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13049 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-18 22:45:16 +00:00
Chris Lattner
f1ab4b4eac 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13045 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-18 22:14:10 +00:00
Chris Lattner
9afb24bf08 Add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13035 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-18 06:54:34 +00:00
Chris Lattner
4e55b7d2c6 Allow clients to delete loops, add a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13031 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-18 05:37:42 +00:00
Chris Lattner
e725cb0d5a Add some helpful methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12959 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-15 15:15:40 +00:00
Chris Lattner
4950e88e0f Publically export all of these classes from the ScalarEvolutions.cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-15 15:06:59 +00:00
Chris Lattner
46758a894f Add some methods that are useful for updating loop information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12871 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 20:26:17 +00:00
Chris Lattner
b81c021f14 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12860 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 05:36:32 +00:00
Chris Lattner
414c36769a Make comments above APIs reflect what they should do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12830 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-11 16:42:50 +00:00
Chris Lattner
e40bb915ba New method to allow more efficient clients
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12829 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-11 16:35:30 +00:00
Chris Lattner
7015a035e7 Note to self: SAVE FILES!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12823 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 22:32:47 +00:00
Chris Lattner
c39546cceb Add an interface to update value numbering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12822 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 22:32:09 +00:00
Chris Lattner
94c420da4a Clarify interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12805 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-10 06:11:29 +00:00
Chris Lattner
9687845800 Remove obsolete files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:56:24 +00:00
Chris Lattner
254bacd79a cleanup some long-dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12628 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:46:26 +00:00
Chris Lattner
53e677abad Add a new analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12619 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:23:17 +00:00
Chris Lattner
0e4271f8b2 Make the verifier API more complete and useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 15:44:33 +00:00
Chris Lattner
c87f0bb345 Tweak argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12412 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:08:18 +00:00
Chris Lattner
5cb66e24d4 Deinline a couple of methods. Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 04:07:59 +00:00
Chris Lattner
3e295b1b59 Add two new methods which can be used to enable a bunch of transformations
in common cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-15 01:58:54 +00:00
Misha Brukman
dd298c8c6e Doxygenified and cleand up comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 23:08:20 +00:00
Chris Lattner
69a69ff5fd new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12263 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-09 19:36:59 +00:00
Chris Lattner
7d84dda560 Switch over to using edge profile information as the basic profiling representation,
from basic block counts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12241 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 22:03:45 +00:00
Chris Lattner
0f54bc7630 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12239 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 21:30:18 +00:00
Chris Lattner
3f25328fbf Rearrange some methods, implement the dominates method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12237 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 21:07:12 +00:00
Chris Lattner
6ba8972919 Import the trace class from the reoptimizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12236 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 20:57:27 +00:00
Chris Lattner
fd755f7c7c Add support for representing edge counts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12228 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 18:19:37 +00:00
Chris Lattner
66be3c8f72 Rename method, add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12103 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 22:00:20 +00:00
Chris Lattner
3d549b18a3 De-inline methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12101 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-03 20:55:15 +00:00
Chris Lattner
23511597fe Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12056 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 19:36:50 +00:00
Chris Lattner
99df257910 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 01:42:26 +00:00
Misha Brukman
201ff603a7 Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12015 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 23:55:11 +00:00
Chris Lattner
9c0b9bf2b5 Update comments and add warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11691 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-21 22:27:20 +00:00
Chris Lattner
bbdfe40ba7 Add a method useful for updating DSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11636 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 21:27:50 +00:00
Chris Lattner
54a6662da3 Add an important prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11320 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 06:11:06 +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
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
2b38c0d94b Remove some unneeded stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-10 21:19:49 +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
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
04364fb01e Change to use iterators instead of direct access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11170 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:22:41 +00:00
Chris Lattner
e187d56520 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11165 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 23:57:09 +00:00
Chris Lattner
bee5ff3ae2 Actually USE isForwarding method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11160 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 23:02:32 +00:00
Chris Lattner
d1d2be3c16 As Alkis pointed out to me, I forgot to commit this... :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-07 22:54:19 +00:00
Chris Lattner
762e8e846f Add a new pointsToConstantMemory method to the AliasAnalysis interface
which can be implemented to improve the quality of mod-ref information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11020 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 22:15:41 +00:00
Misha Brukman
fbdf4bf179 Doxygenify comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11014 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-30 17:22:50 +00:00
Chris Lattner
14c67ccf02 Keep track of all of the globals inserted into the scalar map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 03:01:22 +00:00
Chris Lattner
18348fe201 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-28 02:42:12 +00:00
Chris Lattner
660f1e90ec Minor tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10983 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 21:49:42 +00:00
Chris Lattner
7a31285c3f Add comments, allow DSNode "copy ctor" to ignore outgoing links, add more
structured access to the globals list, add a couple helper methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 21:49:25 +00:00
Chris Lattner
5f549af582 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10981 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-27 21:48:35 +00:00
Chris Lattner
078c513e87 Add new flag, other minor modifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10969 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 01:42:32 +00:00
Chris Lattner
1db1c93b30 Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10968 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-23 01:42:16 +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
9a37f2d96a It doesn't make sense for one side to be const, but not the other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10952 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 16:08:51 +00:00
Chris Lattner
9e9848d037 Remove const qualifier (all Value*'s are nonconst in DSA, so it's not clear
why this one was)

Add new method proto


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 15:26:52 +00:00
Chris Lattner
c4282a33d1 Specialize std::swap correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10949 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-22 15:26:15 +00:00
Chris Lattner
db9b998f63 Move SlotCalculator.h from include/llvm to include/llvm/Analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10930 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 19:50:12 +00:00
Chris Lattner
a2b4f93a1b add a method proto, make a method not inline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10921 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-20 00:54:47 +00:00
Chris Lattner
af894e963b Add support for representing the "compaction table"
Change protected members to private.  Nothing should subclass SlotCalculator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10912 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-18 21:03:49 +00:00
Chris Lattner
7851e1b328 Improve comments, add support for remembering the constants strings that
are to be emitted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10866 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 23:37:43 +00:00
Chris Lattner
8ce750145d The only clients of the slot calculator are now the asmwriter and bcwriter.
Since this really only makes sense for these two, change hte instance variable
to reflect whether we are writing a bytecode file or not.  This makes it
reasonable to add bcwriter specific stuff to it as necessary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10837 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 02:49:34 +00:00
Chris Lattner
329c1c6c94 Improve encapsulation in the Loop and LoopInfo classes by eliminating the
getSubLoops/getTopLevelLoops methods, replacing them with iterator-based
accessors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10714 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 00:09:44 +00:00
Chris Lattner
4e4bbc792c Rename ClassifyExpression -> ClassifyExpr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10591 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 08:03:40 +00:00
Chris Lattner
ad4705f055 fix grammao
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10576 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-22 04:08:12 +00:00
Chris Lattner
2cffeec014 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10506 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-18 08:11:56 +00:00
Chris Lattner
bb8f4769a2 Add capability to represent volatile AliasSet's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10456 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 04:51:34 +00:00
Brian Gaeke
8e32f5e46d IncludeFile hack to pull in BasicValueNumbering whenever ValueNumbering.h
is included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10397 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-11 05:05:56 +00:00
Brian Gaeke
fc188b95b8 IncludeFile hack to pull in BasicAliasAnalysis whenever AliasAnalysis.h
is included.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10396 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-11 05:05:02 +00:00
Chris Lattner
eae45cf44b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:55:32 +00:00
Chris Lattner
31b935357d Rewrite dominators implementation. Now domset is constructed from immdom,
instead of the other way around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10300 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:36:16 +00:00
Chris Lattner
677d027ace Move this method out of the generic dominators calculation code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 00:35:19 +00:00
Chris Lattner
f17072b79c be GCC 3.4 clean
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10264 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:55:12 +00:00
Chris Lattner
21fc51daa5 Add methods for implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 05:05:34 +00:00
Chris Lattner
7d26815d8d Add an initial version of the CompleteBUDataStructures pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9955 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 01:42:38 +00:00
Chris Lattner
f58aefcb20 Add argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9921 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 17:58:09 +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
3b120be94f Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9879 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 05:08:36 +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
ba12c23ca7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9646 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-02 01:28:41 +00:00
Chris Lattner
14fffaf6c1 When someone includes CallGraph.h, make sure that they link in CallGraph.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 05:17:30 +00:00
Chris Lattner
a3a1c2de9d Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9570 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 23:10:44 +00:00
Chris Lattner
4a2c0e9259 Fix bug in eon hopefully
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9442 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 19:33:44 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Alkis Evlogimenos
60596382aa Eliminate some extraneous code in SlotCalculator::insertVal().
Rename SlotCalculator::getValSlot() to SlotCalculator::getSlot(),
       SlotCalculator::insertValue() to SlotCalculator::getOrCreateSlot(),
       SlotCalculator::insertVal() to SlotCalculator::insertValue(), and
       SlotCalculator::doInsertVal() to SlotCalculator::doInsertValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9190 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 02:02:40 +00:00
Chris Lattner
33922eb648 Remove usage of use_size()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9134 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 16:43:24 +00:00
Misha Brukman
d5d96b9fcd Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9021 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:42:19 +00:00
Chris Lattner
22bca4dfb0 Use graph traits to perform generic interval construction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8809 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 22:28:00 +00:00
Chris Lattner
96f7b1bf32 Add graph traits specializations for intervals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8808 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-01 22:27:36 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
628bf091e6 Add prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8640 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-21 00:28:18 +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
51757155fa Unsquishify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8612 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 01:23:29 +00:00
Chris Lattner
c72b249e9c Do not segfault when the post-dominator tree is empty (ie, there are no return
or unwind instructions in the function)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8537 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 15:47:40 +00:00
Chris Lattner
317a61b2db Get rid of the whole "Node2" business, rename getNode() ->getBlock() to
be more descriptive


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8468 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:25:06 +00:00
Chris Lattner
420a8bf2b2 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. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8459 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 20:36:51 +00:00
Brian Gaeke
053134a1ee Make createVerifierPass return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:37:04 +00:00
Chris Lattner
69ecd0d7e7 Spelling fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8429 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 05:24:09 +00:00
Chris Lattner
fe8d8806f7 Remove explicit passing of SCC's around as objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8267 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:46:48 +00:00
Chris Lattner
0c6a271d91 This should use Support/iterator, not <iterator>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8266 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:46:22 +00:00
Chris Lattner
1da3398600 Cleanups, move the getAnalysisUsage method to the .cpp file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:41:17 +00:00
Chris Lattner
5636eec5fb s/Meth/F
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8244 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 01:38:00 +00:00
Chris Lattner
fd4d8975cf Add new methods, update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7962 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 22:10:57 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
7dd46b09c0 Fix bug: LoopPreheaders/2003-08-15-PreheadersFail.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-16 20:57:16 +00:00
Chris Lattner
8366b38ff7 Add a comment to the method decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7609 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 18:38:16 +00:00
Sumant Kowshik
9f2ac19f8e Added declaration of mergeInGlobalsGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7607 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 17:06:18 +00:00
Chris Lattner
869ff9e7be Remove #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7339 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-26 22:56:46 +00:00
Chris Lattner
be67780f31 #include <cassert> as necessary...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7315 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:58:41 +00:00
Chris Lattner
d957518b51 Use the C++ <cassert> header, not the C <assert.h> header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7310 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-25 17:34:17 +00:00
Chris Lattner
949a362802 Remove redundant const qualifiers from cast<> expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-23 15:30:06 +00:00
Vikram S. Adve
a53e3da92c (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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7190 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-16 21:45:15 +00:00
Chris Lattner
3915da3e0f INCLUDE_PARENT_GRAPH is required
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7089 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:57:21 +00:00
Chris Lattner
a523e22a20 Remove dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7083 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 23:43:06 +00:00
Chris Lattner
8fd2715098 Add new methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7057 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 04:37:00 +00:00
Chris Lattner
73440f6a15 Disable the parent graph code when not compiled in DEBUG mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7056 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-02 04:33:55 +00:00
Chris Lattner
c019f9bba5 TD pass keeps track of which functions have complete arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7048 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 21:12:10 +00:00
Chris Lattner
b512b24442 Add new operator= impl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7047 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 21:11:59 +00:00
Chris Lattner
e2fe664e8f Ok, I'm a moron. Fixed now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7035 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 17:15:11 +00:00
Chris Lattner
985d31215c Fix major problem that was causing all kinds of nasty foldings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7034 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 17:10:50 +00:00
Chris Lattner
17d5d863b2 Add new methods to BUDS for keeping track of a precise call graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7028 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-01 16:27:15 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
a9d6566e36 Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7007 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 05:57:30 +00:00
Chris Lattner
332f0aa425 Be more const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7004 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 05:27:05 +00:00
Chris Lattner
fa45c7a938 Constness changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7002 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 05:10:09 +00:00
Chris Lattner
17fefa3ac3 Substantial revamp: DSGraphs now may contain the graphs for multiple functions
in the same graph


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6991 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 03:14:23 +00:00
Chris Lattner
0baec255a7 Remove prototype for dead method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6989 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 03:13:28 +00:00
Chris Lattner
62b5c167de Add support for gathering sets of must aliases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6971 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-29 00:23:11 +00:00
Chris Lattner
35de11f3b1 Add new DSGraph::ScalarMapTy typedef to avoid pulling representation issues
into callers of getScalarMap


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28 21:57:13 +00:00
Chris Lattner
2769e6ca92 Add new 'isComplete' method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6943 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-28 21:56:42 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
Chris Lattner
18345bb93f Whoops, accidentally lost a #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6841 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:04:58 +00:00
Chris Lattner
5bb8776ece Remove support for the MultiObject flag, which was just fundamentally broken
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6839 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:03:24 +00:00
Chris Lattner
160cf48671 Lots of changes to make the NodeType field private to DSNode.
Add new MultiObject flag


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6793 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 21:14:22 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Chris Lattner
5b595b9421 Minor cleanups:
* LLVM #include should use "", not <>
  * Fix line wrapping
  * Remove noncopyable base class to improve doxygen output


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6577 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:30:01 +00:00
Chris Lattner
e33b796851 Add more graph traits specializations for dominator tree nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5751 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-20 21:21:05 +00:00
Chris Lattner
b75f9dda9e Add a few new 'add' methods. Move the iterator around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5690 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-03 23:27:52 +00:00
Chris Lattner
af68ccefeb Don't apply type information to loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5683 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-03 17:13:22 +00:00
Chris Lattner
f972cbd98c Add dump method for loops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5670 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 16:54:37 +00:00
Chris Lattner
1db0a40037 Add graph traits specializations for loop nesting information...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5666 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 03:05:15 +00:00
Chris Lattner
6bc4281336 Add new Loop::hasExitBlock helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5663 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 22:48:28 +00:00
Chris Lattner
f2e2925f95 Change behavior of changeExitBlock function to replace all instances of exit block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5661 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 22:37:44 +00:00
Chris Lattner
ef05100950 Make the interface to update a little more efficient
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5651 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 20:24:17 +00:00
Chris Lattner
fe3ae1ed66 * LoopInfo now keeps track of exit blocks from the loop
* New LoopInfo::isLoopHeader method
  * Remove some #if 0 code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5649 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-27 00:37:22 +00:00
Chris Lattner
31a9d185bf Make the aliassettracker much more precise by actually tracking size
information for various accesses.  What a concept.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 22:11:00 +00:00
Chris Lattner
f8783fadb4 BasicAA doesn't need a public header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5639 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:41:46 +00:00
Chris Lattner
13b6f22f04 Tweak to work with new AA implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5632 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:25:04 +00:00
Chris Lattner
1c56b730a6 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5631 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 19:24:47 +00:00
Chris Lattner
9971ac4a36 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5619 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-24 20:37:56 +00:00
Chris Lattner
731b2d7df5 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-13 19:09:00 +00:00
Chris Lattner
72d29a4b00 Implement a "union-findy" version of DS-Analysis, which eliminates the
Referrers list on DSNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5536 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-11 23:11:51 +00:00
Chris Lattner
d3c2e3237c Fix uninitialized member problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5534 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-11 06:36:00 +00:00
Chris Lattner
1fcc101b1c Bugfix for calling dump() after the links vector has been cleared
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5533 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-10 22:46:47 +00:00
Chris Lattner
ed14f8283a Move getNode() out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-10 18:19:41 +00:00
Chris Lattner
c40c905d63 Implement a new method "viewGraph" which can be used to instantly view a graph from GDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-10 18:17:38 +00:00
Chris Lattner
d4aabcb0d0 TD Pass now does not cause globals to mark nodes incomplete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5512 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-09 18:40:25 +00:00
Chris Lattner
923fc05b3a Implement optimization for direct function call case. This dramatically
reduces the number of function nodes created and speeds up analysis by
about 10% overall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5495 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-05 21:59:58 +00:00
Chris Lattner
f52ade928c Add sanity check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5489 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-04 00:03:57 +00:00
Chris Lattner
4923d1be91 Hack to work around deficiency in pass infrastructure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5485 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-03 22:51:28 +00:00
Chris Lattner
5a939029d5 Eliminate unused resolving caller stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5475 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-03 19:11:04 +00:00
Chris Lattner
f9962812d0 * Add a bunch of stuff for checking the integrity of the graph
* remove the isNodeDead method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5474 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-03 19:10:24 +00:00
Chris Lattner
41c04f730b Change DSGraph stuff to use hash_(set|map) instead of std::(set|map)
This change provides a small (3%) but consistent speedup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5460 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 04:52:08 +00:00
Chris Lattner
cb98327142 Add new composition mask
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5454 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-01 03:28:26 +00:00
Chris Lattner
9e4b15b1a1 New API for traversing graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5430 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-29 21:09:59 +00:00
Chris Lattner
381977d191 * Eliminate boolean arguments in favor of using enums
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5420 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 22:06:33 +00:00
Chris Lattner
9f2b7ffe05 Move to include/llvm/CodeGen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5285 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 23:05:31 +00:00
Chris Lattner
8143d8f91a Move llvm/Analysis/LiveVar/ValueSet.h to CodeGen/ValueSet.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5282 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-14 22:56:37 +00:00
Chris Lattner
c2799163e2 Make a release build compile. This field is not really an enum, it's really a bitfield
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4971 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 05:31:26 +00:00
Misha Brukman
95c3d0e0fa No need to specify the class if the method is within the class declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4969 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-12 05:28:39 +00:00
Vikram S. Adve
0d4f76637d Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,
i.e., enumerates all data and control dependences for the function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4958 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 14:13:19 +00:00
Vikram S. Adve
96b21c1054 An explicit representation of dependence graphs, and a pass that
computes a dependence graph for data dependences on memory locations
using interprocedural Mod/Ref information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4957 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-08 13:26:29 +00:00
Vikram S. Adve
44974dcdeb Stronger assertion in getNodeId(): node id must exist in the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4949 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 21:19:07 +00:00
Vikram S. Adve
10afe022c5 Added static helper method MergeNodes(). See DataStructure.cpp for more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4946 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 21:10:17 +00:00
Chris Lattner
196cee2dba Make sure to print indirect node again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4943 91177308-0d34-0410-b5e6-96231b3b80d8
2002-12-06 06:40:00 +00:00
Vikram S. Adve
e127a14991 Added flags to CloneFlags to strip/keep Mod/Ref bits when cloning a graph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4835 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:39:37 +00:00
Vikram S. Adve
f443e6698f No longer need local graph to find call sites.
Also some major fixes within IPModRef.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4834 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-27 17:38:56 +00:00
Chris Lattner
a1cf699b50 Inline DSTypeRec stuff into DSNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4751 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:45:30 +00:00
Chris Lattner
686a6f5c13 Inline DSTypeRec into DSNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4750 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:45:07 +00:00
Chris Lattner
c59a1ba33b Templatize graph traits and iterator to work with const and non-const clients
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4746 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-18 21:42:19 +00:00
Chris Lattner
e9c04aedca Omit the indirect node when printing call graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4733 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-17 23:10:27 +00:00
Chris Lattner
21f3663c06 Remove dead method, add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4700 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-12 15:57:28 +00:00
Chris Lattner
cf69bb494a Almost complete rewrite of BU closure code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4693 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-11 21:34:34 +00:00
Chris Lattner
947b10c167 add method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4686 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 23:47:02 +00:00
Chris Lattner
b0dfcbf584 Add code to be able to merge two call sites
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4685 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 23:46:51 +00:00
Chris Lattner
8013f9eb65 Add hasGraph() methods to all of the passes for the printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4676 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:53:19 +00:00
Chris Lattner
5c533ae837 Implement swapping
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4674 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:48:24 +00:00
Chris Lattner
a3590f2496 Implement support for swapping. Callsites now sort by callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4673 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-10 06:48:11 +00:00