CFG Module Reference

#include <opt_cfg.h>

Collaboration diagram for CFG:

Collaboration graph
[legend]

Public Member Functions

 CFG (MEM_POOL *pool, MEM_POOL *lpool)
 ~CFG (void)
BOOL Trace (void) const
void Print (FILE *fp=stderr, BOOL dfs_order=TRUE, IDTYPE bb_id=(IDTYPE)-1)
void PrintLoopVis (BB_LOOP *loop, int &id)
void PrintVis (BOOL draw_loops)
void PrintCDVis (void)
void Validate (FILE *fp=stderr)
void Create (WN *func_nd, BOOL lower_scf, BOOL calls_break, REGION_LEVEL rgn_level, OPT_STAB *opt_stab, BOOL do_tail)
void Compute_dom_tree (BOOL build_dom)
void Compute_dom_frontier (void)
void Compute_bbs_reached (void)
void Compute_control_dependence (void)
MEM_POOLMem_pool (void) const
MEM_POOLLoc_pool (void) const
CODEMAPHtable (void) const
void Set_htable (CODEMAP *h)
IDTYPE First_bb_id (void) const
IDTYPE Last_bb_id (void) const
mUINT32 Total_bb_count (void) const
BOOL Removable_bb (const BB_NODE *bb) const
void Remove_bb (BB_NODE *bb)
void Remove_path (BB_NODE *pred, BB_NODE *succ)
void Delete_bb (BB_NODE *bb, MOD_PHI_BB_CONTAINER *)
BB_NODEEntry_bb (void) const
BB_NODEExit_bb (void) const
BB_NODEFake_entry_bb (void) const
BB_NODEFake_exit_bb (void) const
BB_NODEFirst_bb (void) const
BB_NODELast_bb (void) const
void Set_last_bb (BB_NODE *bb)
BB_NODEGet_bb (mINT32 idx) const
BB_NODEFunc_entry_bb (void) const
BB_NODESplit_bb_with_wns (BB_NODE *, WN *)
void Change_block_kind (BB_NODE *, BB_KIND) const
BB_LOOPLoops (void) const
BOOL Loops_valid () const
void Set_loops (BB_LOOP *l)
void Set_loops_valid (BOOL b)
void Set_exc (EXC *exc)
EXCExc (void) const
void Reset_stmt_id (void)
INT32 Get_stmt_id (void)
void Invalidate_loops (void)
LABEL_IDX Alloc_label (void) const
INT32 Cur_loop_depth (void) const
void Set_cur_loop_depth (INT32 newdepth)
void Prepend_wn_in (BB_NODE *bb, WN *wn)
void Append_wn_in (BB_NODE *bb, WN *wn)
BOOL Lower_fully (void) const
BOOL Calls_break (void) const
BOOL Rvi_break_stmt (void) const
void Set_rvi_break_stmt (BOOL b)
OPT_FEEDBACKFeedback (void) const
void Set_feedback (OPT_FEEDBACK *fb)
BOOL Has_feedback (void) const
void Push_bb_region (BB_REGION *bbr)
BB_REGIONPop_bb_region (void)
BB_REGIONTop_bb_region (void) const
void Clear_bb_region (void)
BOOL Null_bb_region (void) const
void Push_mp_type (MP_TY t)
void Push_mp_rid (RID *rid)
MP_TY Pop_mp_type (void)
RIDPop_mp_rid (void)
MP_TY Top_mp_type (void) const
RIDTop_mp_rid (void) const
BOOL NULL_mp_type (void) const
void Clear_mp_type (void)
void Clear_mp_rid (void)
BOOL Inside_mp_do (void)
RIDRid (void) const
REGION_LEVEL Rgn_level (void) const
void Set_has_regions (void)
BOOL Has_regions (void) const
void Inc_dohead_cnt (void)
INT32 Dohead_cnt (void) const
BB_NODEGet_bb_from_label (INT32 l) const
void Append_label_map (INT32 labnum, BB_NODE *bb)
BB_NODEAdd_bb_to_edge (BB_NODE *, BB_NODE *)
const BB_LOOPFind_innermost_loop_contains (BB_NODE *bb)
BB_NODEFind_enclosing_region_bb (BB_NODE *, WN_PRAGMA_ID)
BOOL Is_outermost_loop_in_parallel_region (BB_LOOP *loop, WN_PRAGMA_ID pragma_id)
void Find_not_reached ()
void Connect_agotos ()
void Remove_agoto_pred (BB_NODE *bb)
INT32 Agoto_succ_entries ()
BB_NODEAgoto_succ_bb (INT32 idx)
void Process_multi_entryexit (BOOL is_whirl)
void Remove_fake_entryexit_arcs (void)
void Invalidate_and_update_aux_info (void)
INT Remove_critical_edge ()
void Get_pred_first_vec (BB_NODE *bbvec[], INT32 *numbbs)
BB_NODE ** Dfs_vec (void)
INT32 Dfs_vec_sz (void) const
BB_NODE ** Po_vec (void)
INT32 Po_vec_sz (void) const
BB_NODEPo_Bb (INT32 n) const
BB_NODE ** Dpo_vec (void)
INT32 Dpo_vec_sz (void) const
BB_NODEDpo_Bb (INT32 n) const
BB_NODE ** Pdo_vec (void)
INT32 Pdo_vec_sz (void) const
BB_NODEPdo_Bb (INT32 n) const
BOOL Verify_tree (WN *)
BOOL Verify_cfg (void)
void Find_loop_cycles (void)
BB_LOOPAnalyze_loops (void)
BB_NODEFind_entry_bb (void)
BOOL Fall_through (BB_NODE *bb1, BB_NODE *bb2)
void Delete_empty_BB ()
void Clone_bb (IDTYPE source, IDTYPE dest)
BB_NODECreate_and_allocate_bb (BB_KIND k)
BOOL LMV_eligible_for_multiversioning (const BB_LOOP *, BOOL)
void LMV_clone_loop (LMV_CFG_ADAPTOR *)
BOOL If_convertible_cond (WN *wn)
BOOL If_conv_criteria_met (WN *wn, WN *else_wn, WN *then_wn, BOOL empty_else, BOOL empty_then)
BOOL Screen_cand (WN *wn, WN *else_wn, WN *then_wn, BOOL empty_else, BOOL empty_then)
WNConv_to_select (WN *wn)

