C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

lir_flow_walker Class Reference

#include <lir_flow_walker.h>

Inheritance diagram for lir_flow_walker:

Walker List of all members.

"at_" methods

These methods define the functions that should be performed when different classes of Nodes are encountered in the AST. The most specific "at_" method that matches a given Node's class will be called.

virtual void at_node (Node *the_node, Order ord)
virtual void at_unit (unitNode *the_unit, Order ord)
virtual void at_def (defNode *the_def, Order ord)
virtual void at_decl (declNode *the_decl, Order ord)
virtual void at_subdecl (subdeclNode *the_subdecl, Order ord)
virtual void at_type (typeNode *the_type, Order ord)
virtual void at_prim (primNode *the_prim, Order ord)
virtual void at_tdef (tdefNode *the_tdef, Order ord)
virtual void at_ptr (ptrNode *the_ptr, Order ord)
virtual void at_array (arrayNode *the_array, Order ord)
virtual void at_func (funcNode *the_func, Order ord)
virtual void at_sue (sueNode *the_sue, Order ord)
virtual void at_struct (structNode *the_struct, Order ord)
virtual void at_union (unionNode *the_union, Order ord)
virtual void at_enum (enumNode *the_enum, Order ord)
virtual void at_suespec (suespecNode *the_suespec, Order ord)
virtual void at_expr (exprNode *the_expr, Order ord)
virtual void at_index (indexNode *the_index, Order ord)
virtual void at_const (constNode *the_const, Order ord)
virtual void at_id (idNode *the_id, Order ord)
virtual void at_binary (binaryNode *the_binary, Order ord)
virtual void at_unary (unaryNode *the_unary, Order ord)
virtual void at_cast (castNode *the_cast, Order ord)
virtual void at_comma (commaNode *the_comma, Order ord)
virtual void at_ternary (ternaryNode *the_ternary, Order ord)
virtual void at_call (callNode *the_call, Order ord)
virtual void at_initializer (initializerNode *the_initializer, Order ord)
virtual void at_stmt (stmtNode *the_stmt, Order ord)
virtual void at_block (blockNode *the_block, Order ord)
virtual void at_basicblock (basicblockNode *the_basicblock, Order ord)
virtual void at_exprstmt (exprstmtNode *the_exprstmt, Order ord)
virtual void at_target (targetNode *the_target, Order ord)
virtual void at_label (labelNode *the_label, Order ord)
virtual void at_case (caseNode *the_case, Order ord)
virtual void at_selection (selectionNode *the_selection, Order ord)
virtual void at_if (ifNode *the_if, Order ord)
virtual void at_switch (switchNode *the_switch, Order ord)
virtual void at_loop (loopNode *the_loop, Order ord)
virtual void at_while (whileNode *the_while, Order ord)
virtual void at_do (doNode *the_do, Order ord)
virtual void at_for (forNode *the_for, Order ord)
virtual void at_jump (jumpNode *the_jump, Order ord)
virtual void at_goto (gotoNode *the_goto, Order ord)
virtual void at_continue (continueNode *the_continue, Order ord)
virtual void at_break (breakNode *the_break, Order ord)
virtual void at_return (returnNode *the_return, Order ord)
virtual void at_attrib (attribNode *the_attrib, Order ord)
virtual void at_operand (operandNode *the_oper, Order ord)
virtual void at_conditiongoto (conditiongotoNode *the_condgoto, Order ord)
virtual void at_threeAddr (threeAddrNode *the_3addr, Order ord)
virtual void at_text (textNode *the_text, Order ord)

Public Types

typedef list< edge > edge_list
typedef edge_list::iterator edge_list_p
enum  Order { Preorder, Postorder, Both }
 The order in which AST Nodes should be visited. More...

enum  Depth { Subtree, NodeOnly }
 Which Nodes in the AST tree should be visited. More...


Public Member Functions

 lir_flow_walker ()
 ~lir_flow_walker ()
void at_proc (procNode *the_proc, Order ord)

Static Public Member Functions

void build_lir_blocks (procNode *the_proc)
void get_block_dfo (LirBlock *entryblock, LirBlockList &blocks)
void find_block_doms (procNode *the_proc)
void find_loops (procNode *proc, bool need_recompute_flow, vector< LirBlockSet > &loops)
void computeRegisterLiveness (instruction_list &insts, inst_to_reg_id_map &liveRegs)
void getInstructionsPostorder (instruction_list &insts, instruction_list_p it, instruction_list &ordering)
void getInstructionFlowInfo (instruction_list &insts)
instruction_list_p findInstruction (instruction_list &insts, const LirInst *inst)

