C Compiler Infrastructure

[ Project home page]

FlowProblem Class Reference

super-class for flow problem definitions More...

#include <dataflow.h>

List of all members.

Public Types

enum  Point { Entry, Exit }

Public Member Functions

void iterate (Node *n, FlowVal *initial=0)
 Entry point.
 FlowProblem (bool forw, FlowVal *top)
*bool forward () const
bool changed () const
void changed (bool ch)
bool last () const
void last (bool l)
bool basicblocks () const
void basicblocks (bool a)
FlowValtop () const
virtual void flow_basicblock (FlowVal *v, exprNode *the_expr, Point p)
*virtual void flow_node (FlowVal *v, Node *the_node, Point p)
virtual void flow_unit (FlowVal *v, unitNode *the_unit, Point p)
virtual void flow_def (FlowVal *v, defNode *the_def, Point p)
virtual void flow_decl (FlowVal *v, declNode *the_decl, Point p)
virtual void flow_proc (FlowVal *v, procNode *the_proc, Point p)
virtual void flow_type (FlowVal *v, typeNode *the_type, Point p)
virtual void flow_prim (FlowVal *v, primNode *the_prim, Point p)
virtual void flow_tdef (FlowVal *v, tdefNode *the_tdef, Point p)
virtual void flow_ptr (FlowVal *v, ptrNode *the_ptr, Point p)
virtual void flow_array (FlowVal *v, arrayNode *the_array, Point p)
virtual void flow_func (FlowVal *v, funcNode *the_func, Point p)
virtual void flow_sue (FlowVal *v, sueNode *the_sue, Point p)
virtual void flow_struct (FlowVal *v, structNode *the_struct, Point p)
virtual void flow_union (FlowVal *v, unionNode *the_union, Point p)
virtual void flow_enum (FlowVal *v, enumNode *the_enum, Point p)
virtual void flow_suespec (FlowVal *v, suespecNode *the_suespec, Point p)
virtual void flow_expr (FlowVal *v, exprNode *the_expr, Point p)
virtual void flow_const (FlowVal *v, constNode *the_const, Point p)
virtual void flow_id (FlowVal *v, idNode *the_id, Point p)
virtual void flow_binary (FlowVal *v, binaryNode *the_binary, Point p)
virtual void flow_unary (FlowVal *v, unaryNode *the_unary, Point p)
virtual void flow_cast (FlowVal *v, castNode *the_cast, Point p)
virtual void flow_comma (FlowVal *v, commaNode *the_comma, Point p)
virtual void flow_ternary (FlowVal *v, ternaryNode *the_ternary, Point p)
virtual void flow_call (FlowVal *v, callNode *the_call, Point p)
virtual void flow_initializer (FlowVal *v, initializerNode *the_initializer, Point p)
virtual void flow_stmt (FlowVal *v, stmtNode *the_stmt, Point p)
virtual void flow_block (FlowVal *v, blockNode *the_block, Point p)
virtual void flow_exprstmt (FlowVal *v, exprstmtNode *the_exprstmt, Point p)
virtual void flow_target (FlowVal *v, targetNode *the_target, Point p)
virtual void flow_label (FlowVal *v, labelNode *the_label, Point p)
virtual void flow_case (FlowVal *v, caseNode *the_case, Point p)
virtual void flow_selection (FlowVal *v, selectionNode *the_selection, Point p)
virtual void flow_if (FlowVal *v, ifNode *the_if, Point p)
virtual void flow_switch (FlowVal *v, switchNode *the_switch, Point p)
virtual void flow_loop (FlowVal *v, loopNode *the_loop, Point p)
virtual void flow_while (FlowVal *v, whileNode *the_while, Point p)
virtual void flow_do (FlowVal *v, doNode *the_do, Point p)
virtual void flow_for (FlowVal *v, forNode *the_for, Point p)
virtual void flow_jump (FlowVal *v, jumpNode *the_jump, Point p)
virtual void flow_goto (FlowVal *v, gotoNode *the_goto, Point p)
virtual void flow_continue (FlowVal *v, continueNode *the_continue, Point p)
virtual void flow_break (FlowVal *v, breakNode *the_break, Point p)
virtual void flow_return (FlowVal *v, returnNode *the_return, Point p)
virtual void flow_attrib (FlowVal *v, attribNode *the_attrib, Point p)
virtual void flow_text (FlowVal *v, textNode *the_text, Point p)

Private Attributes

bool _forward
bool _changed
bool _last
bool _basicblocks

Detailed Description

super-class for flow problem definitions

Definition at line 81 of file dataflow.h.

Member Enumeration Documentation

enum FlowProblem::Point

Enumeration values:

Definition at line 99 of file dataflow.h.

Constructor & Destructor Documentation

FlowProblem::FlowProblem bool  forw,
FlowVal top

Definition at line 103 of file dataflow.h.

Member Function Documentation

virtual void FlowProblem::flow_basicblock FlowVal v,
exprNode the_expr,
Point  p
[inline, virtual]

brief special transfer function for top of expression subtrees.

-- Special transfer function: this one is called at the top of every expression subtree. These are not necessarily basic blocks because they may contain operators like "?:" and "&&" which have control-flow semantics. However, we can easily preprocess the tree to remove these. NOTE: This isn't for "real" basicblockNodes; this is for expressions which sort of act like basic blocks

Definition at line 139 of file dataflow.h.

References flow_node().

void FlowProblem::iterate Node n,
FlowVal initial = 0

Entry point.

Member Data Documentation

bool FlowProblem::_basicblocks [private]

Definition at line 94 of file dataflow.h.

Referenced by basicblocks().

bool FlowProblem::_changed [private]

Definition at line 92 of file dataflow.h.

Referenced by changed().

bool FlowProblem::_forward [private]

Definition at line 91 of file dataflow.h.

Referenced by forward().

bool FlowProblem::_last [private]

Definition at line 93 of file dataflow.h.

Referenced by last().

FlowVal* FlowProblem::_top [private]

Definition at line 95 of file dataflow.h.

Referenced by top().

The documentation for this class was generated from the following file:

Generated on February 1, 2006
Back to the C-Breeze home page