Private Types

enum  END_BLOCK { END_UNKNOWN, END_NOT, END_FALLTHRU, END_BREAK }

Private Member Functions

 CFG (const CFG &)
 CFG (void)
CFGoperator= (const CFG &)
void Connect_predsucc (BB_NODE *p, BB_NODE *s)
void DisConnect_predsucc (BB_NODE *p, BB_NODE *s)
void Connect_after (BB_NODE *p, BB_NODE *s)
void Init_stmtlist (BB_NODE *b, WN *stmt)
IDTYPE Alloc_bb_id (void)
BB_NODENew_bb (BOOL connect, BB_KIND k=BB_GOTO)
BB_NODECreate_bb (BB_KIND k=BB_GOTO)
void Append_bb (BB_NODE *bb)
void Set_current_bb (BB_NODE *b)
void Process_not_reached (BOOL can_disconnect)
void Prop_entry (BB_NODE *) const
void Find_exit_blocks (void)
void Find_no_exit_blocks (BB_NODE *bb, BB_NODE_SET *instack)
void Process_no_exit (void)
void Bkwd_prop_exit (BB_NODE *) const
void Add_altentry (BB_NODE *bb)
void Add_earlyexit (BB_NODE *bb)
void Add_notreach (BB_NODE *bb)
void Init_last_label (const IDTYPE lab)
BOOL Verify_wn (WN *wn, WN *parent, WN_MAP wn_map)
void Fill_DFS_vec (BB_NODE *bb)
void Init_dpo_vec (BB_NODE *, INT *id)
void Init_pdo_vec (BB_NODE *, INT *id)
void Create_empty_preheader (WN *loop)
void Lower_do_loop (WN *wn, END_BLOCK *ends_bb)
void Lower_do_while (WN *wn, END_BLOCK *ends_bb)
void Lower_while_do (WN *wn, END_BLOCK *ends_bb)
INT Is_simple_expr (WN *wn)
void Lower_if_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_io_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_do_loop_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_do_while_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_while_do_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_if_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_compgoto_stmt (WN *wn, END_BLOCK *ends_bb)
void Add_one_region (WN *wn, END_BLOCK *ends_bb)
void Add_one_stmt (WN *func_nd, END_BLOCK *ends_bb)
BB_NODEProcess_entry (WN *wn, END_BLOCK *ends_bb)
void Create_label_stmt (BB_NODE *bb)
void Copy_xpragmas_into (BB_NODE *bb, WN *pragmas)
BB_NODECreate_labelled_bb (BB_KIND k=BB_GOTO)
BB_NODECreate_entrytest (WN *cond, BB_NODE *target)
BB_NODECreate_loopbody (WN *)
BB_NODECreate_exittest (WN *, BB_NODE *, BB_KIND)
BB_NODECreate_conditional (WN *, BB_NODE *, BB_NODE *, BOOL, WN **)
void Create_loop_info (BB_NODE *body_bb, WN *loop_wn)
void Create_blank_loop_info (BB_NODE *body_bb)
BB_LOOPIdent_loop (BB_NODE *first_bb, BB_NODE *last_bb, INT32 loopnest, BB_LOOP *cur_loop)
void Set_loop_bb_set (BB_LOOP *loop)
BOOL Check_if_it_can_reach_body_first_bb (BB_NODE *bb, BB_LOOP *loop)
void Compute_true_loop_body_set (BB_LOOP *loop)
BOOL Loop_itself_is_empty (BB_LOOP *loop)
BB_LOOPGet_last_loop (BB_LOOP *loop)
void Screen_out_false_loopnest (BB_LOOP *loop, BB_LOOP *sibling)
void Ident_mp_regions (void)
BB_NODELMV_clone_block (const BB_NODE *src, LMV_CFG_ADAPTOR *)
BB_NODELMV_create_alike_block (BB_KIND kind, BB_NODE *model)
void LMV_clone_pred_succ_relationship (LMV_CFG_ADAPTOR *)
void LMV_clone_loop_body (LMV_CFG_ADAPTOR *)
void LMV_update_internal_labels (LMV_CFG_ADAPTOR *)
BB_LOOPLMV_clone_BB_LOOP (LMV_CFG_ADAPTOR *)
void LMV_gen_precondioning_stuff (LMV_CFG_ADAPTOR *)
void LMV_clone_BB_IFINFO (LMV_CFG_ADAPTOR *)

Private Attributes

BOOL _trace
DYN_ARRAY< BB_NODE * > _bb_vec
DYN_ARRAY< BB_NODE * > _entry_vec
DYN_ARRAY< BB_NODE * > _exit_vec
DYN_ARRAY< BB_NODE * > _notreach_vec
DYN_ARRAY< BB_NODE * > _agoto_pred_vec
DYN_ARRAY< BB_NODE * > _agoto_succ_vec
BB_NODE ** _dfs_vec
INT32 _dfs_vec_sz
BB_NODE ** _po_vec
INT32 _po_vec_sz
BB_NODE ** _dpo_vec
INT32 _dpo_vec_sz
BB_NODE ** _pdo_vec
INT32 _pdo_vec_sz
MEM_POOL_mem_pool
MEM_POOL_loc_pool
BB_NODE_entry_bb
BB_NODE_exit_bb
BB_NODE_first_bb
BB_NODE_last_bb
BB_NODE_fake_entry_bb
BB_NODE_fake_exit_bb
BB_LOOP_loops
BOOL _loops_valid
EXC_exc
INT32 _last_stmt_id
BB_NODE_current_bb
IDTYPE _first_bb_id
IDTYPE _last_bb_id
MAP_label_map
IDTYPE _orig_last_label
IDTYPE _last_label_num
INT32 _cur_loop_depth
BOOL _lower_fully
OPT_STAB_opt_stab
CODEMAP_htable
BOOL _calls_break
BOOL _rvi_break_stmt
OPT_FEEDBACK_feedback
STACK< MP_TY_mp_type
STACK< RID * > _mp_rid
STACK< BB_REGION * > _bb_region
RID_rid
REGION_LEVEL _rgn_level
BOOL _has_regions
INT32 _dohead_cnt
BB_NODE_SET_bb_set
BB_NODE_SET_non_true_body_set