Static Protected Member Functions

void debug_print_block_info (procNode *proc)

Member Typedef Documentation

typedef list< edge > lir_flow_walker::edge_list
 

Definition at line 76 of file lir_flow_walker.h.

Referenced by find_loops().

typedef edge_list::iterator lir_flow_walker::edge_list_p
 

Definition at line 77 of file lir_flow_walker.h.

Referenced by find_loops().


Member Enumeration Documentation

enum Walker::Depth [inherited]
 

Which Nodes in the AST tree should be visited.

Enumeration values:
Subtree  The entire AST should be traversed.
NodeOnly  Only the root Node should be visited.

Definition at line 155 of file walker.h.

enum Walker::Order [inherited]
 

The order in which AST Nodes should be visited.

Enumeration values:
Preorder  Nodes should be visited before their children.
Postorder  Nodes should be visited after their children.
Both  Nodes should be visited both before and after their children.

Definition at line 147 of file walker.h.

Referenced by whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), textNode::walk(), ternaryNode::walk(), tdefNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), primNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), gotoNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), continueNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), breakNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), and arrayNode::walk().


Constructor & Destructor Documentation

lir_flow_walker::lir_flow_walker (    ) 
 

Definition at line 43 of file lir_flow_walker.cc.

lir_flow_walker::~lir_flow_walker (    ) 
 

Definition at line 48 of file lir_flow_walker.cc.


Member Function Documentation

