GCC Middle and Back End API Reference
|
#include <tree-ssa-threadupdate.h>
Public Member Functions | |
jt_path_registry (bool backedge_threads) | |
virtual | ~jt_path_registry () |
bool | register_jump_thread (vec< jump_thread_edge * > *) |
bool | thread_through_all_blocks (bool peel_loop_headers) |
void | push_edge (vec< jump_thread_edge * > *path, edge, jump_thread_edge_type) |
vec< jump_thread_edge * > * | allocate_thread_path () |
void | debug () |
Protected Member Functions | |
void | debug_path (FILE *, int pathno) |
Protected Attributes | |
vec< vec< jump_thread_edge * > * > | m_paths |
unsigned long | m_num_threaded_edges |
Private Member Functions | |
virtual bool | update_cfg (bool peel_loop_headers)=0 |
bool | cancel_invalid_paths (vec< jump_thread_edge * > &path) |
DISABLE_COPY_AND_ASSIGN (jt_path_registry) | |
Private Attributes | |
jump_thread_path_allocator | m_allocator |
bool | m_backedge_threads |
jt_path_registry::jt_path_registry | ( | bool | backedge_threads | ) |
References m_backedge_threads, m_num_threaded_edges, and m_paths.
|
virtual |
References m_paths.
vec< jump_thread_edge * > * jt_path_registry::allocate_thread_path | ( | ) |
References jump_thread_path_allocator::allocate_thread_path(), and m_allocator.
Referenced by back_threader_registry::register_path(), and jump_threader::thread_across_edge().
|
private |
References cancel_thread(), cfun, curr_loop, empty_block_p(), flow_loop_nested_p(), gcc_assert, gcc_checking_assert, i, loop::latch, m_backedge_threads, NULL, and PROP_loop_opts_done.
Referenced by register_jump_thread().
void jt_path_registry::debug | ( | ) |
References debug_path(), i, and m_paths.
|
protected |
References dump_file, i, and m_paths.
Referenced by back_jt_path_registry::adjust_paths_after_duplication(), and debug().
|
private |
void jt_path_registry::push_edge | ( | vec< jump_thread_edge * > * | path, |
edge | e, | ||
jump_thread_edge_type | type ) |
bool jt_path_registry::register_jump_thread | ( | vec< jump_thread_edge * > * | path | ) |
Register a jump threading opportunity. We queue up all the jump threading opportunities discovered by a pass and update the CFG and SSA form all at once. E is the edge we can thread, E2 is the new target edge, i.e., we are effectively recording that E->dest can be changed to E2->dest after fixing the SSA graph. Return TRUE if PATH was successfully threaded.
References cancel_invalid_paths(), dbg_cnt(), dump_file, dump_flags, dump_jump_thread_path(), gcc_checking_assert, m_paths, and TDF_DETAILS.
Referenced by back_threader_registry::register_path(), and jump_threader::thread_across_edge().
Thread all paths that have been queued for jump threading, and update the CFG accordingly. It is the caller's responsibility to fix the dominance information and rewrite duplicated SSA_NAMEs back into SSA form. If PEEL_LOOP_HEADERS is false, avoid threading edges through loop headers if it does not simplify the loop. Returns true if one or more edges were threaded.
References cfun, LOOPS_NEED_FIXUP, loops_state_set(), m_num_threaded_edges, m_paths, statistics_counter_event(), and update_cfg().
Referenced by back_threader::thread_blocks(), and jump_threader::thread_through_all_blocks().
Implemented in back_jt_path_registry, and fwd_jt_path_registry.
Referenced by thread_through_all_blocks().
|
private |
Referenced by allocate_thread_path(), and push_edge().
|
private |
Referenced by cancel_invalid_paths(), and jt_path_registry().
|
protected |
|
protected |
Referenced by back_jt_path_registry::adjust_paths_after_duplication(), debug(), debug_path(), jt_path_registry(), fwd_jt_path_registry::mark_threaded_blocks(), register_jump_thread(), fwd_jt_path_registry::remove_jump_threads_including(), back_jt_path_registry::rewire_first_differing_edge(), thread_through_all_blocks(), back_jt_path_registry::update_cfg(), fwd_jt_path_registry::update_cfg(), and ~jt_path_registry().