Commit Graph

577 Commits

Author SHA1 Message Date
Chris Lattner
dd3dd4abeb Mark stuff reachable by _AUX_ calls as incomplete in the BU graph
llvm-svn: 4690
2002-11-11 03:36:55 +00:00
Chris Lattner
cca3599c0b Fix infinite loop in the BU algorithm. Unfortunately this dies a serious
death when handling moderately sized SCC's, but what can you do

llvm-svn: 4689
2002-11-11 00:01:34 +00:00
Chris Lattner
773da868a0 Print the right call set size
llvm-svn: 4688
2002-11-11 00:01:02 +00:00
Chris Lattner
6fa9a7f7f4 Use call site mergeWith method to simplify code
llvm-svn: 4687
2002-11-11 00:00:46 +00:00
Chris Lattner
d7f9f635ec Fix a bug that could trigger when varargs call sites had non-matching number of arguments
llvm-svn: 4683
2002-11-10 07:46:08 +00:00
Chris Lattner
7b61563d99 * Dramatically rework liveness evaluation.
* Implement the first step of the Globals graph: Deleting nodes from function
  graphs.  In practice, these nodes need to be moved to the globals graph, but
  this will be taken care of later.  Note that the graphs computed right now are
  not strictly correct!

llvm-svn: 4681
2002-11-10 06:59:55 +00:00
Chris Lattner
e79ce7d359 Honor the shouldPrintAuxCalls flag
llvm-svn: 4678
2002-11-10 06:53:59 +00:00
Chris Lattner
17da287408 Initialize PrintAuxCalls member
llvm-svn: 4677
2002-11-10 06:53:38 +00:00
Chris Lattner
3b83d797d6 * Bottom-Up graphs print the Aux call vector
* Significantly improve DEBUG output
* Aggressively fold calls together if we inlined a graph that provides
  call nodes.
* Add a bailout if the current graph has over 200 call nodes in it, this is
  a really whacky case that should never happen.

llvm-svn: 4675
2002-11-10 06:52:47 +00:00
Chris Lattner
715a3a3b5c eliminate the ability to remove global nodes from deadNodeElminate... for now.
This slows stuff down a bit, but it should get much better before it gets any
worse.

llvm-svn: 4666
2002-11-09 22:07:02 +00:00
Chris Lattner
3e32cd8e8b Remove obsolete code
llvm-svn: 4665
2002-11-09 21:41:44 +00:00
Chris Lattner
d185d2ce9d Fix logic
llvm-svn: 4664
2002-11-09 21:40:58 +00:00
Chris Lattner
4b1be35569 Add globals graphs to all three passes
llvm-svn: 4663
2002-11-09 21:12:07 +00:00
Chris Lattner
0de21ea32d Move maskNodeTypes to header file
llvm-svn: 4661
2002-11-09 21:02:26 +00:00
Chris Lattner
380d1ad4ab Clean up DSGraph::removeDeadNodes interface
llvm-svn: 4660
2002-11-09 21:00:49 +00:00
Chris Lattner
e703c52b20 Make removeTriviallyDeadNodes a private interface of DSGraph
llvm-svn: 4659
2002-11-09 20:55:24 +00:00
Chris Lattner
2dd1adafa6 Don't put constants into the scalar map!
llvm-svn: 4657
2002-11-09 20:14:03 +00:00
Chris Lattner
e742f31e0c Add initial support for a globals graph
llvm-svn: 4656
2002-11-09 20:01:01 +00:00
Chris Lattner
5737a600d7 Tighten up array handling
llvm-svn: 4655
2002-11-09 19:25:27 +00:00
Chris Lattner
bcc12023ce #include Datastructure.h first
llvm-svn: 4654
2002-11-09 19:25:10 +00:00
Chris Lattner
63aeefeafb Fix warning & release build
llvm-svn: 4648
2002-11-09 00:49:05 +00:00
Chris Lattner
be46569ba1 Fold arrays down to a single element. This causes huge wins on some benchmarks
for example: 197.parser (64M->14M), 164.gzip (14M->2.7M).  The actual graphs
represented should not change at all.