Friends

class EXITBB_ITER
class OPT_TAIL

Detailed Description

Definition at line 159 of file opt_cfg.h.


Member Enumeration Documentation

enum CFG::END_BLOCK [private]

Enumerator:
END_UNKNOWN 
END_NOT 
END_FALLTHRU 
END_BREAK 

Definition at line 313 of file opt_cfg.h.


Constructor & Destructor Documentation

CFG::CFG ( const CFG  )  [private]

CFG::CFG ( void   )  [private]

CFG::CFG ( MEM_POOL pool,
MEM_POOL lpool 
)

CFG::~CFG ( void   ) 


Member Function/Subroutine Documentation

CFG& CFG::operator= ( const CFG  )  [private]

void CFG::Connect_predsucc ( BB_NODE p,
BB_NODE s 
) [inline, private]

void CFG::DisConnect_predsucc ( BB_NODE p,
BB_NODE s 
) [inline, private]

Definition at line 236 of file opt_cfg.h.

References _mem_pool, BB_NODE::Remove_pred(), and BB_NODE::Remove_succ().

Referenced by OPT_TAIL::Fixup_exit(), and Split_bb_with_wns().

void CFG::Connect_after ( BB_NODE p,
BB_NODE s 
) [inline, private]

Definition at line 240 of file opt_cfg.h.

References Connect_predsucc(), and CHAIN_NODE::Insert_After().

void CFG::Init_stmtlist ( BB_NODE b,
WN stmt 
) [inline, private]

Definition at line 244 of file opt_cfg.h.

References BB_NODE::Set_firststmt(), and BB_NODE::Set_laststmt().

Referenced by Append_wn_in(), Create_label_stmt(), and Prepend_wn_in().

IDTYPE CFG::Alloc_bb_id ( void   )  [inline, private]

Definition at line 248 of file opt_cfg.h.

References _bb_vec, _last_bb_id, and DYN_ARRAY< T >::Newidx().

Referenced by Append_bb(), Create_and_allocate_bb(), and Split_bb_with_wns().

BB_NODE * CFG::New_bb ( BOOL  connect,
BB_KIND  k = BB_GOTO 
) [private]

BB_NODE* CFG::Create_bb ( BB_KIND  k = BB_GOTO  )  [inline, private]

void CFG::Append_bb ( BB_NODE bb  )  [inline, private]

void CFG::Set_current_bb ( BB_NODE b  )  [inline, private]

Definition at line 271 of file opt_cfg.h.

References _current_bb.

void CFG::Process_not_reached ( BOOL  can_disconnect  )  [private]

void CFG::Prop_entry ( BB_NODE bb  )  const [private]

void CFG::Find_exit_blocks ( void   )  [private]

void CFG::Find_no_exit_blocks ( BB_NODE bb,
BB_NODE_SET instack 
) [private]

void CFG::Process_no_exit ( void   )  [private]

void CFG::Bkwd_prop_exit ( BB_NODE bb  )  const [private]

void CFG::Add_altentry ( BB_NODE bb  )  [inline, private]

Definition at line 291 of file opt_cfg.h.

References _entry_vec, and DYN_ARRAY< T >::Newidx().

Referenced by Create(), and Process_entry().

void CFG::Add_earlyexit ( BB_NODE bb  )  [inline, private]

Definition at line 294 of file opt_cfg.h.

References _exit_vec, and DYN_ARRAY< T >::Newidx().

Referenced by Find_exit_blocks(), and Find_no_exit_blocks().

void CFG::Add_notreach ( BB_NODE bb  )  [inline, private]

Definition at line 297 of file opt_cfg.h.

References _notreach_vec, BB_NODE::Init_stmt(), DYN_ARRAY< T >::Newidx(), and NULL.

Referenced by Process_not_reached().

void CFG::Init_last_label ( const IDTYPE  lab  )  [inline, private]

Definition at line 303 of file opt_cfg.h.

References _last_label_num, and _orig_last_label.

BOOL CFG::Verify_wn ( WN wn,
WN parent,
WN_MAP  wn_map 
) [private]

void CFG::Fill_DFS_vec ( BB_NODE bb  )  [private]

void CFG::Init_dpo_vec ( BB_NODE bb,
INT id 
) [private]

Definition at line 4342 of file opt_cfg.cxx.

References _dpo_vec, BB_NODE::Dom_bbs(), BB_NODE::Dom_dfs_id(), FOR_ALL_ELEM, Init, and Is_True.

Referenced by Dpo_vec().

void CFG::Init_pdo_vec ( BB_NODE bb,
INT id 
) [private]

Definition at line 4358 of file opt_cfg.cxx.

References _pdo_vec, FOR_ALL_ELEM, Init, Is_True, BB_NODE::Pdom_bbs(), and BB_NODE::Pdom_dfs_id().

Referenced by Pdo_vec().

void CFG::Create_empty_preheader ( WN loop  )  [private]

Definition at line 893 of file opt_cfg.cxx.

References _current_bb, BB_NODE::Firststmt(), New_bb(), BB_NODE::Set_linenum(), TRUE, and WN_Get_Linenum().

Referenced by Add_one_stmt().

void CFG::Lower_do_loop ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Lower_do_while ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Lower_while_do ( WN wn,
END_BLOCK ends_bb 
) [private]

INT CFG::Is_simple_expr ( WN wn  )  [private]

void CFG::Lower_if_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_io_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_do_loop_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_do_while_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_while_do_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_if_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_compgoto_stmt ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_region ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Add_one_stmt ( WN func_nd,
END_BLOCK ends_bb 
) [private]

Definition at line 2789 of file opt_cfg.cxx.

