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

Public Member Functions

tree value_of_expr (tree name, gimple *) final override
 
virtual tree value_on_edge (edge, tree expr) override
 
virtual tree value_of_stmt (gimple *, tree name=NULL) override
 
virtual bool range_of_expr (vrange &r, tree expr, gimple *=NULL)
 
virtual bool fold_stmt (gimple_stmt_iterator *)
 
bool substitute_and_fold (basic_block=NULL)
 
bool replace_uses_in (gimple *)
 
bool replace_phi_args_in (gphi *)
 
virtual void pre_fold_bb (basic_block)
 
virtual void post_fold_bb (basic_block)
 
virtual void pre_fold_stmt (gimple *)
 
virtual void post_new_stmt (gimple *)
 
bool propagate_into_phi_args (basic_block)
 
virtual bool range_on_edge (vrange &r, edge, tree expr)
 
virtual bool range_of_stmt (vrange &r, gimple *, tree name=NULL)
 
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

bool fold_all_stmts
 

Protected Member Functions

bool get_tree_range (vrange &v, tree expr, gimple *stmt)
 
bool get_arith_expr_range (vrange &r, tree expr, gimple *stmt)
 

Protected Attributes

relation_oraclem_oracle
 

Member Function Documentation

◆ dump()

void range_query::dump ( FILE * )
virtualinherited

◆ fold_stmt()

virtual bool substitute_and_fold_engine::fold_stmt ( gimple_stmt_iterator * )
inlinevirtualinherited

◆ get_arith_expr_range()

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

◆ get_tree_range()

◆ oracle()

◆ post_fold_bb()

virtual void substitute_and_fold_engine::post_fold_bb ( basic_block )
inlinevirtualinherited

◆ post_new_stmt()

virtual void substitute_and_fold_engine::post_new_stmt ( gimple * )
inlinevirtualinherited

◆ pre_fold_bb()

virtual void substitute_and_fold_engine::pre_fold_bb ( basic_block )
inlinevirtualinherited

◆ pre_fold_stmt()

virtual void substitute_and_fold_engine::pre_fold_stmt ( gimple * )
inlinevirtualinherited

◆ 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().

◆ 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()

tree copy_folder::value_of_expr ( tree name,
gimple *  )
finaloverridevirtual
Callback for substitute_and_fold to get at the final copy-of values.   

Implements substitute_and_fold_engine.

References copy_of, n_copy_of, NULL_TREE, SSA_NAME_VERSION, and prop_value_t::value.

◆ value_of_stmt()

tree substitute_and_fold_engine::value_of_stmt ( gimple * stmt,
tree name = NULL )
overridevirtualinherited

◆ value_on_edge()

tree substitute_and_fold_engine::value_on_edge ( edge ,
tree expr )
overridevirtualinherited

Field Documentation

◆ fold_all_stmts

bool substitute_and_fold_engine::fold_all_stmts
inherited

◆ m_oracle


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