Hierarchy.xcc

Benoit Dupont de Dinechin (Benoit.Dupont-de-Dinechin@st.com).

Copyright 2002 - 2007 STMicroelectronics. Copyright 1995 - 1998 Commissariat a l'Energie Atomique.

This program is free software; you can redistribute it and/or modify it under the terms of either (at your option): the GNU General Public License (GPL) version 2; the GNU Lesser General Public License (LGPL) version 2.1; any later version of these licences as published by the Free Software Foundation.

HierarchyComponentType— Enumerate the HierarchyComponent types.
typedef enum {
  HierarchyComponentType_Node,
  HierarchyComponentType_Root,
  HierarchyComponentType_SCC,
  HierarchyComponentType_Loop,
  HierarchyComponentType__
} HierarchyComponentType;
typedef uint8_t short_HierarchyComponentType;
HierarchyComponent— Region in a Hierarchy of a DGraph.
struct HierarchyComponent_ {
  //@args       HierarchyComponentType type, DGraphNode node
  short_HierarchyComponentType TYPE;    // This HierarchyComponent type.
  int16_t DEPTH;                        // Nesting level of this HierarchyComponent.
  DGraphNode NODE;                      // DGraphNode.
  struct HierarchyComponent_ *CHILD;    // First child of this HierarchyComponent.
  struct HierarchyComponent_ *NEXT;     // Next child in parent HierarchyComponent.
};
Hierarchy— Hierarchy of Strongly Connected Regions.
struct Hierarchy_ {
  //@args       Memory memory, DGraph dgraph, DGraphNode entry
  Memory MEMORY;
  int32_t COUNT;
  DGraphNode *NODEOF;           // Array of DGraphNode(s) indexed by DGraphNode_NUMBER.
  DGraphNode ENTRY;
  int32_t *DFN;                 // Array of DFN numbers indexed by DGraphNode_NUMBER.
  int32_t *PAST;                // Past the stack pointer.
  HierarchyComponent_ ROOT_;
  //@access ROOTNODE    Hierarchy__ROOT_(this)
};
Hierarchy_makeSCC— Make a Hierarchy of Strongly Connected Components.
void
Hierarchy_makeSCC(Hierarchy this);
Hierarchy_makeNSCC— Make a Hierarchy of Nested Strongly Connected Components.

The Nested Strongly Connected Components is a Loop Forest as defined by G. Ramalingam, ``Identifying loops in almost linear time'', Transactions on Programming Languages and Systems, Volume 21, Number 2, March 1999. F. Bourdoncle introduced this decomposition in his PhD thesis in order to minimize the number of widening points in a control-flow graph.

void
Hierarchy_makeNSCC(Hierarchy this);