References _agoto_pred_vec, _agoto_succ_vec, _current_bb, _exc, Add_one_compgoto_stmt(), Add_one_do_loop_stmt(), Add_one_do_while_stmt(), Add_one_if_stmt(), Add_one_io_stmt(), Add_one_region(), Add_one_while_do_stmt(), DYN_ARRAY< T >::AddElement(), Append_bb(), Append_label_map(), Append_wn_in(), BB_EXIT, BB_LOGIF, BB_REGIONEXIT, BB_VARGOTO, BOOL, Calls_break(), Connect_predsucc(), Create_bb(), Create_conditional(), Create_empty_preheader(), Cur_PU_Feedback, END_BREAK, END_FALLTHRU, END_NOT, END_UNKNOWN, FALSE, FEEDBACK::FB_lower_branch(), First_bb(), BB_NODE::Firststmt(), FmtAssert, Get_bb_from_label(), BB_NODE::Hascall(), BB_NODE::Hasujp(), Is_True, BB_NODE::Kind(), LABEL_addr_saved(), LABEL_target_of_goto_outer_block(), BB_NODE::Labnam(), EXC::Link_top_es(), EXC::Link_wn_es(), Lower_do_loop(), Lower_do_while(), Lower_fully(), Lower_if_stmt(), Lower_while_do(), New_bb(), CHAIN_NODE::Next(), Null_bb_region(), opc, OPC_BLOCK, OPC_LABEL, OPC_REGION, OPC_RETURN, OPCODE_is_scf(), OPCODE_name(), OPCODE_operator(), OPR_AGOTO, OPR_ALTENTRY, OPR_BLOCK, OPR_CALL, OPR_CAND, OPR_CIOR, OPR_COMPGOTO, OPR_DO_LOOP, OPR_DO_WHILE, OPR_FALSEBR, OPR_FUNC_ENTRY, OPR_GOTO, OPR_GOTO_OUTER_BLOCK, OPR_ICALL, OPR_IF, OPR_INTRINSIC_CALL, OPR_IO, OPR_LABEL, OPR_PICCALL, OPR_PRAGMA, OPR_REGION, OPR_REGION_EXIT, OPR_RETURN, OPR_RETURN_VAL, OPR_TRUEBR, OPR_WHILE_DO, OPR_XPRAGMA, EXC::Pop_exc_scope(), Process_entry(), Pu_Table, EXC::Push_exc_scope(), REGION_is_EH(), REGION_scan_exits(), Rid(), RID_rwn, RID_TYPE_func_entry, Rvi_break_stmt(), EXC_SCOPE::Set_begin_wn(), BB_NODE::Set_callrel(), BB_NODE::Set_hascall(), BB_NODE::Set_haspragma(), BB_NODE::Set_hasujp(), BB_NODE::Set_kind(), BB_NODE::Set_label_loop_info(), BB_NODE::Set_linenum(), BB_NODE::Set_regioninfo(), ST_pu(), Top_bb_region(), TRUE, void, WN_Call_Never_Return, WN_COPY_Tree_With_Map(), WN_Create(), WN_first(), WN_Get_Linenum(), WN_kid0(), WN_Label_Is_Handler_Begin, WN_label_loop_info, WN_label_number(), WN_last(), WN_next(), WN_opcode(), WN_operator(), WN_prev(), WN_region_exits, WN_st(), and WOPT_Enable_Noreturn_Attr_Opt.

Referenced by Add_one_do_loop_stmt(), Add_one_do_while_stmt(), Add_one_if_stmt(), Add_one_region(), Add_one_while_do_stmt(), Create(), Create_conditional(), Create_entrytest(), Create_exittest(), Create_loopbody(), Lower_do_loop(), Lower_if_stmt(), and Process_entry().

BB_NODE * CFG::Process_entry ( WN wn,
END_BLOCK ends_bb 
) [private]

void CFG::Create_label_stmt ( BB_NODE bb  )  [private]

void CFG::Copy_xpragmas_into ( BB_NODE bb,
WN pragmas 
) [private]

BB_NODE * CFG::Create_labelled_bb ( BB_KIND  k = BB_GOTO  )  [private]

BB_NODE * CFG::Create_entrytest ( WN cond,
BB_NODE target 
) [private]

BB_NODE * CFG::Create_loopbody ( WN body  )  [private]

BB_NODE * CFG::Create_exittest ( WN cond,
BB_NODE body_bb,
BB_KIND  k 
) [private]

BB_NODE * CFG::Create_conditional ( WN cond,
BB_NODE true_bb,
BB_NODE false_bb,
BOOL  true_branch,
WN **  created_branch 
) [private]

void CFG::Create_loop_info ( BB_NODE body_bb,
WN loop_wn 
) [private]

void CFG::Create_blank_loop_info ( BB_NODE body_bb  )  [private]

Definition at line 872 of file opt_cfg.cxx.

References Cur_loop_depth(), BB_NODE::Set_label_loop_info(), and WN_CreateLoopInfo.

Referenced by Lower_do_while(), and Lower_while_do().

BB_LOOP * CFG::Ident_loop ( BB_NODE first_bb,
BB_NODE last_bb,
INT32  loopnest,
BB_LOOP cur_loop 
) [private]

void CFG::Set_loop_bb_set ( BB_LOOP loop  )  [private]

BOOL CFG::Check_if_it_can_reach_body_first_bb ( BB_NODE bb,
BB_LOOP loop 
) [private]

void CFG::Compute_true_loop_body_set ( BB_LOOP loop  )  [private]

BOOL CFG::Loop_itself_is_empty ( BB_LOOP loop  )  [private]

BB_LOOP * CFG::Get_last_loop ( BB_LOOP loop  )  [private]

Definition at line 4564 of file opt_cfg.cxx.

References FOR_ALL_NODE, and Init.

void CFG::Screen_out_false_loopnest ( BB_LOOP loop,
BB_LOOP sibling 
) [private]

void CFG::Ident_mp_regions ( void   )  [private]

BB_NODE * CFG::LMV_clone_block ( const BB_NODE src,
LMV_CFG_ADAPTOR adaptor 
) [private]

BB_NODE * CFG::LMV_create_alike_block ( BB_KIND  kind,
BB_NODE model 
) [private]

