|
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) |
| void | remove_path (unsigned pathno) |
| void | remove_path (unsigned pathno, edge first) |
| void | add_first_edge (edge) |
| void | drop_first_edge (edge) |
| unsigned | first_edge_count (edge) |
Protected Attributes | |
| vec< vec< jump_thread_edge * > * > | m_paths |
| hash_map< edge, unsigned > | m_first_edge_counts |
| 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.
Referenced by back_jt_path_registry::back_jt_path_registry(), DISABLE_COPY_AND_ASSIGN(), and fwd_jt_path_registry::fwd_jt_path_registry().
|
virtual |
References m_paths.
|
protected |
Note that one more registered path starts on E.
References hash_map< KeyId, Value, Traits >::get_or_insert(), and m_first_edge_counts.
Referenced by back_jt_path_registry::adjust_one_path(), and register_jump_thread().
| 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, empty_block_p(), flow_loop_nested_p(), gcc_assert, gcc_checking_assert, loop::header, i, loop::latch, m_backedge_threads, NULL, and PROP_loop_opts_done.
Referenced by register_jump_thread(), and update_cfg().
| 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_one_path(), and debug().
|
private |
References jt_path_registry().
|
protected |
Note that one fewer registered path starts on E.
References gcc_checking_assert, hash_map< KeyId, Value, Traits >::get(), m_first_edge_counts, and hash_map< KeyId, Value, Traits >::remove().
Referenced by back_jt_path_registry::adjust_one_path(), and remove_path().
|
protected |
How many registered paths start on E.
References gcc_checking_assert, hash_map< KeyId, Value, Traits >::get(), and m_first_edge_counts.
Referenced by back_jt_path_registry::adjust_paths_after_duplication().
| 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 add_first_edge(), 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().
|
protected |
Drop path PATHNO, keeping the first-edge counts in step.
References m_paths, and remove_path().
Referenced by back_jt_path_registry::adjust_one_path(), fwd_jt_path_registry::mark_threaded_blocks(), remove_path(), back_jt_path_registry::update_cfg(), and fwd_jt_path_registry::update_cfg().
|
protected |
Drop path PATHNO, which started on FIRST, keeping the first-edge counts in step. For callers whose path has already been released.
References drop_first_edge(), and m_paths.
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.
References cancel_invalid_paths().
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().
Referenced by add_first_edge(), drop_first_edge(), and first_edge_count().
|
protected |
|
protected |
Referenced by back_jt_path_registry::adjust_one_path(), 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(), remove_path(), remove_path(), 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().