GCC Middle and Back End API Reference
gimple_ranger Class Reference

#include <gimple-range.h>

Inheritance diagram for gimple_ranger:
Collaboration diagram for gimple_ranger:

Public Member Functions

 gimple_ranger (bool use_imm_uses=true)
 
 ~gimple_ranger ()
 
virtual bool range_of_stmt (vrange &r, gimple *, tree name=NULL) override
 
virtual bool range_of_expr (vrange &r, tree name, gimple *=NULL) override
 
virtual bool range_on_edge (vrange &r, edge e, tree name) override
 
virtual bool range_on_entry (vrange &r, basic_block bb, tree name) override
 
virtual bool range_on_exit (vrange &r, basic_block bb, tree name) override
 
void export_global_ranges ()
 
virtual void dump (FILE *f) override
 
void debug ()
 
void dump_bb (FILE *f, basic_block bb)
 
bool fold_stmt (gimple_stmt_iterator *gsi, tree(*)(tree))
 
void register_inferred_ranges (gimple *s)
 
void register_transitive_inferred_ranges (basic_block bb)
 
range_queryconst_query ()
 
virtual tree value_of_expr (tree expr, gimple *=NULL)
 
virtual tree value_on_edge (edge, tree expr)
 
virtual tree value_of_stmt (gimple *, tree name=NULL)
 
virtual tree value_on_entry (basic_block, tree expr)
 
virtual tree value_on_exit (basic_block, tree expr)
 
class relation_oraclerelation () const
 
void create_relation_oracle (bool do_trans_p=true)
 
void destroy_relation_oracle ()
 
class infer_range_oracleinfer_oracle () const
 
void create_infer_oracle (bool do_search=TRUE)
 
void destroy_infer_oracle ()
 
class gimple_outgoing_rangegori () const
 
class gori_mapgori_ssa () const
 
void create_gori (int not_executable_flag=0, int sw_max_edges=INT_MAX)
 
void destroy_gori ()
 

Data Fields

auto_edge_flag non_executable_edge_flag
 

Protected Member Functions

bool fold_range_internal (vrange &r, gimple *s, tree name)
 
void prefill_name (vrange &r, tree name)
 
void prefill_stmt_dependencies (tree ssa)
 
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)
 
void share_query (range_query &q)
 

Protected Attributes

ranger_cache m_cache
 
range_tracer tracer
 
basic_block current_bb
 
vec< treem_stmt_list
 
relation_oraclem_relation
 
infer_range_oraclem_infer
 
gimple_outgoing_rangem_gori
 
gori_mapm_map
 
bool m_shared_copy_p
 

Friends

class path_range_query
 

Detailed Description

Header file for the GIMPLE range interface.
   Copyright (C) 2019-2024 Free Software Foundation, Inc.
   Contributed by Andrew MacLeod <amacleod@redhat.com>
   and Aldy Hernandez <aldyh@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/>.   

Constructor & Destructor Documentation

◆ gimple_ranger()

gimple_ranger::gimple_ranger ( bool use_imm_uses = true)
Code for GIMPLE range related routines.
   Copyright (C) 2019-2024 Free Software Foundation, Inc.
   Contributed by Andrew MacLeod <amacleod@redhat.com>
   and Aldy Hernandez <aldyh@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/>.   

References cfun, dump_file, range_tracer::enable_trace(), FOR_ALL_BB_FN, FOR_EACH_EDGE, gcc_checking_assert, m_cache, m_stmt_list, non_executable_edge_flag, num_ssa_names, RANGER_DEBUG_TRACE, range_query::share_query(), basic_block_def::succs, and tracer.

◆ ~gimple_ranger()

gimple_ranger::~gimple_ranger ( )

References m_stmt_list.

Member Function Documentation

◆ const_query()

range_query & gimple_ranger::const_query ( )

References ranger_cache::const_query(), and m_cache.

Referenced by execute_ranger_vrp().

◆ create_gori()

void range_query::create_gori ( int not_executable_flag = 0,
int sw_max_edges = INT_MAX )
inherited

◆ create_infer_oracle()

void range_query::create_infer_oracle ( bool do_search = TRUE)
inherited

◆ create_relation_oracle()

void range_query::create_relation_oracle ( bool do_trans_p = true)
inherited

◆ debug()

void gimple_ranger::debug ( )

References dump().

◆ destroy_gori()

void range_query::destroy_gori ( )
inherited

◆ destroy_infer_oracle()

void range_query::destroy_infer_oracle ( )
inherited

◆ destroy_relation_oracle()

void range_query::destroy_relation_oracle ( )
inherited

◆ dump()

void gimple_ranger::dump ( FILE * f)
overridevirtual

Reimplemented from range_query.

References cfun, ranger_cache::dump(), dump_bb(), FOR_EACH_BB_FN, and m_cache.

Referenced by debug(), dump_ranger(), and execute_ranger_vrp().

◆ dump_bb()

◆ export_global_ranges()

◆ fold_range_internal()

bool gimple_ranger::fold_range_internal ( vrange & r,
gimple * s,
tree name )
protected

◆ fold_stmt()

bool gimple_ranger::fold_stmt ( gimple_stmt_iterator * gsi,
tree(* valueize )(tree) )

◆ get_arith_expr_range()

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

◆ get_tree_range()

◆ gori()

◆ gori_ssa()

◆ infer_oracle()

◆ invoke_range_of_expr()

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

◆ prefill_name()

void gimple_ranger::prefill_name ( vrange & r,
tree name )
inlineprotected

◆ prefill_stmt_dependencies()

◆ range_of_expr()

◆ range_of_stmt()

◆ range_on_edge()

bool gimple_ranger::range_on_edge ( vrange & r,
edge ,
tree expr )
overridevirtual
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 from range_query.

References dump_file, gcc_checking_assert, range_query::get_tree_range(), gimple_range_ssa_p(), range_tracer::header(), range_query::infer_oracle(), m_cache, infer_range_oracle::maybe_adjust_range(), non_executable_edge_flag, NULL, print_generic_expr(), r, range_compatible_p(), ranger_cache::range_on_edge(), range_on_exit(), TDF_SLIM, tracer, range_tracer::trailer(), and TREE_TYPE.

Referenced by dom_opt_dom_walker::set_global_ranges_from_unreachable_edges(), and path_range_query::ssa_range_in_phi().

◆ range_on_entry()

◆ range_on_exit()

◆ register_inferred_ranges()

◆ register_transitive_inferred_ranges()

◆ relation()

◆ share_query()

◆ value_of_expr()

◆ value_of_stmt()

◆ 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

Friends And Related Symbol Documentation

◆ path_range_query

friend class path_range_query
friend

Field Documentation

◆ current_bb

basic_block gimple_ranger::current_bb
protected

Referenced by fold_stmt(), and range_of_expr().

◆ m_cache

◆ m_gori

◆ m_infer

◆ m_map

◆ m_relation

◆ m_shared_copy_p

bool range_query::m_shared_copy_p
protectedinherited

◆ m_stmt_list

vec<tree> gimple_ranger::m_stmt_list
protected

◆ non_executable_edge_flag

auto_edge_flag gimple_ranger::non_executable_edge_flag

Referenced by gimple_ranger(), and range_on_edge().

◆ tracer


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