void CFG::LMV_clone_pred_succ_relationship ( LMV_CFG_ADAPTOR adaptor  )  [private]

void CFG::LMV_clone_loop_body ( LMV_CFG_ADAPTOR adaptor  )  [private]

void CFG::LMV_update_internal_labels ( LMV_CFG_ADAPTOR adaptor  )  [private]

BB_LOOP * CFG::LMV_clone_BB_LOOP ( LMV_CFG_ADAPTOR adaptor  )  [private]

void CFG::LMV_gen_precondioning_stuff ( LMV_CFG_ADAPTOR adaptor  )  [private]

void CFG::LMV_clone_BB_IFINFO ( LMV_CFG_ADAPTOR adaptor  )  [private]

BOOL CFG::Trace ( void   )  const [inline]

void CFG::Print ( FILE fp = stderr,
BOOL  dfs_order = TRUE,
IDTYPE  bb_id = (IDTYPE) -1 
)

void CFG::PrintLoopVis ( BB_LOOP loop,
int &  id 
)

Definition at line 5632 of file opt_cfg.cxx.

References BB_LOOP::Body_set(), BB_LOOP::Child(), FOR_ALL_ELEM, FOR_ALL_NODE, fprintf(), BB_NODE::Id(), and Init.

Referenced by PrintVis().

void CFG::PrintVis ( BOOL  draw_loops  ) 

Definition at line 5655 of file opt_cfg.cxx.

References FOR_ALL_NODE, fprintf(), Init, Loops(), PrintLoopVis(), and BB_NODE::PrintVis().

void CFG::PrintCDVis ( void   ) 

void CFG::Validate ( FILE fp = stderr  ) 

Definition at line 5698 of file opt_cfg.cxx.

References _bb_vec, _first_bb_id, _last_bb_id, FOR_ALL_NODE, fprintf(), Init, and BB_NODE::Validate().

Referenced by Create().

void CFG::Create ( WN func_nd,
BOOL  lower_scf,
BOOL  calls_break,
REGION_LEVEL  rgn_level,
OPT_STAB opt_stab,
BOOL  do_tail 
)

void CFG::Compute_dom_tree ( BOOL  build_dom  ) 

void CFG::Compute_dom_frontier ( void   ) 

void CFG::Compute_bbs_reached ( void   ) 

void CFG::Compute_control_dependence ( void   ) 

MEM_POOL* CFG::Mem_pool ( void   )  const [inline]

MEM_POOL* CFG::Loc_pool ( void   )  const [inline]

CODEMAP* CFG::Htable ( void   )  const [inline]

Definition at line 420 of file opt_cfg.h.

References _htable.

Referenced by Clone_bb(), WOVP::Do_wovp(), Set_volatile_map(), and sort_merge_and_delete_zones().

void CFG::Set_htable ( CODEMAP h  )  [inline]

Definition at line 421 of file opt_cfg.h.

References _htable.

Referenced by SSA::Create_CODEMAP().

IDTYPE CFG::First_bb_id ( void   )  const [inline]

Definition at line 422 of file opt_cfg.h.

References _first_bb_id.

IDTYPE CFG::Last_bb_id ( void   )  const [inline]

mUINT32 CFG::Total_bb_count ( void   )  const [inline]

BOOL CFG::Removable_bb ( const BB_NODE bb  )  const

void CFG::Remove_bb ( BB_NODE bb  ) 

void CFG::Remove_path ( BB_NODE pred,
BB_NODE succ 
)

void CFG::Delete_bb ( BB_NODE bb,
MOD_PHI_BB_CONTAINER mod_phis 
)

BB_NODE* CFG::Entry_bb ( void   )  const [inline]

BB_NODE* CFG::Exit_bb ( void   )  const [inline]

BB_NODE* CFG::Fake_entry_bb ( void   )  const [inline]

BB_NODE* CFG::Fake_exit_bb ( void   )  const [inline]

BB_NODE* CFG::First_bb ( void   )  const [inline]

BB_NODE* CFG::Last_bb ( void   )  const [inline]

Definition at line 442 of file opt_cfg.h.

References _last_bb.

Referenced by Analyze_loops(), CFG_ITER::Last(), and LMV_CFG_ADAPTOR::LMV_CFG_ADAPTOR().

void CFG::Set_last_bb ( BB_NODE bb  )  [inline]

Definition at line 443 of file opt_cfg.h.

References _last_bb.

Referenced by reconstruct_CFG().

BB_NODE* CFG::Get_bb ( mINT32  idx  )  const [inline]

BB_NODE * CFG::Func_entry_bb ( void   )  const

BB_NODE * CFG::Split_bb_with_wns ( BB_NODE oldbb,
WN after_wn 
)

void CFG::Change_block_kind ( BB_NODE bb,
BB_KIND  newkind 
) const

BB_LOOP* CFG::Loops ( void   )  const [inline]

Definition at line 457 of file opt_cfg.h.

References _loops.

Referenced by Analyze_loops(), Compute_loop_depth(), Invalidate_loops(), print_nested_loops(), and PrintVis().

BOOL CFG::Loops_valid (  )  const [inline]

Definition at line 458 of file opt_cfg.h.

References _loops_valid.

Referenced by Analyze_loops(), and Invalidate_loops().

void CFG::Set_loops ( BB_LOOP l  )  [inline]

Definition at line 459 of file opt_cfg.h.

References _loops.

Referenced by Compute_loop_depth().

void CFG::Set_loops_valid ( BOOL  b  )  [inline]

Definition at line 460 of file opt_cfg.h.

References _loops_valid.

Referenced by Analyze_loops(), and Invalidate_loops().

void CFG::Set_exc ( EXC exc  )  [inline]

Definition at line 461 of file opt_cfg.h.

References _exc.

Referenced by COMP_UNIT::COMP_UNIT().

EXC* CFG::Exc ( void   )  const [inline]

Definition at line 462 of file opt_cfg.h.

References _exc.

Referenced by SSA::Create_CODEMAP().

void CFG::Reset_stmt_id ( void   )  [inline]