virtual void Walker::at_array (  arrayNode *    the_array,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, and print_walker.

Definition at line 254 of file walker.h.

References Walker::at_type().

Referenced by arrayNode::walk().

virtual void Walker::at_attrib (  attribNode *    the_attrib,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, and print_walker.

Definition at line 365 of file walker.h.

References Walker::at_stmt().

Referenced by attribNode::walk().

virtual void Walker::at_basicblock (  basicblockNode *    the_basicblock,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in print_walker, fixPointerWalker, DefUseWalker, LivenessWalker, LivenessComments, reachingGenKillWalker, and reachingDefinitionsWalker.

Definition at line 314 of file walker.h.

References Walker::at_block().

Referenced by basicblockNode::walk().

virtual void Walker::at_binary (  binaryNode *    the_binary,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, gcWalker, id_lookup_walker, TreeChecker, print_walker, and Assignment_walker.

Definition at line 287 of file walker.h.

References Walker::at_expr().

Referenced by binaryNode::walk().

virtual void Walker::at_block (  blockNode *    the_block,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, scope_walker, and print_walker.

Definition at line 311 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_basicblock(), and blockNode::walk().

virtual void Walker::at_break (  breakNode *    the_break,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, ref_fix_walker, set_container_walker, TreeChecker, and print_walker.

Definition at line 359 of file walker.h.

References Walker::at_jump().

Referenced by breakNode::walk().

virtual void Walker::at_call (  callNode *    the_call,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in NodeLocator, W, vcgASTWalker, vcgCCGWalker, id_lookup_walker, Linker, ref_fix_walker, TreeChecker, and print_walker.

Definition at line 302 of file walker.h.

References Walker::at_expr().

Referenced by callNode::walk().

virtual void Walker::at_case (  caseNode *    the_case,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, ref_fix_walker, semcheck_walker, set_container_walker, TreeChecker, and print_walker.

Definition at line 326 of file walker.h.

References Walker::at_target().

Referenced by caseNode::walk().

virtual void Walker::at_cast (  castNode *    the_cast,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, and print_walker.

Definition at line 293 of file walker.h.

References Walker::at_expr().

Referenced by castNode::walk().

virtual void Walker::at_comma (  commaNode *    the_comma,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, and print_walker.

Definition at line 296 of file walker.h.

References Walker::at_expr().

Referenced by commaNode::walk().

virtual void Walker::at_conditiongoto (  conditiongotoNode *    the_condgoto,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in lir_gen_walker, vcgASTWalker, TreeChecker, print_walker, LivenessWalker, LivenessComments, and findVarAssign.

Definition at line 371 of file walker.h.

References Walker::at_goto().

Referenced by conditiongotoNode::walk().

virtual void Walker::at_const (  constNode *    the_const,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, print_walker, and count_walker.

Definition at line 281 of file walker.h.

References Walker::at_index().

Referenced by constNode::walk().

virtual void Walker::at_continue (  continueNode *    the_continue,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, ref_fix_walker, set_container_walker, TreeChecker, and print_walker.

Definition at line 356 of file walker.h.

References Walker::at_jump().

Referenced by continueNode::walk().

virtual void Walker::at_decl (  declNode *    the_decl,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocToMemWalker, NodeLocator, W, vcgASTWalker, id_lookup_walker, name_mangle_walker, semcheck_walker, TreeChecker, ProcWalker, print_walker, has_struct_walker, and UnificationBasedPtr.

Definition at line 233 of file walker.h.

References Walker::at_def().

Referenced by Walker::at_subdecl(), and declNode::walk().

virtual void Walker::at_def (  defNode *    the_def,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 230 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_decl(), and Walker::at_proc().

virtual void Walker::at_do (  doNode *    the_do,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, and print_walker.

Definition at line 344 of file walker.h.

References Walker::at_loop().

Referenced by doNode::walk().

virtual void Walker::at_enum (  enumNode *    the_enum,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in enum_value_walker.

Definition at line 269 of file walker.h.

References Walker::at_sue().

Referenced by enumNode::walk().

virtual void Walker::at_expr (  exprNode *    the_expr,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in NodeLocator, and remove_stale_type_walker.

Definition at line 275 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_binary(), Walker::at_call(), Walker::at_cast(), Walker::at_comma(), Walker::at_index(), Walker::at_initializer(), Walker::at_operand(), Walker::at_ternary(), Walker::at_unary(), and metaexprNode::walk().

virtual void Walker::at_exprstmt (  exprstmtNode *    the_exprstmt,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, semcheck_walker, and print_walker.

Definition at line 317 of file walker.h.

References Walker::at_stmt().

Referenced by exprstmtNode::walk().

virtual void Walker::at_for (  forNode *    the_for,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, semcheck_walker, TreeChecker, and print_walker.

Definition at line 347 of file walker.h.

References Walker::at_loop().

Referenced by forNode::walk().

virtual void Walker::at_func (  funcNode *    the_func,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, scope_walker, TreeChecker, print_walker, and has_struct_walker.

Definition at line 257 of file walker.h.

References Walker::at_type().

Referenced by funcNode::walk().

virtual void Walker::at_goto (  gotoNode *    the_goto,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in lir_gen_walker, vcgASTWalker, goto_label_walker, fix_goto_walker, ref_fix_walker, TreeChecker, ProcWalker, and print_walker.

Definition at line 353 of file walker.h.

References Walker::at_jump().

Referenced by Walker::at_conditiongoto(), and gotoNode::walk().

virtual void Walker::at_id (  idNode *    the_id,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, callGraph, RequiresGatherer, clear_ids_walker, id_lookup_walker, Linker, name_mangle_walker, ref_fix_walker, TreeChecker, print_walker, renumber_walker, and count_walker.

Definition at line 284 of file walker.h.

References Walker::at_index().

Referenced by idNode::walk().

virtual void Walker::at_if (  ifNode *    the_if,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, and print_walker.

Definition at line 332 of file walker.h.

References Walker::at_selection().

Referenced by ifNode::walk().

virtual void Walker::at_index (  indexNode *    the_index,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 278 of file walker.h.

References Walker::at_expr().

Referenced by Walker::at_const(), and Walker::at_id().

virtual void Walker::at_initializer (  initializerNode *    the_initializer,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, and print_walker.

Definition at line 305 of file walker.h.

References Walker::at_expr().

Referenced by initializerNode::walk().

virtual void Walker::at_jump (  jumpNode *    the_jump,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 350 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_break(), Walker::at_continue(), Walker::at_goto(), and Walker::at_return().

virtual void Walker::at_label (  labelNode *    the_label,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in lir_gen_walker, vcgASTWalker, goto_label_walker, name_mangle_walker, TreeChecker, ProcWalker, and print_walker.

Definition at line 323 of file walker.h.

References Walker::at_target().

Referenced by labelNode::walk().

virtual void Walker::at_loop (  loopNode *    the_loop,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in semcheck_walker, set_container_walker, TreeChecker, and init_flowproblem_walker.

Definition at line 338 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_do(), Walker::at_for(), and Walker::at_while().

virtual void Walker::at_node (  Node *    the_node,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in gcWalker, goto_label_walker, set_container_walker, sue_complete_walker, TreeChecker, and df_number_walker.

Definition at line 223 of file walker.h.

Referenced by Walker::at_def(), Walker::at_expr(), Walker::at_stmt(), Walker::at_text(), Walker::at_type(), and Walker::at_unit().

virtual void Walker::at_operand (  operandNode *    the_oper,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in AllocToMemWalker, vcgASTWalker, TreeChecker, print_walker, and findVarAssign.

Definition at line 368 of file walker.h.

References Walker::at_expr().

Referenced by operandNode::walk().

virtual void Walker::at_prim (  primNode *    the_prim,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, and print_walker.

Definition at line 245 of file walker.h.

References Walker::at_type().

Referenced by primNode::walk().

void lir_flow_walker::at_proc (  procNode *    the_proc,
Order    ord
)  [virtual]
 

Reimplemented from Walker.

Definition at line 377 of file lir_flow_walker.cc.

References build_lir_blocks(), debug_print_block_info(), find_block_doms(), and Walker::Preorder.

virtual void Walker::at_ptr (  ptrNode *    the_ptr,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, and print_walker.

Definition at line 251 of file walker.h.

References Walker::at_type().

Referenced by ptrNode::walk().

virtual void Walker::at_return (  returnNode *    the_return,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, ref_fix_walker, semcheck_walker, set_container_walker, TreeChecker, print_walker, LivenessWalker, and LivenessComments.

Definition at line 362 of file walker.h.

References Walker::at_jump().

Referenced by returnNode::walk().

virtual void Walker::at_selection (  selectionNode *    the_selection,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in semcheck_walker.

Definition at line 329 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_if(), and Walker::at_switch().

virtual void Walker::at_stmt (  stmtNode *    the_stmt,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in NodeLocator, W, init_flowproblem_walker, and LivenessWalker.

Definition at line 308 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_attrib(), Walker::at_block(), Walker::at_exprstmt(), Walker::at_jump(), Walker::at_loop(), Walker::at_selection(), Walker::at_target(), Walker::at_threeAddr(), and metastmtNode::walk().

virtual void Walker::at_struct (  structNode *    the_struct,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 263 of file walker.h.

References Walker::at_sue().

Referenced by structNode::walk().

virtual void Walker::at_subdecl (  subdeclNode *    the_subdecl,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 236 of file walker.h.

References Walker::at_decl().

Referenced by subdeclNode::walk().

virtual void Walker::at_sue (  sueNode *    the_sue,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, RequiresGatherer, print_walker, and has_struct_walker.

Definition at line 260 of file walker.h.

References Walker::at_type().

Referenced by Walker::at_enum(), Walker::at_struct(), and Walker::at_union().

virtual void Walker::at_suespec (  suespecNode *    the_suespec,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, scope_walker, semcheck_walker, sue_complete_walker, print_walker, and UnificationBasedPtr.

Definition at line 272 of file walker.h.

References Walker::at_type().

Referenced by suespecNode::walk().

virtual void Walker::at_switch (  switchNode *    the_switch,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, set_container_walker, TreeChecker, ProcWalker, print_walker, and init_flowproblem_walker.

Definition at line 335 of file walker.h.

References Walker::at_selection().

Referenced by switchNode::walk().

virtual void Walker::at_target (  targetNode *    the_target,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in init_flowproblem_walker.

Definition at line 320 of file walker.h.

References Walker::at_stmt().

Referenced by Walker::at_case(), and Walker::at_label().

virtual void Walker::at_tdef (  tdefNode *    the_tdef,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, RequiresGatherer, clear_ids_walker, id_lookup_walker, ref_fix_walker, TreeChecker, and print_walker.

Definition at line 248 of file walker.h.

References Walker::at_type().

Referenced by tdefNode::walk().

virtual void Walker::at_ternary (  ternaryNode *    the_ternary,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, and print_walker.

Definition at line 299 of file walker.h.

References Walker::at_expr().

Referenced by ternaryNode::walk().

virtual void Walker::at_text (  textNode *    the_text,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, and print_walker.

Definition at line 377 of file walker.h.

References Walker::at_node().

Referenced by textNode::walk().

virtual void Walker::at_threeAddr (  threeAddrNode *    the_3addr,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in lir_gen_walker, vcgASTWalker, vcgCCGWalker, identify_inlinees, Linker, TreeChecker, print_walker, GetDefsWalker, LivenessWalker, LivenessComments, GetDefsWalker, findVarAssign, and UnificationBasedPtr.

Definition at line 374 of file walker.h.

References Walker::at_stmt().

Referenced by threeAddrNode::walk().

virtual void Walker::at_type (  typeNode *    the_type,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in W, and TreeChecker.

Definition at line 242 of file walker.h.

References Walker::at_node().

Referenced by Walker::at_array(), Walker::at_func(), Walker::at_prim(), Walker::at_ptr(), Walker::at_sue(), Walker::at_suespec(), and Walker::at_tdef().

virtual void Walker::at_unary (  unaryNode *    the_unary,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, TreeChecker, print_walker, and fixPointerWalker.

Definition at line 290 of file walker.h.

References Walker::at_expr().

Referenced by unaryNode::walk().

virtual void Walker::at_union (  unionNode *    the_union,
Order    ord
)  [inline, virtual, inherited]
 

Definition at line 266 of file walker.h.

References Walker::at_sue().

Referenced by unionNode::walk().

virtual void Walker::at_unit (  unitNode *    the_unit,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in asm_gen_walker, dummy_reg_alloc_walker, lir_gen_walker, vcgASTWalker, gcWalker, TreeChecker, print_walker, reachingGenKillWalker, and UnificationBasedPtr.

Definition at line 227 of file walker.h.

References Walker::at_node().

Referenced by unitNode::walk().

virtual void Walker::at_while (  whileNode *    the_while,
Order    ord
)  [inline, virtual, inherited]
 

Reimplemented in vcgASTWalker, and print_walker.

Definition at line 341 of file walker.h.

References Walker::at_loop().

Referenced by whileNode::walk().

void lir_flow_walker::build_lir_blocks (  procNode *    the_proc )  [static]
 

Definition at line 53 of file lir_flow_walker.cc.

References LirBlock::_next, LirBlock::_preds, LirBlock::_succs, LirBlock::add_inst(), LirInst::instruction, instruction_list, procNode::instructions(), LirBlock::insts(), procNode::lir_blocks(), LirBlockList, LirBlockList_p, mn_BranchEQ, mn_BranchGE, mn_BranchGT, mn_BranchLE, mn_BranchLT, mn_BranchNE, mn_Jmp, mn_Label, mn_Return, mnemonic, and LirInst::target.

Referenced by at_proc(), and find_loops().

void lir_flow_walker::computeRegisterLiveness (  instruction_list &    insts,
inst_to_reg_id_map &    liveRegs
)  [static]
 

Definition at line 393 of file lir_flow_walker.cc.

References arch_info::register_info::_id, reg_or_const::_reg, CBZ::ArchInfo, LirInst::dest, arch_info::get_reg_fp(), arch_info::get_reg_retval_fixed(), arch_info::get_reg_retval_float(), arch_info::get_reg_sp(), getInstructionFlowInfo(), getInstructionsPostorder(), LirInst::has_base(), LirInst::has_dest(), LirInst::has_offset(), LirInst::has_opnd1(), LirInst::has_opnd2(), instruction_list, instruction_list_p, instruction_set_p, cbz_util::list_find(), LirInst::memBase, LirInst::memOffset, Register::num(), LirInst::opnd1, LirInst::opnd2, LirInst::preds, LirInst::succs, and LirInst::visited.

Referenced by briggs_reg_alloc::buildAdjMatrix(), and asm_gen_walker::doCallerSave().

void lir_flow_walker::debug_print_block_info (  procNode *    proc )  [static, protected]
 

Definition at line 652 of file lir_flow_walker.cc.

References procNode::lir_blocks(), LirBlockList, LirBlockList_p, and LirBlockSet_p.

Referenced by at_proc(), and find_loops().

Depth Walker::depth (    )  const [inline, inherited]
 

Return which Nodes of an AST should be visited.

A value of SubTree specifies that the entire AST should be traversed. A value of NodeOnly specifies that only the root Node in the AST should be visited.

Definition at line 211 of file walker.h.

Referenced by whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), ternaryNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), arrayNode::walk(), and Walker::Walker().

void lir_flow_walker::find_block_doms (  procNode *    the_proc )  [static]
 

Definition at line 206 of file lir_flow_walker.cc.

References LirBlock::_doms, LirBlock::_preds, get_block_dfo(), procNode::lir_blocks(), LirBlockList, LirBlockList_p, LirBlockSet_p, and LirBlock::reset_visited().

Referenced by at_proc(), and find_loops().

void lir_flow_walker::find_loops (  procNode *    proc,
bool    need_recompute_flow,
vector< LirBlockSet > &    loops
)  [static]
 

Definition at line 279 of file lir_flow_walker.cc.

References LirBlock::_depth, LirBlock::_doms, LirBlock::_next, LirBlock::_preds, LirBlock::_succs, build_lir_blocks(), debug_print_block_info(), edge_list, edge_list_p, find_block_doms(), procNode::lir_blocks(), LirBlockList, LirBlockList_p, LirBlockSet_p, lir_flow_walker::edge::source, and lir_flow_walker::edge::target.

Referenced by briggs_reg_alloc::allocate().

instruction_list_p lir_flow_walker::findInstruction (  instruction_list &    insts,
const LirInst *    inst
)  [static]
 

Definition at line 641 of file lir_flow_walker.cc.

References instruction_list_p.

void lir_flow_walker::get_block_dfo (  LirBlock *    entryblock,
LirBlockList &    blocks
)  [static]
 

Definition at line 187 of file lir_flow_walker.cc.

References LirBlock::_succs, LirBlock::_visited, and LirBlockSet_p.

Referenced by find_block_doms().

void lir_flow_walker::getInstructionFlowInfo (  instruction_list &    insts )  [static]
 

Definition at line 556 of file lir_flow_walker.cc.

References LirInst::instruction, instruction_list_p, mn_BranchEQ, mn_BranchGE, mn_BranchGT, mn_BranchLE, mn_BranchLT, mn_BranchNE, mn_EndProc, mn_Jmp, mn_Label, mn_Return, LirInst::preds, LirInst::succs, LirInst::target, and LirInst::targetInst.

Referenced by computeRegisterLiveness(), and briggs_reg_alloc::makeDuChains().

void lir_flow_walker::getInstructionsPostorder (  instruction_list &    insts,
instruction_list_p    it,
instruction_list &    ordering
)  [static]
 

Definition at line 494 of file lir_flow_walker.cc.

References LirInst::instruction, instruction_list_p, mn_BranchEQ, mn_BranchGE, mn_BranchGT, mn_BranchLE, mn_BranchLT, mn_BranchNE, mn_Jmp, mn_Return, LirInst::targetInst, and LirInst::visited.

Referenced by computeRegisterLiveness(), and briggs_reg_alloc::makeDuChains().

Order Walker::order (    )  const [inline, inherited]
 

Return the order in which Nodes of an AST should be visited.

Nodes can be visited before their children (Preorder), after their children (Postorder), or both (Both).

Definition at line 203 of file walker.h.

Referenced by df_number_walker::at_node(), whileNode::walk(), unitNode::walk(), unionNode::walk(), unaryNode::walk(), threeAddrNode::walk(), textNode::walk(), ternaryNode::walk(), tdefNode::walk(), switchNode::walk(), suespecNode::walk(), subdeclNode::walk(), structNode::walk(), returnNode::walk(), ptrNode::walk(), procNode::walk(), primNode::walk(), operandNode::walk(), metastmtNode::walk(), metaexprNode::walk(), labelNode::walk(), initializerNode::walk(), ifNode::walk(), idNode::walk(), gotoNode::walk(), funcNode::walk(), forNode::walk(), exprstmtNode::walk(), enumNode::walk(), doNode::walk(), declNode::walk(), continueNode::walk(), constNode::walk(), conditiongotoNode::walk(), commaNode::walk(), castNode::walk(), caseNode::walk(), callNode::walk(), breakNode::walk(), blockNode::walk(), binaryNode::walk(), basicblockNode::walk(), attribNode::walk(), and arrayNode::walk().


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

Generated on August 27, 2003
Back to the C-Breeze home page