GCC Middle and Back End API Reference
rvrp_folder Class Reference
Inheritance diagram for rvrp_folder:
Collaboration diagram for rvrp_folder:

Public Member Functions

 rvrp_folder (gimple_ranger *r, bool all)
 
 ~rvrp_folder ()
 
tree value_of_expr (tree name, gimple *s=NULL) override
 
tree value_on_edge (edge e, tree name) override
 
tree value_of_stmt (gimple *s, tree name=NULL) override
 
void pre_fold_bb (basic_block bb) override
 
void post_fold_bb (basic_block bb) override
 
void pre_fold_stmt (gimple *stmt) override
 
bool fold_stmt (gimple_stmt_iterator *gsi) override
 
virtual bool range_of_expr (vrange &r, tree expr, gimple *=NULL)
 
bool substitute_and_fold (basic_block=NULL)
 
bool replace_uses_in (gimple *)
 
bool replace_phi_args_in (gphi *)
 
virtual void post_new_stmt (gimple *)
 
bool propagate_into_phi_args (basic_block)
 
virtual tree value_on_entry (basic_block, tree expr)
 
virtual tree value_on_exit (basic_block, tree expr)
 
virtual bool range_on_edge (vrange &r, edge, tree expr)
 
virtual bool range_of_stmt (vrange &r, gimple *, tree name=NULL)
 
virtual bool range_on_entry (vrange &r, basic_block bb, tree expr)
 
virtual bool range_on_exit (vrange &r, basic_block bb, tree expr)
 
relation_kind query_relation (gimple *s, tree ssa1, tree ssa2, bool get_range=true)
 
relation_kind query_relation (edge e, tree ssa1, tree ssa2, bool get_range=true)
 
relation_oracleoracle () const
 
virtual void dump (FILE *)
 

Data Fields

remove_unreachable m_unreachable
 
bool fold_all_stmts
 

Protected Member Functions

bool get_tree_range (vrange &v, tree expr, gimple *stmt, basic_block bbentry=NULL, basic_block bbexit=NULL)
 
bool invoke_range_of_expr (vrange &v, tree expr, gimple *stmt, basic_block bbentry, basic_block bbexit)
 
bool get_arith_expr_range (vrange &r, tree expr, gimple *stmt)
 

Protected Attributes

relation_oraclem_oracle
 

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (rvrp_folder)
 

Private Attributes

gimple_rangerm_ranger
 
simplify_using_ranges m_simplifier
 
pointer_equiv_analyzerm_pta
 
gimplem_last_bb_stmt
 

Constructor & Destructor Documentation

◆ rvrp_folder()

rvrp_folder::rvrp_folder ( gimple_ranger * r,
bool all )
inline

References m_last_bb_stmt, m_pta, m_ranger, NULL, and r.

◆ ~rvrp_folder()

rvrp_folder::~rvrp_folder ( )
inline

References m_pta.

Member Function Documentation

◆ DISABLE_COPY_AND_ASSIGN()

rvrp_folder::DISABLE_COPY_AND_ASSIGN ( rvrp_folder )
private

◆ dump()

void range_query::dump ( FILE * )
virtualinherited

◆ fold_stmt()

◆ get_arith_expr_range()

bool range_query::get_arith_expr_range ( vrange & r,
tree expr,
gimple * stmt )
protectedinherited

◆ get_tree_range()

◆ invoke_range_of_expr()

bool range_query::invoke_range_of_expr ( vrange & v,
tree expr,
gimple * stmt,
basic_block bbentry,
basic_block bbexit )
protectedinherited

◆ oracle()

◆ post_fold_bb()

void rvrp_folder::post_fold_bb ( basic_block bb)
inlineoverridevirtual

◆ post_new_stmt()

virtual void substitute_and_fold_engine::post_new_stmt ( gimple * )
inlinevirtualinherited

◆ pre_fold_bb()

◆ pre_fold_stmt()

◆ propagate_into_phi_args()

◆ query_relation() [1/2]

