Commit Graph

810 Commits

Author SHA1 Message Date
Chris Lattner
1694ec615f add a dump method to CallGraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25314 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-14 19:17:02 +00:00
Chris Lattner
2e761e29f8 Switch loopinfo to using ETForest instead of DominatorSet to compute itself.Patch by Daniel Berlin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25200 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-11 05:08:57 +00:00
Chris Lattner
e8605a475f Fix the build on platforms where <cassert> doesn't define NULL
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25147 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 09:10:46 +00:00
Chris Lattner
ccacd3ccc2 Initial implementation of the ET-Forest data structure for dominators and
post-dominators.  This code was written/adapted by Daniel Berlin!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 08:22:18 +00:00
Chris Lattner
03839956e2 Separate the call graph implementation from its interface. This implements
the rough idea sketched out in http://nondot.org/sabre/LLVMNotes/CallGraphClass.txt,
allowing new spiffy implementations of the callgraph interface to be built.

Many thanks to Saem Ghani for contributing this!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24944 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 06:07:52 +00:00
Sumant Kowshik
f8395ba498 Added comment for removing assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:16:08 +00:00
Sumant Kowshik
14d1d22f37 Handling of zero length last fields in struct used for growing it arbitrarily
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24620 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 18:01:20 +00:00
Chris Lattner
8bdbb63243 Add a simple clear() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24543 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-30 19:31:23 +00:00
Chris Lattner
d87ef134d7 Fix PR670 and test/Regression/Transforms/Mem2Reg/2005-11-28-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-29 01:07:12 +00:00
Chris Lattner
a35bef9db2 Fix the dominates method to return true if the two nodes are the same. Add
a new properlyDominates method to do what the old one did.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24407 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-18 07:27:33 +00:00
Chris Lattner
9a83508a27 remove a dead header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24084 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-29 04:43:10 +00:00
John Criswell
bd9d37026a Move some constant folding functions into LLVMAnalysis since they are used
by Analysis and Transformation passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 16:00:10 +00:00
Chris Lattner
f753ea7a15 This pass is very old and quite useless, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23946 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:35:24 +00:00
Chris Lattner
d5bc0e5f9c add a proto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23923 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:00:32 +00:00
Chris Lattner
efec5e1599 new header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23921 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:59:49 +00:00
Chris Lattner
cd04092fe4 add some prototypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23919 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:38:25 +00:00
Chris Lattner
331a1833e1 new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-12 17:03:16 +00:00
Chris Lattner
27631a30eb add two helper methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22735 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-09 23:36:18 +00:00
Jeff Cohen
d29b6aa608 Keep tabs and trailing spaces out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22565 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 18:33:25 +00:00
Nate Begeman
36f891bdf6 Break SCEVExpander out of IndVarSimplify into its own .h/.cpp file so that
other passes may use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22557 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 00:12:19 +00:00
Jeff Cohen
9eb59ec548 Eliminate tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22520 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 05:53:44 +00:00
Chris Lattner
50f5490842 Don't crash on a query where the block is not in any loop. Thanks to
Sameer D. Sahasrabuddhe for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22314 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-29 17:41:25 +00:00
Andrew Lenharth
14f1703ae3 make AliasAnalysis know that VAArg writes memory. This is extremely conservative and should be fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22267 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-20 15:24:23 +00:00
Chris Lattner
3e909e8bb9 fix warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22060 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 17:25:14 +00:00
Chris Lattner
7a5659176f fix compiler warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22059 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 17:23:19 +00:00
Reid Spencer
edd5d9ece1 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 16:13:11 +00:00
Tanya Lattner
21d6ff546d Add accessor method,
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-01 16:22:41 +00:00
Misha Brukman
3b1b6e626e Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 03:27:20 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Chris Lattner
07753cecb9 add support for taking the address of free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21395 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:08:59 +00:00
Chris Lattner
0f67dd6237 Improve doxygen documentation, patch contributed by Evan Jones!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21393 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 16:04:49 +00:00
Chris Lattner
48574ab52c merge EquivClassGraphs.h into DataStructure.h with the other DSA pass definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21041 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:08:06 +00:00
Chris Lattner
da7c380eb4 add and use a callee_iterator typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21037 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 20:02:32 +00:00
Chris Lattner
df968b8b37 Change the ActualCallees callgraph from hash_multimap<Instruction,Function>
to std::set<std::pair<Inst,Func>> to avoid duplicate entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21030 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-02 19:15:15 +00:00
Chris Lattner
487cd15fdb add new spliceFrom methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20823 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-24 23:45:20 +00:00
Chris Lattner
8eec644862 if a function doesn't access memory at all, it definitely doesn't read it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20794 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 23:27:34 +00:00
Chris Lattner
65512d2525 a hack to allow count-aa to work with ds-aa :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20791 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-23 21:59:34 +00:00
Chris Lattner
ee76095307 Fix a serious bug where we didn't insert globals into the globalset when
cloning a graph.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20770 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 19:44:11 +00:00
Chris Lattner
54fdcb2480 add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20761 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 01:42:10 +00:00
Chris Lattner
a2197139b5 Now that the dead ctor is gone, nothing uses the old node mapping exported by
cloneInto: make it an internally used mapping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20760 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:36:51 +00:00
Chris Lattner
5805c426dc remove a dead ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20759 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:33:35 +00:00
Chris Lattner
d65145bd3d now that the second argument is always this->ReturnNodes, don't bother passing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20758 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:29:44 +00:00
Chris Lattner
077531385e drop the second argument to cloneInto, which is always the local scalar map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20753 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:20:56 +00:00
Chris Lattner
dc77036a82 move this stuff out of line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20750 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-22 00:09:36 +00:00
Chris Lattner
f21918bfaf allow passing clone flags into the ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20747 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 22:49:43 +00:00
Chris Lattner
d75e334d24 add a new map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20742 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 20:29:56 +00:00
Chris Lattner
b3439374ac make this const correct
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20741 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 20:28:50 +00:00
Chris Lattner
c26f6d3899 Ugh, for some reason, I can't call this unless the reference is const!?!?!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20732 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 10:00:45 +00:00
Chris Lattner
38d807ea8b Make the first operand of this method be modifiable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 09:39:20 +00:00
Chris Lattner
2c012590d7 add a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-21 09:38:39 +00:00
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