GCC Middle and Back End API Reference
back_threader_profitability Class Reference

Public Member Functions

 back_threader_profitability (bool speed_p, gimple *stmt)
 
bool possibly_profitable_path_p (const vec< basic_block > &, bool *)
 
bool profitable_path_p (const vec< basic_block > &, edge taken, bool *irreducible_loop)
 

Private Attributes

const bool m_speed_p
 
int m_exit_jump_benefit
 
bool m_threaded_multiway_branch
 
bool m_threaded_through_latch
 
bool m_multiway_branch_in_path
 
bool m_contains_hot_bb
 
int m_n_insns
 

Constructor & Destructor Documentation

◆ back_threader_profitability()

back_threader_profitability::back_threader_profitability ( bool speed_p,
gimple * stmt )

Member Function Documentation

◆ possibly_profitable_path_p()

bool back_threader_profitability::possibly_profitable_path_p ( const vec< basic_block > & m_path,
bool * large_non_fsm )
Examine jump threading path PATH and return TRUE if it is possibly
profitable to thread it, otherwise return FALSE.  If this function
returns TRUE profitable_path_p might not be satisfied but when
the path is extended it might be.  In particular indicate in
*LARGE_NON_FSM whether the thread is too large for a non-FSM thread
but would be OK if we extend the path to cover the loop backedge.

?? It seems we should be able to loosen some of the restrictions in
this function after loop optimizations have run.   

References cfun, dump_file, dump_flags, eni_size_weights, estimate_num_insns(), EXIT_BLOCK, find_edge(), fputc(), gcc_checking_assert, ggc_alloc(), gimple_call_builtin_p(), gimple_call_internal_p(), gsi_after_labels(), gsi_end_p(), gsi_last_bb(), gsi_next_nondebug(), gsi_stmt(), basic_block_def::index, is_gimple_debug(), last, loop::latch, m_contains_hot_bb, m_exit_jump_benefit, m_multiway_branch_in_path, m_n_insns, m_speed_p, m_threaded_multiway_branch, m_threaded_through_latch, optimize_bb_for_speed_p(), probably_never_executed_edge_p(), and TDF_DETAILS.

◆ profitable_path_p()

bool back_threader_profitability::profitable_path_p ( const vec< basic_block > & m_path,
edge taken_edge,
bool * creates_irreducible_loop )
Examine jump threading path PATH and return TRUE if it is profitable to
thread it, otherwise return FALSE.

The taken edge out of the path is TAKEN_EDGE.

CREATES_IRREDUCIBLE_LOOP is set to TRUE if threading this path
would create an irreducible loop.

?? It seems we should be able to loosen some of the restrictions in
this function after loop optimizations have run.   

References cfun, determine_bb_domination_status(), DOMST_NONDOMINATING, dump_file, dump_flags, empty_block_p(), fputc(), ggc_alloc(), loop::latch, m_contains_hot_bb, m_multiway_branch_in_path, m_n_insns, m_speed_p, m_threaded_multiway_branch, m_threaded_through_latch, optimize_edge_for_speed_p(), probably_never_executed_edge_p(), PROP_loop_opts_done, and TDF_DETAILS.

Field Documentation

◆ m_contains_hot_bb

bool back_threader_profitability::m_contains_hot_bb
private

◆ m_exit_jump_benefit

int back_threader_profitability::m_exit_jump_benefit
private

◆ m_multiway_branch_in_path

bool back_threader_profitability::m_multiway_branch_in_path
private

◆ m_n_insns

int back_threader_profitability::m_n_insns
private

◆ m_speed_p

const bool back_threader_profitability::m_speed_p
private

◆ m_threaded_multiway_branch

bool back_threader_profitability::m_threaded_multiway_branch
private

◆ m_threaded_through_latch

bool back_threader_profitability::m_threaded_through_latch
private

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