GCC Middle and Back End API Reference
range_query Class Referenceabstract

#include <value-query.h>

Inheritance diagram for range_query:
Collaboration diagram for range_query:

Public Member Functions

 range_query ()
 
virtual ~range_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)
 
virtual bool range_of_expr (vrange &r, tree expr, gimple *=NULL)=0
 
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)
 
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 (range_query *q=NULL, 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 ()
 
virtual void dump (FILE *)
 

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)
 
void share_query (range_query &q)
 

Protected Attributes

relation_oraclem_relation
 
infer_range_oraclem_infer
 
gimple_outgoing_rangem_gori
 
gori_mapm_map
 
bool m_shared_copy_p
 

Detailed Description

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/>.   

Constructor & Destructor Documentation

◆ range_query()

◆ ~range_query()

range_query::~range_query ( )
virtual

Member Function Documentation

◆ create_gori()

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

◆ create_infer_oracle()

void range_query::create_infer_oracle ( range_query * q = NULL,
bool do_search = true )

◆ create_relation_oracle()

void range_query::create_relation_oracle ( bool do_trans_p = true)

◆ destroy_gori()

void range_query::destroy_gori ( )

References default_gori, m_gori, m_map, and NULL.

Referenced by ~range_query().

◆ destroy_infer_oracle()

void range_query::destroy_infer_oracle ( )

◆ destroy_relation_oracle()

void range_query::destroy_relation_oracle ( )

◆ dump()

void range_query::dump ( FILE * )
virtual

◆ get_arith_expr_range()

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

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

◆ range_of_expr()

virtual bool range_query::range_of_expr ( vrange & r,
tree expr,
gimple * = NULL )
pure virtual

Implemented in dom_ranger, gimple_ranger, global_range_query, path_range_query, ranger_cache, ssa_cache, and substitute_and_fold_engine.

Referenced by infer_range_manager::add_ranges(), check_for_binary_op_overflow(), compare_nonzero_chars(), strlen_pass::count_nonzero_bytes_addr(), cprop_operand(), determine_block_size(), dump_ssaname_info(), dump_strlen_info(), expand_builtin_strnlen(), simplify_using_ranges::fold_cond_with_ops(), path_range_query::get_cache(), fur_list::get_operand(), fur_source::get_operand(), fur_stmt::get_operand(), get_range(), get_range_strlen_dynamic(), get_ref_base_and_extent(), get_size_range(), array_bounds_checker::get_value_range(), handle_printf_call(), invoke_range_of_expr(), simplify_using_ranges::legacy_fold_cond(), simplify_using_ranges::legacy_fold_cond_overflow(), simplify_using_ranges::op_with_boolean_value_range_p(), range_of_stmt(), range_of_var_in_loop(), range_on_edge(), range_on_entry(), range_on_exit(), remove_unreachable::remove_and_update_globals(), simplify_using_ranges::simplify(), simplify_using_ranges::simplify_bit_ops_using_ranges(), simplify_using_ranges::simplify_casted_compare(), simplify_using_ranges::simplify_compare_using_ranges_1(), simplify_using_ranges::simplify_div_or_mod_using_ranges(), simplify_using_ranges::simplify_float_conversion_using_ranges(), simplify_rotate(), simplify_using_ranges::simplify_switch_using_ranges(), split_at_bb_p(), simplify_using_ranges::two_valued_val_range_p(), value_of_expr(), and value_on_edge().

◆ range_of_stmt()

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

◆ range_on_edge()

bool range_query::range_on_edge ( vrange & r,
edge ,
tree expr )
virtual
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 dom_ranger, gimple_ranger, and ranger_cache.

References r, and range_of_expr().

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

◆ range_on_entry()

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

◆ range_on_exit()

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

Reimplemented in gimple_ranger.

References r, and range_of_expr().

Referenced by invoke_range_of_expr(), and value_on_exit().

◆ relation()

◆ share_query()

◆ value_of_expr()

tree range_query::value_of_expr ( tree expr,
gimple * stmt = NULL )
virtual

◆ value_of_stmt()

◆ value_on_edge()

◆ value_on_entry()

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

◆ value_on_exit()

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

Field Documentation

◆ m_gori

gimple_outgoing_range* range_query::m_gori
protected

◆ m_infer

◆ m_map

gori_map* range_query::m_map
protected

◆ m_relation

◆ m_shared_copy_p

bool range_query::m_shared_copy_p
protected

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