INT32 CFG::Get_stmt_id ( void   )  [inline]

void CFG::Invalidate_loops ( void   ) 

LABEL_IDX CFG::Alloc_label ( void   )  const [inline]

INT32 CFG::Cur_loop_depth ( void   )  const [inline]

void CFG::Set_cur_loop_depth ( INT32  newdepth  )  [inline]

void CFG::Prepend_wn_in ( BB_NODE bb,
WN wn 
)

void CFG::Append_wn_in ( BB_NODE bb,
WN wn 
)

BOOL CFG::Lower_fully ( void   )  const [inline]

BOOL CFG::Calls_break ( void   )  const [inline]

Definition at line 488 of file opt_cfg.h.

References _calls_break.

Referenced by DCE::Add_goto_stmt(), Add_one_io_stmt(), Add_one_stmt(), and OPT_FEEDBACK::OPT_FEEDBACK().

BOOL CFG::Rvi_break_stmt ( void   )  const [inline]

Definition at line 490 of file opt_cfg.h.

References _rvi_break_stmt.

Referenced by Add_one_stmt().

void CFG::Set_rvi_break_stmt ( BOOL  b  )  [inline]

Definition at line 491 of file opt_cfg.h.

References _rvi_break_stmt.

Referenced by RVI::Perform_phase1(), and RVI::Perform_phase2().

OPT_FEEDBACK* CFG::Feedback ( void   )  const [inline]

void CFG::Set_feedback ( OPT_FEEDBACK fb  )  [inline]

Definition at line 494 of file opt_cfg.h.

References _feedback.

Referenced by Pre_Optimizer().

BOOL CFG::Has_feedback ( void   )  const [inline]

Definition at line 495 of file opt_cfg.h.

References _feedback, and NULL.

void CFG::Push_bb_region ( BB_REGION bbr  )  [inline]

Definition at line 499 of file opt_cfg.h.

References _bb_region, and STACK< T >::Push().

Referenced by Add_one_region(), and Ident_mp_regions().

BB_REGION* CFG::Pop_bb_region ( void   )  [inline]

Definition at line 500 of file opt_cfg.h.

References _bb_region, and STACK< T >::Pop().

Referenced by Add_one_region(), and Ident_mp_regions().

BB_REGION* CFG::Top_bb_region ( void   )  const [inline]

Definition at line 501 of file opt_cfg.h.

References _bb_region, and STACK< T >::Top().

Referenced by Add_one_region(), and Add_one_stmt().

void CFG::Clear_bb_region ( void   )  [inline]

Definition at line 502 of file opt_cfg.h.

References _bb_region, and STACK< T >::Clear().

Referenced by Ident_mp_regions().

BOOL CFG::Null_bb_region ( void   )  const [inline]

Definition at line 503 of file opt_cfg.h.

References _bb_region, and STACK< T >::Is_Empty().

Referenced by Add_one_region(), and Add_one_stmt().

void CFG::Push_mp_type ( MP_TY  t  )  [inline]

Definition at line 506 of file opt_cfg.h.

References _mp_type, and STACK< T >::Push().

Referenced by Add_one_region(), and Ident_mp_regions().

void CFG::Push_mp_rid ( RID rid  )  [inline]

Definition at line 507 of file opt_cfg.h.

References _mp_rid.

Referenced by Add_one_region(), and Ident_mp_regions().

MP_TY CFG::Pop_mp_type ( void   )  [inline]

Definition at line 508 of file opt_cfg.h.

References _mp_type, and STACK< T >::Pop().

Referenced by Add_one_region(), and Ident_mp_regions().

RID* CFG::Pop_mp_rid ( void   )  [inline]

Definition at line 509 of file opt_cfg.h.

References _mp_rid.

Referenced by Add_one_region(), and Ident_mp_regions().

MP_TY CFG::Top_mp_type ( void   )  const [inline]

Definition at line 510 of file opt_cfg.h.

References _mp_type, and STACK< T >::Top().

Referenced by Add_one_do_loop_stmt(), and Inside_mp_do().

RID* CFG::Top_mp_rid ( void   )  const [inline]

Definition at line 511 of file opt_cfg.h.

References _mp_rid.

Referenced by Ident_mp_regions().

BOOL CFG::NULL_mp_type ( void   )  const [inline]

Definition at line 512 of file opt_cfg.h.

References _mp_type, and STACK< T >::Is_Empty().

Referenced by Ident_mp_regions(), and Inside_mp_do().

void CFG::Clear_mp_type ( void   )  [inline]

Definition at line 513 of file opt_cfg.h.

References _mp_type, and STACK< T >::Clear().

Referenced by Ident_mp_regions().

void CFG::Clear_mp_rid ( void   )  [inline]

Definition at line 514 of file opt_cfg.h.

References _mp_rid.

Referenced by Ident_mp_regions().

BOOL CFG::Inside_mp_do ( void   )  [inline]

Definition at line 516 of file opt_cfg.h.

References MP_REGION, NULL_mp_type(), and Top_mp_type().

Referenced by Add_one_do_loop_stmt(), and New_bb().

RID* CFG::Rid ( void   )  const [inline]

REGION_LEVEL CFG::Rgn_level ( void   )  const [inline]

void CFG::Set_has_regions ( void   )  [inline]

Definition at line 542 of file opt_cfg.h.

References _has_regions, and TRUE.

Referenced by Add_one_region().

BOOL CFG::Has_regions ( void   )  const [inline]

Definition at line 543 of file opt_cfg.h.

References _has_regions.

Referenced by DCE::DCE(), and DCE::Update_region_information().

void CFG::Inc_dohead_cnt ( void   )  [inline]

Definition at line 545 of file opt_cfg.h.

References _dohead_cnt.

INT32 CFG::Dohead_cnt ( void   )  const [inline]

Definition at line 546 of file opt_cfg.h.

References _dohead_cnt.

BB_NODE* CFG::Get_bb_from_label ( INT32  l  )  const [inline]

void CFG::Append_label_map ( INT32  labnum,
BB_NODE bb 
) [inline]

BB_NODE * CFG::Add_bb_to_edge ( BB_NODE v,
BB_NODE w 
)

