Chris Lattner
48e37d9b97
Dramatically simplify internal DSNode representation, get implementation
...
*FULLY OPERATIONAL* and safe. We are now capable of completely analyzing
at LEAST the Olden benchmarks + 181.mcf
llvm-svn: 4562
2002-11-06 06:20:27 +00:00
Chris Lattner
230f6926b0
Delete "StripScalars" argument to cloneInto method
...
llvm-svn: 4560
2002-11-06 06:16:30 +00:00
Chris Lattner
6c213d673b
Attempted fixes to the mergemap to make it work better.
...
Ended up disabling merge map merging completely. It shall be removed.
llvm-svn: 4550
2002-11-05 00:01:58 +00:00
Chris Lattner
7e8b76009f
Change the "Cannot merge two portions of the same node yet" from an assertion
...
into a "oh crap, lets collapse" case
llvm-svn: 4530
2002-11-04 06:48:26 +00:00
Chris Lattner
cd691d2047
Give a better error message in an unhandled case
...
llvm-svn: 4521
2002-11-04 02:29:15 +00:00
Chris Lattner
a20fabc7ec
Rename ValueMap to ScalarMap
...
llvm-svn: 4516
2002-11-03 21:27:48 +00:00
Chris Lattner
bd7af8e664
Rename NewNode flag to HeapNode
...
llvm-svn: 4515
2002-11-03 21:24:04 +00:00
Chris Lattner
4b6a813048
Change the letters used to represent stack and heap allocations to "S" and "H"
...
respectively. This is to make presentation easier in the paper.
llvm-svn: 4514
2002-11-03 19:46:15 +00:00
Chris Lattner
63ba1aca7c
Implement the "unknown flag" which mainly consists of aligning printing code
...
llvm-svn: 4490
2002-11-02 00:36:03 +00:00
Chris Lattner
364e6e82fd
Oops, this was not meant to be checked in
...
llvm-svn: 4489
2002-11-02 00:26:32 +00:00
Chris Lattner
a7b0d4eb08
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. :)
llvm-svn: 4488
2002-11-02 00:13:20 +00:00
Chris Lattner
8a1854fc47
Fix comments, steens is context sensitive, we just haven't implemented
...
mod/ref apis yet
llvm-svn: 4485
2002-11-01 17:34:23 +00:00
Chris Lattner
8c68d869e5
Add a fixme
...
llvm-svn: 4479
2002-10-31 23:24:00 +00:00
Chris Lattner
c1d8820711
* 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.
llvm-svn: 4476
2002-10-31 22:41:15 +00:00
Chris Lattner
5d428a0029
Remove dead code
...
llvm-svn: 4467
2002-10-31 06:52:26 +00:00
Chris Lattner
7d5f19886d
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.
llvm-svn: 4465
2002-10-31 05:45:02 +00:00
Chris Lattner
51a2c3cc2d
- 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.
llvm-svn: 4260
2002-10-22 16:01:03 +00:00
Chris Lattner
d90e74ae13
The callee is not correct, and confuses the TD pass. Null it out.
...
llvm-svn: 4259
2002-10-22 15:58:46 +00:00
Chris Lattner
155fffd350
Delete unused arguments to DSGraph::cloneInto method
...
llvm-svn: 4253
2002-10-21 19:50:29 +00:00
Chris Lattner
f76087336f
- 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.
llvm-svn: 4252
2002-10-21 19:47:18 +00:00
Chris Lattner
c6191df9af
Add another copy ctor form
...
llvm-svn: 4251
2002-10-21 15:32:34 +00:00
Chris Lattner
78c1e7d83c
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.
llvm-svn: 4250
2002-10-21 15:04:18 +00:00
Chris Lattner
32438d8c84
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.
llvm-svn: 4249
2002-10-21 13:51:30 +00:00
Chris Lattner
800b7e33df
Fix a confusing bug that caused return value and callee pointers to not
...
be printed!
llvm-svn: 4248
2002-10-21 13:47:57 +00:00
Chris Lattner
2f5a6d46ae
Remove some unneccesary 'using' directives
...
llvm-svn: 4246
2002-10-21 13:31:48 +00:00
Chris Lattner
80e1a74820
Fix bug with prior checkin
...
llvm-svn: 4242
2002-10-21 02:18:55 +00:00
Chris Lattner
5c3ce31e1f
- 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.
llvm-svn: 4240
2002-10-21 02:08:03 +00:00
Chris Lattner
faa756ecee
Avoid extra copy
...
llvm-svn: 4239
2002-10-20 22:12:06 +00:00
Chris Lattner
3af17ce2cf
Simplify code a bit, add comment flyer
...
llvm-svn: 4238
2002-10-20 22:11:44 +00:00
Chris Lattner
fd16b72fc7
Split some long lines
...
llvm-svn: 4237
2002-10-20 22:11:17 +00:00
Vikram S. Adve
e85319693e
Remove spurious caller pointer in DSCallSite.
...
Also add functions to access pointer argument nodes cleanly.
llvm-svn: 4235
2002-10-20 21:41:02 +00:00
Chris Lattner
c94855e46b
This function can be static
...
llvm-svn: 4234
2002-10-20 20:39:31 +00:00
Chris Lattner
07d69052f8
Fix previous checkin :(
...
llvm-svn: 4233
2002-10-20 20:39:17 +00:00
Chris Lattner
28bef38c56
Avoid extra callSite copy
...
llvm-svn: 4232
2002-10-20 20:32:13 +00:00
Chris Lattner
43301680aa
Print the array flag
...
llvm-svn: 4231
2002-10-20 20:29:10 +00:00
Vikram S. Adve
dc9e142686
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.
llvm-svn: 4228
2002-10-20 18:07:37 +00:00
Chris Lattner
f931f6b5c7
Convert typerec to be a structure instead of a pair
...
llvm-svn: 4226
2002-10-18 18:22:46 +00:00
Chris Lattner
ac2de97c75
Print Mod/ref info
...
llvm-svn: 4224
2002-10-17 22:13:28 +00:00
Chris Lattner
b4e800aabf
Calculate mod/ref info
...
llvm-svn: 4223
2002-10-17 22:13:19 +00:00
Chris Lattner
bf25578f02
Remove more obsolete code
...
llvm-svn: 4221
2002-10-17 20:53:12 +00:00
Chris Lattner
b182216df8
* 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
llvm-svn: 4220
2002-10-17 20:09:52 +00:00
Chris Lattner
981c92a9e2
Remove obsolete code
...
llvm-svn: 4218
2002-10-17 04:58:10 +00:00
Chris Lattner
7c02ec2562
Enable incompleteness marking
...
llvm-svn: 4217
2002-10-17 04:57:28 +00:00
Chris Lattner
f10327ebce
* 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.
llvm-svn: 4215
2002-10-17 04:26:54 +00:00
Chris Lattner
6b5acda098
Reenable printing of TD analysis
...
llvm-svn: 4214
2002-10-17 04:24:30 +00:00
Chris Lattner
a1cfcf4dff
* Add data structures and code to track the call sites for each function
...
llvm-svn: 4213
2002-10-17 04:24:08 +00:00
Chris Lattner
ddebb4343e
Cleanup data structure graph printer, eliminate hard coded printing in
...
favor of generic printer.
llvm-svn: 4209
2002-10-17 01:02:46 +00:00
Chris Lattner
7b0ebe9983
Make sure to print out the call nodes as well
...
llvm-svn: 4203
2002-10-16 20:16:16 +00:00
Chris Lattner
fea9f0b786
* Print the "return" node in the graphs
...
llvm-svn: 4199
2002-10-16 02:04:36 +00:00
Chris Lattner
5274757b62
The second element of the iterator is really an offset, not a link
...
llvm-svn: 4196
2002-10-16 01:43:11 +00:00