Commit Graph

68 Commits

Author SHA1 Message Date
Chris Lattner
198be22cec - Add "ResolvingCaller" to the CallSite record. This keeps track of which
function was finally able to resolve the function call.  Adding this allows
    the TD pass to actually work right!
  - Temporarily disable dead node pruning.  This will be reenabled soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4252 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:47:18 +00:00
Chris Lattner
eff0da9d33 Add another copy ctor form
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4251 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:32:34 +00:00
Chris Lattner
99a22847ba As it turns out, we don't need a fully generic mapping copy ctor, we just need
something that maps through a std::map.  Since this simplified the client and
implementation code, do so now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4250 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 15:04:18 +00:00
Chris Lattner
2bf30fd65a Make sure to initialize isArray member
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4247 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:38:07 +00:00
Chris Lattner
b0a37b70e8 Two callsites are equivalent even if they are from two completely different
call instructions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4241 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:09:03 +00:00
Chris Lattner
0969c50cb8 - Make DSCallSite not inherit from std::vector. Renamed methods slightly.
Make copy ctor have two versions to avoid dealing with conditional template
    argument.  DSCallSite ctor now takes all arguments instead of taking one
    and being populated later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4240 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:08:03 +00:00
Vikram S. Adve
26b98265b7 Remove spurious caller pointer in DSCallSite.
Also add functions to access pointer argument nodes cleanly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4235 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 21:41:02 +00:00
Chris Lattner
d9faa34339 Add isArray flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4230 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:28:35 +00:00
Vikram S. Adve
3c579faece Added a first-class representation for each call site that can be
used in the DS graphs in DSGraph.h.  With that, the special-purpose
class BUDataStructure::CallSite is no longer needed here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4229 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:08:55 +00:00
Vikram S. Adve
726bafda65 Added a first-class representation for each call site that can be used
in the DS graphs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4227 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:04:43 +00:00
Chris Lattner
a3f8586d9d Convert typerec to be a structure instead of a pair
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4226 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-18 18:22:46 +00:00
Chris Lattner
b65dfff141 Add interface for mod/ref info to be captures by dsgraphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4222 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 21:03:49 +00:00
Chris Lattner
8d00c8210e * Add data structures to BU pass to keep track of call sites for functions
* Reenable the TD analysis


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4212 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:23:05 +00:00
Chris Lattner
a2c5c2b23a * Remove a lot of obsolete #if 0'd code
* Add a simple getNodeForValue method to access the ValueMap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4211 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:22:16 +00:00
Chris Lattner
8ebb1c4023 Be const correct. Handle both DSGraph* and const DSGraph*'s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4208 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:01:06 +00:00
Chris Lattner
ff5feedf28 The second element of the iterator is really an offset, not a link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4196 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:43:11 +00:00
Chris Lattner
d6d8f41699 Allow direct access to mergemap for printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4191 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:17:16 +00:00
Chris Lattner
2576aef32b First crack at reimplementing graph traits for DSGraphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4145 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-13 19:31:34 +00:00
Chris Lattner
ab363148fb Change reference
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4110 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 22:31:02 +00:00
Chris Lattner
c582c66f63 Rename DataStructureGraph.h to DSGraphTraits.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4107 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-10 20:36:37 +00:00
Chris Lattner
0d0244d06a Remove commented out stuff
DataStructure.h doesn't include DSGraph.h now


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4028 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 22:14:17 +00:00
Chris Lattner
60a398ed0f Move GlobalDSGraph class defn to the end of the file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4027 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:55:52 +00:00
Chris Lattner
e5346ec9ed This file doesn't need Pass.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4026 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 21:55:24 +00:00
Chris Lattner
27236ac089 * Implement fully general merging of array subscripts on demand! This
does not handle the initial pointer index case yet though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4011 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 06:24:29 +00:00
Chris Lattner
8b719877b1 Checkin the "meat" of the Data structure graph itself. I forgot to check
this in before.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4009 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-02 04:58:12 +00:00
Chris Lattner
11aec6cc7d Check in DataStructure rewrite so far.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3998 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-01 22:34:45 +00:00
Chris Lattner
044f908791 - Do not expose ::ID from any of the analyses anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3416 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-21 17:09:45 +00:00
Chris Lattner
5b2f502968 The second parameter of hash_set is the default, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3273 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-09 19:40:42 +00:00
Chris Lattner
5f0eb8da62 - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3265 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-08 19:01:30 +00:00
Chris Lattner
49af5e4131 Changes to be GCC 3.1 friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3184 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-31 19:31:59 +00:00
Vikram S. Adve
3b43b772e6 Add GlobalDSGraph -- a common graph that holds externally visible nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3169 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-30 22:02:04 +00:00
Chris Lattner
d472e47b6c * Eliminate the Provided set. All Passes now finally just automatically
provide themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3125 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-29 21:03:38 +00:00
Chris Lattner
97f51a3024 * Standardize how analysis results/passes as printed with the print() virtual
methods
* Eliminate AnalysisID:  Now it is just a typedef for const PassInfo*
* Simplify how AnalysisID's are initialized
* Eliminate Analysis/Writer.cpp/.h: incorporate printing functionality into
  the analyses themselves.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3115 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-27 01:12:15 +00:00
Chris Lattner
5d549083e2 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3111 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 21:11:42 +00:00
Chris Lattner
00444d0630 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3107 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-26 19:19:31 +00:00
Chris Lattner
c6a4bf1251 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3077 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-25 15:00:45 +00:00
Chris Lattner
3f5569152c GCC 3.1 changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3070 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 22:34:01 +00:00
Chris Lattner
f6a1328e4c Remove assert hack now that I'm using the right GDB. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3045 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-24 17:21:36 +00:00
Chris Lattner
f1ac9f6a7f Allow comparison against null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3009 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:59:02 +00:00
Chris Lattner
2dfbe3a751 Rename removeDeadNodes to removeTriviallyDeadNodes
Add new removeDeadNodes method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2968 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 18:18:40 +00:00
Chris Lattner
a990291462 Simplify saveOrigFunctionCalls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2967 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 16:23:02 +00:00
Vikram S. Adve
6aa0d62cb9 Add support for a top-down propagation pass.
Each DSGraph now keeps a list of pending callers that have not
been inlined into the function represented by that graph.
It also keeps a copy of the original call nodes before the BU pass
eliminates some of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2965 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 16:12:08 +00:00
Chris Lattner
84428e1892 First cut at implementing bottom up analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2944 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-18 00:11:28 +00:00
Chris Lattner
1dc15b7997 * Nodes now keep track of any global variables contained within them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2877 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-11 20:30:18 +00:00
Chris Lattner
cd0b36fb07 New implementation of data structure analysis
This diff is completely meaningless because this is a replacement
implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2872 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 22:42:17 +00:00
Anand Shukla
4a9f933751 changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2786 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 20:22:25 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00
Chris Lattner
f57b845547 * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 06:56:12 +00:00
Chris Lattner
12be9749d6 Support array allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2326 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-27 02:27:11 +00:00