Commit Graph

415 Commits

Author SHA1 Message Date
Chris Lattner 24c1d5e551 Rename llvm/Analysis/LiveVar/FunctionLiveVarInfo.h -> llvm/CodeGen/FunctionLiveVarInfo.h
llvm-svn: 5284
2003-01-14 23:05:08 +00:00
Chris Lattner de1d729747 Move llvm/Analysis/LiveVar/ValueSet.h to CodeGen/ValueSet.h
llvm-svn: 5282
2003-01-14 22:56:37 +00:00
Chris Lattner 0b2f0ed730 Move annotations to support library
llvm-svn: 5270
2003-01-14 21:31:39 +00:00
Misha Brukman 1028ac46d6 'graph' is spelled without a 'c'.
Also added Statistic counters for NoAlias and MayAlias.

llvm-svn: 4972
2002-12-12 05:34:10 +00:00
Chris Lattner c42ada2e5e Remove #includes
llvm-svn: 4968
2002-12-12 03:47:27 +00:00
Vikram S. Adve 775e51d87a Iterator that enumerates the ProgramDependenceGraph (PDG) for a function,
i.e., enumerates all data and control dependences for the function.

llvm-svn: 4958
2002-12-08 14:13:19 +00:00
Vikram S. Adve 8975afdfc4 An explicit representation of dependence graphs, and a pass that
computes a dependence graph for data dependences on memory locations
using interprocedural Mod/Ref information.

llvm-svn: 4957
2002-12-08 13:26:29 +00:00
Chris Lattner 3935d2b1ec Add total instruction, bb, & function counts
llvm-svn: 4954
2002-12-07 23:24:24 +00:00
Vikram S. Adve 04aee9478c Two bug fixes:
(1) Make entries for Constant values in the ScalarMap.
(2) Set MOD bit for the node pointed to by the
    argument of a free instruction.

llvm-svn: 4948
2002-12-06 21:17:10 +00:00
Vikram S. Adve 0d5559fdfb Fix several related bugs in DSNode::mergeWith() caused by the
fact that the incoming nodes may be merged away at intermediate
steps.  Use an extra level of indirection via DSNodeHandles
to track the nodes being merged.  All this now happens in a
static helper function MergeNodes().

llvm-svn: 4947
2002-12-06 21:15:21 +00:00
Vikram S. Adve bfff743897 Cute bug fix: when moving links from N to this, some links could have
been missed if node *this got merged away due to recursive merging!
Also, links were not moved correctly if a node is collapsed.

llvm-svn: 4933
2002-12-05 17:17:26 +00:00
Chris Lattner 5e05817565 Simplify code
llvm-svn: 4886
2002-12-03 19:40:16 +00:00
Vikram S. Adve 2d2303db22 Fix logical error in TD pass: we should clear Mod/Ref bits of each caller
before inlining their graphs into a function.  To support this,
added flags to CloneFlags to strip/keep Mod/Ref bits.

llvm-svn: 4836
2002-11-27 17:41:13 +00:00
Vikram S. Adve 19b3303f3d (1) Bug fix that was causing nodes with dangling references to be freed.
We run removeDeadNodes() on the TD graph up front before using it.
(2) Major enhancement to printing of results: now we list the actual objects
    that are mod/ref instead of just printing the bit vectors.
Also an important bug fix in TDDataStructures pass (no change here):
clear Mod/Ref bits of callers before inlining into a function.

llvm-svn: 4833
2002-11-27 17:37:46 +00:00
Vikram S. Adve 68690673ad Keep global nodes in each DS Graph (by forcing them to be marked live).
llvm-svn: 4831
2002-11-25 18:21:25 +00:00
Chris Lattner 79d943eb67 Add peak memory usage measurement stuff
Add structure padding optimizations

llvm-svn: 4749
2002-11-18 21:44:46 +00:00
Chris Lattner 63a9e5c068 Add peak memory usage support
llvm-svn: 4748
2002-11-18 21:44:19 +00:00
Chris Lattner 77b80616b0 Add stats
llvm-svn: 4747
2002-11-18 21:42:45 +00:00
Chris Lattner 29a320bfcf Add hack to only consider indirect calls indirect if they do more than cast
their source function

llvm-svn: 4723
2002-11-17 22:17:12 +00:00
Chris Lattner 1e3652955b Add MaxSCC statistics
llvm-svn: 4722
2002-11-17 22:16:28 +00:00
Chris Lattner 342f68151e Count CallInsts correctly, remove unneccesary initializers
S: ----------------------------------------------------------------------

llvm-svn: 4721
2002-11-17 22:15:40 +00:00
Dinakar Dhurjati a7be9a7db7 Gives the count for various instructions.
llvm-svn: 4706
2002-11-13 18:22:13 +00:00
Vikram S. Adve 16eac628f4 Pass to compute various statisics related to DSGraphs.
For now, this just computes the #indirect call sites and
the avg. #callees per indirect call site (actually it prints
both totals and the average is their ratio).

llvm-svn: 4705
2002-11-13 15:41:00 +00:00
Chris Lattner ccc27ecd35 Inline graphs from outside the SCC into the SCC before SCC resolution starts
llvm-svn: 4701
2002-11-12 15:58:08 +00:00
Chris Lattner dcb4ac9594 Fix two bugs:
* The globals vector was getting broken and unsorted, this caused vortex
   to get badly pessimized
 * Node offset handling was being handled really poorly, and in particular
   we were not merging types with offsets right.  This causes several graphs
   to be non-merged.

llvm-svn: 4699
2002-11-12 07:20:45 +00:00
Chris Lattner 1aeca4d0e6 Fix bug
llvm-svn: 4697
2002-11-11 22:23:56 +00:00
Chris Lattner eb10d4cbce Handle a mismatch between # function args and call site args
llvm-svn: 4696
2002-11-11 21:36:05 +00:00
Chris Lattner 8aed9820e2 Elimiante calls to a node with nothing in it.
llvm-svn: 4695
2002-11-11 21:35:38 +00:00
Chris Lattner 59821c5ce6 Complete rewrite of BU code to use Tarjan's SCC finding algorithm to drive
the algorithm instead of hand coded depth first iteration

llvm-svn: 4694
2002-11-11 21:35:13 +00:00
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 a2620ac156 Fix warning
llvm-svn: 4649
2002-11-09 00:49:43 +00:00