◆ query_relation() [2/2]

◆ range_of_expr()

bool substitute_and_fold_engine::range_of_expr ( vrange & r,
tree expr,
gimple * = NULL )
virtualinherited

Implements range_query.

◆ range_of_stmt()

bool range_query::range_of_stmt ( vrange & r,
gimple * stmt,
tree name = NULL )
virtualinherited

◆ range_on_edge()

bool range_query::range_on_edge ( vrange & r,
edge ,
tree expr )
virtualinherited
Support routines for value queries.
   Copyright (C) 2020-2024 Free Software Foundation, Inc.
   Contributed by Aldy Hernandez <aldyh@redhat.com> and
   Andrew MacLeod <amacleod@redhat.com>.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   

Reimplemented in ranger_cache, dom_ranger, and gimple_ranger.

References r, and range_query::range_of_expr().

Referenced by fur_edge::get_operand(), fur_source::get_phi_operand(), fur_edge::get_phi_operand(), phi_analyzer::process_phi(), range_query::query_relation(), and range_query::value_on_edge().

◆ range_on_entry()

bool range_query::range_on_entry ( vrange & r,
basic_block bb,
tree expr )
virtualinherited

◆ range_on_exit()

bool range_query::range_on_exit ( vrange & r,
basic_block bb,
tree expr )
virtualinherited

◆ replace_phi_args_in()

◆ replace_uses_in()

bool substitute_and_fold_engine::replace_uses_in ( gimple * stmt)
inherited

◆ substitute_and_fold()

bool substitute_and_fold_engine::substitute_and_fold ( basic_block block = NULL)
inherited
Perform final substitution and folding of propagated values.
Process the whole function if BLOCK is null, otherwise only
process the blocks that BLOCK dominates.  In the latter case,
it is the caller's responsibility to ensure that dominator
information is available and up-to-date.

PROP_VALUE[I] contains the single value that should be substituted
at every use of SSA name N_I.  If PROP_VALUE is NULL, no values are
substituted.

If FOLD_FN is non-NULL the function will be invoked on all statements
before propagating values for pass specific simplification.

DO_DCE is true if trivially dead stmts can be removed.

If DO_DCE is true, the statements within a BB are walked from
last to first element.  Otherwise we scan from first to last element.

Return TRUE when something changed.   

References bitmap_empty_p(), calculate_dominance_info(), CDI_DOMINATORS, cfun, dom_info_state(), dump_file, dump_flags, ENTRY_BLOCK_PTR_FOR_FN, fixup_noreturn_call(), gcc_assert, ggc_alloc(), gimple_purge_all_dead_abnormal_call_edges(), gimple_purge_all_dead_eh_edges(), prop_stats_d::num_const_prop, prop_stats_d::num_copy_prop, prop_stats_d::num_stmts_folded, print_gimple_stmt(), prop_stats, simple_dce_from_worklist(), statistics_counter_event(), and TDF_DETAILS.

Referenced by ccp_finalize(), and fini_copy_prop().

◆ value_of_expr()

◆ value_of_stmt()

tree rvrp_folder::value_of_stmt ( gimple * s,
tree name = NULL )
inlineoverridevirtual

◆ value_on_edge()

◆ value_on_entry()

tree range_query::value_on_entry ( basic_block bb,
tree expr )
virtualinherited

◆ value_on_exit()

tree range_query::value_on_exit ( basic_block bb,
tree expr )
virtualinherited

Field Documentation

◆ fold_all_stmts

bool substitute_and_fold_engine::fold_all_stmts
inherited

◆ m_last_bb_stmt

gimple* rvrp_folder::m_last_bb_stmt
private

◆ m_oracle

◆ m_pta

◆ m_ranger

◆ m_simplifier

simplify_using_ranges rvrp_folder::m_simplifier
private

Referenced by fold_stmt().

◆ m_unreachable

remove_unreachable rvrp_folder::m_unreachable

Referenced by pre_fold_stmt().


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