const BB_LOOP * CFG::Find_innermost_loop_contains ( BB_NODE bb  ) 

BB_NODE * CFG::Find_enclosing_region_bb ( BB_NODE bb,
WN_PRAGMA_ID  region_pragma 
)

BOOL CFG::Is_outermost_loop_in_parallel_region ( BB_LOOP loop,
WN_PRAGMA_ID  pragma_id 
)

void CFG::Find_not_reached ( void   ) 

void CFG::Connect_agotos (  ) 

void CFG::Remove_agoto_pred ( BB_NODE bb  ) 

INT32 CFG::Agoto_succ_entries (  ) 

Definition at line 3250 of file opt_cfg.cxx.

References _agoto_succ_vec, and DYN_ARRAY< T >::Elements().

Referenced by DCE::Check_required_agoto().

BB_NODE * CFG::Agoto_succ_bb ( INT32  idx  ) 

Definition at line 3260 of file opt_cfg.cxx.

References _agoto_succ_vec, Is_True, and DYN_ARRAY< T >::Lastidx().

Referenced by DCE::Check_required_agoto().

void CFG::Process_multi_entryexit ( BOOL  is_whirl  ) 

void CFG::Remove_fake_entryexit_arcs ( void   ) 

void CFG::Invalidate_and_update_aux_info ( void   ) 

INT CFG::Remove_critical_edge (  ) 

void CFG::Get_pred_first_vec ( BB_NODE bbvec[],
INT32 numbbs 
)

Definition at line 4246 of file opt_cfg.cxx.

References Exit_bb(), FOR_ALL_NODE, get_pred_first_vec(), Init, and BB_NODE::Reset_dforder().

BB_NODE ** CFG::Dfs_vec ( void   ) 

INT32 CFG::Dfs_vec_sz ( void   )  const [inline]

Definition at line 621 of file opt_cfg.h.

References _dfs_vec_sz.

Referenced by DFSBB_ITER::DFSBB_ITER(), RVI::Perform_phase1(), and RVI::Perform_phase2().

BB_NODE ** CFG::Po_vec ( void   ) 

Definition at line 4322 of file opt_cfg.cxx.

References _dfs_vec, _po_vec, CXX_DELETE_ARRAY, Dfs_vec(), Mem_pool(), and void.

Referenced by POBB_ITER::POBB_ITER().

INT32 CFG::Po_vec_sz ( void   )  const [inline]

Definition at line 624 of file opt_cfg.h.

References _po_vec_sz.

Referenced by POBB_ITER::POBB_ITER().

BB_NODE* CFG::Po_Bb ( INT32  n  )  const [inline]

Definition at line 625 of file opt_cfg.h.

References _po_vec.

BB_NODE ** CFG::Dpo_vec ( void   ) 

INT32 CFG::Dpo_vec_sz ( void   )  const [inline]

Definition at line 629 of file opt_cfg.h.

References _dpo_vec_sz.

Referenced by DPOBB_ITER::DPOBB_ITER().

BB_NODE* CFG::Dpo_Bb ( INT32  n  )  const [inline]

Definition at line 630 of file opt_cfg.h.

References _dpo_vec.

Referenced by VALNUM_FRE::_insert_valnum_phi(), and EXP_WORKLST::Insert_exp_phi().

BB_NODE ** CFG::Pdo_vec ( void   ) 

INT32 CFG::Pdo_vec_sz ( void   )  const [inline]

Definition at line 634 of file opt_cfg.h.

References _pdo_vec_sz.

Referenced by DPOBB_ITER::DPOBB_ITER().

BB_NODE* CFG::Pdo_Bb ( INT32  n  )  const [inline]

Definition at line 635 of file opt_cfg.h.

References _pdo_vec.

Referenced by EXP_WORKLST::SPRE_create_iphi_succ().

BOOL CFG::Verify_tree ( WN wn  ) 

BOOL CFG::Verify_cfg ( void   ) 

void CFG::Find_loop_cycles ( void   ) 

BB_LOOP * CFG::Analyze_loops ( void   ) 

BB_NODE * CFG::Find_entry_bb ( void   ) 

BOOL CFG::Fall_through ( BB_NODE bb1,
BB_NODE bb2 
)

void CFG::Delete_empty_BB (  ) 

void CFG::Clone_bb ( IDTYPE  source,
IDTYPE  dest 
)

BB_NODE* CFG::Create_and_allocate_bb ( BB_KIND  k  )  [inline]

BOOL CFG::LMV_eligible_for_multiversioning ( const BB_LOOP loop,
BOOL  trace 
)

void CFG::LMV_clone_loop ( LMV_CFG_ADAPTOR adaptor  ) 

BOOL CFG::If_convertible_cond ( WN wn  ) 

BOOL CFG::If_conv_criteria_met ( WN wn,
WN else_wn,
WN then_wn,
BOOL  empty_else,
BOOL  empty_then 
)

BOOL CFG::Screen_cand ( WN wn,
WN else_wn,
WN then_wn,
BOOL  empty_else,
BOOL  empty_then 
)

WN * CFG::Conv_to_select ( WN wn  ) 


Friends And Related Function Documentation

friend class EXITBB_ITER [friend]

Definition at line 160 of file opt_cfg.h.

friend class OPT_TAIL [friend]

Definition at line 161 of file opt_cfg.h.


Field Documentation

BOOL CFG::_trace [private]

Definition at line 163 of file opt_cfg.h.

Referenced by CFG(), and Trace().

Definition at line 168 of file opt_cfg.h.

Referenced by Add_notreach(), CFG(), Process_multi_entryexit(), Process_not_reached(), and ~CFG().

Definition at line 169 of file opt_cfg.h.

Referenced by Add_one_stmt(), CFG(), Connect_agotos(), Remove_agoto_pred(), and ~CFG().

Definition at line 170 of file opt_cfg.h.

Referenced by Add_one_stmt(), Agoto_succ_bb(), Agoto_succ_entries(), CFG(), Connect_agotos(), and ~CFG().

BB_NODE** CFG::_dfs_vec [private]

Definition at line 172 of file opt_cfg.h.

