GCC Middle and Back End API Reference
jt_path_registry Class Referenceabstract

#include <tree-ssa-threadupdate.h>

Inheritance diagram for jt_path_registry:
Collaboration diagram for jt_path_registry:

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
 

Constructor & Destructor Documentation

◆ jt_path_registry()

jt_path_registry::jt_path_registry ( bool backedge_threads)

◆ ~jt_path_registry()

jt_path_registry::~jt_path_registry ( )
virtual

References m_paths.

Member Function Documentation

◆ allocate_thread_path()

◆ cancel_invalid_paths()

◆ debug()

void jt_path_registry::debug ( )

References debug_path(), ggc_alloc(), i, and m_paths.

◆ debug_path()

void jt_path_registry::debug_path ( FILE * dump_file,
int pathno )
protected

◆ DISABLE_COPY_AND_ASSIGN()

jt_path_registry::DISABLE_COPY_AND_ASSIGN ( jt_path_registry )
private

◆ push_edge()

◆ register_jump_thread()

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, ggc_alloc(), m_paths, and TDF_DETAILS.

Referenced by back_threader_registry::register_path(), and jump_threader::thread_across_edge().

◆ thread_through_all_blocks()

bool jt_path_registry::thread_through_all_blocks ( bool peel_loop_headers)
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, ggc_alloc(), 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().

◆ update_cfg()

virtual bool jt_path_registry::update_cfg ( bool peel_loop_headers)
privatepure virtual

Field Documentation

◆ m_allocator

jump_thread_path_allocator jt_path_registry::m_allocator
private

Referenced by allocate_thread_path(), and push_edge().

◆ m_backedge_threads

bool jt_path_registry::m_backedge_threads
private

◆ m_num_threaded_edges

◆ m_paths


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