Commit Graph

330 Commits

Author SHA1 Message Date
Chris Lattner
d18f342af8 Rename NewNode flag to HeapNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4515 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 21:24:04 +00:00
Chris Lattner
ef69ccf71b Change the letters used to represent stack and heap allocations to "S" and "H"
respectively.  This is to make presentation easier in the paper.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4514 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-03 19:46:15 +00:00
Chris Lattner
5af344d79d Implement the "unknown flag" which mainly consists of aligning printing code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4490 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:36:03 +00:00
Chris Lattner
7a0b5bb7ab Oops, this was not meant to be checked in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4489 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:26:32 +00:00
Chris Lattner
92673296e6 Stop representing scalars as explicit nodes in the graph. Now the only
nodes in the graph are memory objects, which is very nice.  This also greatly
reduces the size and memory footprint for DSGraphs.  For example, the local
DSGraph for llu went from 65 to 13 nodes with this change.  As a side bonus,
dot seems to lay out the graphs slightly better too.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4488 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-02 00:13:20 +00:00
Chris Lattner
4f53bef7cd Fix comments, steens is context sensitive, we just haven't implemented
mod/ref apis yet


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4485 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-01 17:34:23 +00:00
Chris Lattner
7f124e3abd Add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4479 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 23:24:00 +00:00
Chris Lattner
9b87c5c53c * Minor optimization: when merging nodes, merge the smaller one into the
larger one.
     * Handle the case where we are merging two nodes of different size better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4476 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 22:41:15 +00:00
Chris Lattner
7e51c8741f Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4467 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 06:52:26 +00:00
Chris Lattner
8f0a16eac6 This fixes all kinds of problems with array handling. There are still bugs to
be fixed, but we are getting much closer now.

    * Make DSNode::TypeRec a full fledged DSTypeRec type.
    * Add methods used to update and access the typerecords elements
    * Add methods to query if and to cause a node to be completely folded
    * DSGraph construction doesn't use the allocation type for anything at all,
      now nodes get their type information based on how they are used.
    * Fixed a bug with global value handling introduced in the last checkin
    * GEP support is now much better, arrays are handled correctly.  The array
      flag is now updated in type records.  There are still cases that are not
      handled yet (we do not detect pessimizations), but getting much closer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4465 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 05:45:02 +00:00
Chris Lattner
f37c34430d Use new isCommutative interface, which gives us SetEQ and SetNE for free.
Thanks fly out to Casey Carter for this fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4460 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-31 04:20:07 +00:00
Misha Brukman
a3bbcb5b66 Fix spelling of `propagate'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4423 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-29 23:06:16 +00:00
Chris Lattner
601fc7c71c Eliminate uses of MachineBasicBlock::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4340 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 18:01:21 +00:00
Chris Lattner
55291ead55 Rename MachineCodeForBasicBlock to MachineBasicBlock
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4318 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-28 01:41:47 +00:00
Chris Lattner
4bdb9b7ebe - Make sure to only keep track of mappings that the TD pass may need in the
future.  This prevents having spurious map entries to nodes that we really
    don't care about.  This allows us to reenable the DeadNodeElim, which was
    disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4260 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 16:01:03 +00:00
Chris Lattner
9faf18d523 The callee is not correct, and confuses the TD pass. Null it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4259 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-22 15:58:46 +00:00
Chris Lattner
e4ae3041f9 Delete unused arguments to DSGraph::cloneInto method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4253 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 19:50:29 +00:00
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
448f4949dc Don't create a new node for every reference to a global. This caused a huge
node explosion that doesn't help anything at all.  In previous versions of
the representation this DID help, but not anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4249 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:51:30 +00:00
Chris Lattner
482b651cf8 Fix a confusing bug that caused return value and callee pointers to not
be printed!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4248 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:47:57 +00:00
Chris Lattner
13ec72a12a Remove some unneccesary 'using' directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4246 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 13:31:48 +00:00
Chris Lattner
65d6a9ee47 Fix bug with prior checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4242 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-21 02:18:55 +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
Chris Lattner
0c8d73b74c Avoid extra copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4239 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:12:06 +00:00
Chris Lattner
9de906c72a Simplify code a bit, add comment flyer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4238 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:11:44 +00:00
Chris Lattner
7836d609fa Split some long lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4237 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 22:11:17 +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
e80fe61a72 This function can be static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4234 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:39:31 +00:00
Chris Lattner
d1f8d0abeb Fix previous checkin :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4233 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:39:17 +00:00
Chris Lattner
bd14460289 Avoid extra callSite copy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4232 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:32:13 +00:00
Chris Lattner
af4800b8a9 Print the array flag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4231 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 20:29:10 +00:00
Vikram S. Adve
42fd169310 Added a first-class representation for each call site that can be
used in the DS graphs.  Essentially, what was vector<DSNodeHandle>
before is now a DSCallSite with the same vector, plus pointers to the
CallInst and the caller Function.  The special-purpose class
BUDataStructure::CallSite is no longer needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4228 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-20 18:07:37 +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
dc062d3e6c Print Mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4224 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 22:13:28 +00:00
Chris Lattner
06285237ea Calculate mod/ref info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4223 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 22:13:19 +00:00
Chris Lattner
97e7f083f2 Remove more obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4221 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 20:53:12 +00:00
Chris Lattner
cf15db34d3 * Make the DSGraph cloner automatically merge global nodes
* BUClosure doesn't have to worry about global nodes
 * TDClosure now works with global nodes
 * Reenable DNE on TD pass, now that globals work right


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4220 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 20:09:52 +00:00
Chris Lattner
3cc061c0e9 Remove obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4218 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:58:10 +00:00
Chris Lattner
19db0492b8 Enable incompleteness marking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4217 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:57:28 +00:00
Chris Lattner
0e74412cee * First try at implementing TD pass this does not merge global nodes yet,
among other things.
  * Significant rewrite of TD pass to avoid potentially N^2 algorithms if
    possible.  It is still not complete, but at least it's checked in now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4215 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:26:54 +00:00
Chris Lattner
e25ab83a5f Reenable printing of TD analysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4214 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:24:30 +00:00
Chris Lattner
613692c106 * Add data structures and code to track the call sites for each function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4213 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 04:24:08 +00:00
Chris Lattner
e17a4e8b55 Cleanup data structure graph printer, eliminate hard coded printing in
favor of generic printer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4209 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-17 01:02:46 +00:00
Chris Lattner
962ee45fe6 Make sure to print out the call nodes as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4203 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 20:16:16 +00:00
Chris Lattner
eb265cdc90 * Print the "return" node in the graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4199 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 02:04:36 +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
641e1c252d Specify the graph name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4195 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:34:28 +00:00
Chris Lattner
f29e307765 - DSGraph Printing Improvements:
* Print edge source labels again
     * Override node shape to be Mrecord again, instead of just record.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4193 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-16 01:18:27 +00:00