Referenced by CFG(), Dfs_vec(), Fill_DFS_vec(), Invalidate_and_update_aux_info(), and Po_vec().

Definition at line 173 of file opt_cfg.h.

Referenced by CFG(), Dfs_vec(), Dfs_vec_sz(), Fill_DFS_vec(), and Invalidate_and_update_aux_info().

BB_NODE** CFG::_po_vec [private]

Definition at line 174 of file opt_cfg.h.

Referenced by CFG(), Dfs_vec(), Fill_DFS_vec(), Invalidate_and_update_aux_info(), Po_Bb(), and Po_vec().

Definition at line 175 of file opt_cfg.h.

Referenced by CFG(), Dfs_vec(), Fill_DFS_vec(), Invalidate_and_update_aux_info(), and Po_vec_sz().

BB_NODE** CFG::_dpo_vec [private]

Definition at line 176 of file opt_cfg.h.

Referenced by CFG(), Dpo_Bb(), Dpo_vec(), Init_dpo_vec(), and Invalidate_and_update_aux_info().

Definition at line 177 of file opt_cfg.h.

Referenced by CFG(), Dpo_vec(), Dpo_vec_sz(), and Invalidate_and_update_aux_info().

BB_NODE** CFG::_pdo_vec [private]

Definition at line 178 of file opt_cfg.h.

Referenced by CFG(), Init_pdo_vec(), Invalidate_and_update_aux_info(), Pdo_Bb(), and Pdo_vec().

Definition at line 179 of file opt_cfg.h.

Referenced by CFG(), Invalidate_and_update_aux_info(), Pdo_vec(), and Pdo_vec_sz().

Definition at line 181 of file opt_cfg.h.

Referenced by CFG(), Compute_dom_tree(), and Loc_pool().

BB_NODE* CFG::_entry_bb [private]

Definition at line 182 of file opt_cfg.h.

Referenced by CFG(), Entry_bb(), Find_exit_blocks(), and Process_multi_entryexit().

BB_NODE* CFG::_exit_bb [private]

Definition at line 183 of file opt_cfg.h.

Referenced by CFG(), Exit_bb(), and Process_multi_entryexit().

BB_NODE* CFG::_first_bb [private]

Definition at line 184 of file opt_cfg.h.

Referenced by CFG(), Create(), First_bb(), and Remove_bb().

BB_NODE* CFG::_last_bb [private]

Definition at line 185 of file opt_cfg.h.

Referenced by Append_bb(), CFG(), Create(), Last_bb(), Remove_bb(), Set_last_bb(), and Split_bb_with_wns().

Definition at line 186 of file opt_cfg.h.

Referenced by CFG(), Fake_entry_bb(), Fill_DFS_vec(), and Process_multi_entryexit().

Definition at line 187 of file opt_cfg.h.

Referenced by CFG(), Fake_exit_bb(), Fill_DFS_vec(), and Process_multi_entryexit().

BB_LOOP* CFG::_loops [private]

Definition at line 188 of file opt_cfg.h.

Referenced by Analyze_loops(), CFG(), Invalidate_loops(), Loops(), and Set_loops().

Definition at line 189 of file opt_cfg.h.

Referenced by CFG(), Loops_valid(), and Set_loops_valid().

EXC* CFG::_exc [private]

Definition at line 190 of file opt_cfg.h.

Referenced by Add_one_stmt(), CFG(), Exc(), and Set_exc().

Definition at line 191 of file opt_cfg.h.

Referenced by Get_stmt_id(), and Reset_stmt_id().

Definition at line 195 of file opt_cfg.h.

Referenced by CFG(), First_bb_id(), and Validate().

MAP* CFG::_label_map [private]

Definition at line 197 of file opt_cfg.h.

Referenced by Append_label_map(), CFG(), and Get_bb_from_label().

Definition at line 198 of file opt_cfg.h.

Referenced by CFG(), and Init_last_label().

Definition at line 199 of file opt_cfg.h.

Referenced by CFG(), and Init_last_label().

Definition at line 200 of file opt_cfg.h.

Referenced by CFG(), Cur_loop_depth(), and Set_cur_loop_depth().

Definition at line 201 of file opt_cfg.h.

Referenced by CFG(), Create(), and Lower_fully().

Definition at line 203 of file opt_cfg.h.

Referenced by Conv_to_select(), Create(), Is_simple_expr(), Lower_if_stmt(), and Screen_cand().

CODEMAP* CFG::_htable [private]

Definition at line 204 of file opt_cfg.h.

Referenced by Htable(), and Set_htable().

Definition at line 205 of file opt_cfg.h.

Referenced by Calls_break(), CFG(), and Create().

Definition at line 206 of file opt_cfg.h.

Referenced by CFG(), Rvi_break_stmt(), and Set_rvi_break_stmt().

Definition at line 207 of file opt_cfg.h.

Referenced by CFG(), Feedback(), Has_feedback(), and Set_feedback().

Definition at line 208 of file opt_cfg.h.

Referenced by Clear_mp_type(), NULL_mp_type(), Pop_mp_type(), Push_mp_type(), and Top_mp_type().

STACK<RID *> CFG::_mp_rid [private]

Definition at line 209 of file opt_cfg.h.

Referenced by Clear_mp_rid(), Pop_mp_rid(), Push_mp_rid(), and Top_mp_rid().

RID* CFG::_rid [private]

Definition at line 215 of file opt_cfg.h.

Referenced by CFG(), Create(), and Rid().

Definition at line 216 of file opt_cfg.h.

Referenced by Add_one_region(), CFG(), Create(), and Rgn_level().

Definition at line 217 of file opt_cfg.h.

Referenced by CFG(), Has_regions(), and Set_has_regions().

Definition at line 218 of file opt_cfg.h.

Referenced by CFG(), Dohead_cnt(), and Inc_dohead_cnt().

Definition at line 220 of file opt_cfg.h.

Referenced by CFG(), Loop_itself_is_empty(), and Set_loop_bb_set().


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

Generated on Wed Apr 8 16:30:18 2009 for Open64 by  doxygen 1.5.6