llvm-svn: 4643
2002-11-08 22:49:57 +00:00
Chris Lattner
09a21dc2f5 ONLY merge in the aux call sites, this causes a HUGE speedup
llvm-svn: 4640
2002-11-08 22:27:25 +00:00
Chris Lattner
56363a05e6 Allow specification of whether the call sites should be copied, AND whether
the aux call sites should be copied

llvm-svn: 4639
2002-11-08 22:27:09 +00:00
Chris Lattner
ef305cec98 Reenable 'quick exit' case
llvm-svn: 4638
2002-11-08 22:26:43 +00:00
Chris Lattner
0c2f4bab3a Reimplement TD pass completely it now works
llvm-svn: 4635
2002-11-08 21:28:37 +00:00
Chris Lattner
a06ac62a5e Cannot modify original call sites vector
llvm-svn: 4634
2002-11-08 21:27:37 +00:00
Chris Lattner
c20122732e - Add a bunch of checking to make sure that dead nodes are not used after they
are marked DEAD.  This helped track down some bugs
- Fix a bunch of bugs where we were doing work on nodes after they became dead
- Add support for aux function call sites
- Add support for not cloning call sites

llvm-svn: 4633
2002-11-08 21:27:12 +00:00
Chris Lattner
639898c9bb Remove gunk used by broken TD pass
llvm-svn: 4632
2002-11-08 21:25:24 +00:00
Chris Lattner
a075a5801b Use DSNodeHandleMap instead to be safe
llvm-svn: 4622
2002-11-08 05:01:14 +00:00
Chris Lattner
5e730ed972 * actually handle constants (especially constantexprs) correctly.
- This seems to dramatically improve many benchmarks, only slowing down
    gzip significantly.

llvm-svn: 4621
2002-11-08 05:00:44 +00:00
Chris Lattner
b0c9b37048 Add flush
llvm-svn: 4619
2002-11-08 01:21:07 +00:00
Chris Lattner
5e865cdbe2 Instead of using a bool that constant has to be explained, use a self
explanitory enum instead.

llvm-svn: 4600
2002-11-07 07:06:20 +00:00
Chris Lattner
df307e6fd0 Implement a new mergeInGraph method, which basically factors code out of
the BU class.

This will be used by the IPModRef class to do stuff, eventually perhaps the
TD pass will use it also.

Speaking of the TD pass, this also eliminates the self recursive case, which
was broken, and couldn't occur anyway.

llvm-svn: 4599
2002-11-07 06:31:54 +00:00
Chris Lattner
ca03c3b516 Rename DataStructureAnalysis namespace to DS
llvm-svn: 4596
2002-11-07 05:20:53 +00:00
Chris Lattner
f9d29b3299 Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, and
The problem was merging two unsized types like function's, ie int (int*) with
int (uint *)

llvm-svn: 4594
2002-11-07 04:59:28 +00:00
Chris Lattner
c03a377f6a Compute total number of nodes and # call nodes
llvm-svn: 4592
2002-11-07 02:18:46 +00:00
Chris Lattner
4f8e2acaa2 Move printouts to be wrapped in DEBUG() macros
llvm-svn: 4588
2002-11-07 01:54:56 +00:00
Chris Lattner
2d0081a148 When the -only-print-main-ds option is specified, still print out graph size
statistics for skipped functions

llvm-svn: 4587
2002-11-07 01:54:44 +00:00
Chris Lattner
92acbcda99 Change Steens class to build with Vikram's changes
llvm-svn: 4572
2002-11-06 18:08:32 +00:00
Chris Lattner
2b79f4b7c3 Make PointerSize & Shift be enums
Fix problem with recursive merging

llvm-svn: 4570
2002-11-06 18:01:39 +00:00
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