GCC Middle and Back End API Reference
path_range_query Class Reference

#include <gimple-range-path.h>

Inheritance diagram for path_range_query:
Collaboration diagram for path_range_query:

Public Member Functions

 path_range_query (class gimple_ranger &ranger, const vec< basic_block > &path, const bitmap_head *dependencies=NULL, bool resolve=true)
 
 path_range_query (gimple_ranger &ranger, bool resolve=true)
 
virtual ~path_range_query ()
 
void reset_path (const vec< basic_block > &, const bitmap_head *dependencies)
 
bool range_of_expr (vrange &r, tree name, gimple *=NULL) override
 
bool range_of_stmt (vrange &r, gimple *, tree name=NULL) override
 
bool unreachable_path_p ()
 
void dump (FILE *) override
 
void debug ()
 
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_on_edge (vrange &r, edge, tree expr)
 
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 (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 ()
 

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
 

Private Member Functions

bool internal_range_of_expr (vrange &r, tree name, gimple *)
 
void compute_ranges (const bitmap_head *dependencies)
 
void compute_exit_dependencies (bitmap_head *dependencies)
 
bool defined_outside_path (tree name)
 
void range_on_path_entry (vrange &r, tree name)
 
path_oracleget_path_oracle ()
 
bool get_cache (vrange &r, tree name)
 
bool range_defined_in_block (vrange &, tree name, basic_block bb)
 
void compute_ranges_in_block (basic_block bb)
 
void compute_ranges_in_phis (basic_block bb)
 
void adjust_for_non_null_uses (basic_block bb)
 
void ssa_range_in_phi (vrange &r, gphi *phi)
 
void compute_outgoing_relations (basic_block bb, basic_block next)
 
void compute_phi_relations (basic_block bb, basic_block prev)
 
void maybe_register_phi_relation (gphi *, edge e)
 
bool add_to_exit_dependencies (tree name, bitmap dependencies)
 
bool exit_dependency_p (tree name)
 
bool ssa_defined_in_bb (tree name, basic_block bb)
 
bool relations_may_be_invalidated (edge)
 
basic_block entry_bb ()
 
basic_block exit_bb ()
 
basic_block curr_bb ()
 
basic_block prev_bb ()
 
basic_block next_bb ()
 
bool at_entry ()
 
bool at_exit ()
 
void move_next ()
 

Private Attributes

ssa_lazy_cache m_cache
 
auto_vec< basic_blockm_path
 
auto_bitmap m_exit_dependencies
 
gimple_rangerm_ranger
 
unsigned m_pos
 
bool m_resolve
 
bool m_undefined_path
 

Detailed Description

Header file for jump threading path solver.
   Copyright (C) 2021-2024 Free Software Foundation, Inc.
   Contributed by 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

◆ path_range_query() [1/2]

path_range_query::path_range_query ( class gimple_ranger & ranger,
const vec< basic_block > & path,
const bitmap_head * dependencies = NULL,
bool resolve = true )

◆ path_range_query() [2/2]

path_range_query::path_range_query ( gimple_ranger & ranger,
bool resolve = true )

◆ ~path_range_query()

path_range_query::~path_range_query ( )
virtual

References range_query::m_relation, and NULL.

Member Function Documentation

◆ add_to_exit_dependencies()

bool path_range_query::add_to_exit_dependencies ( tree name,
bitmap dependencies )
private

◆ adjust_for_non_null_uses()

void path_range_query::adjust_for_non_null_uses ( basic_block bb)
private

◆ at_entry()

bool path_range_query::at_entry ( )
inlineprivate

References m_path, and m_pos.

Referenced by compute_ranges_in_block(), and ssa_range_in_phi().

◆ at_exit()

bool path_range_query::at_exit ( )
inlineprivate

References m_pos.

Referenced by compute_ranges(), and compute_ranges_in_block().

◆ compute_exit_dependencies()

◆ compute_outgoing_relations()

void path_range_query::compute_outgoing_relations ( basic_block bb,
basic_block next )
private

◆ compute_phi_relations()

◆ compute_ranges()

◆ compute_ranges_in_block()

◆ compute_ranges_in_phis()

◆ 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

◆ curr_bb()

basic_block path_range_query::curr_bb ( )
inlineprivate

References m_path, and m_pos.

Referenced by compute_ranges().

◆ debug()

void path_range_query::debug ( )

References dump().

◆ defined_outside_path()

bool path_range_query::defined_outside_path ( tree name)
private

◆ 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 path_range_query::dump ( FILE * dump_file)
overridevirtual

◆ entry_bb()

basic_block path_range_query::entry_bb ( )
inlineprivate

◆ exit_bb()

basic_block path_range_query::exit_bb ( )
inlineprivate

References m_path.

◆ exit_dependency_p()

bool path_range_query::exit_dependency_p ( tree name)
private

◆ get_arith_expr_range()

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

◆ get_cache()

◆ get_path_oracle()

path_oracle * path_range_query::get_path_oracle ( )
inlineprivate

◆ get_tree_range()

◆ gori()

◆ gori_ssa()

◆ infer_oracle()

◆ internal_range_of_expr()

◆ invoke_range_of_expr()

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

◆ maybe_register_phi_relation()

◆ move_next()

void path_range_query::move_next ( )
inlineprivate

References m_pos.

Referenced by compute_ranges().

◆ next_bb()

basic_block path_range_query::next_bb ( )
inlineprivate

References m_path, and m_pos.

Referenced by compute_ranges_in_block().

◆ prev_bb()

basic_block path_range_query::prev_bb ( )
inlineprivate

References m_path, and m_pos.

Referenced by compute_ranges_in_block(), and ssa_range_in_phi().

◆ range_defined_in_block()

◆ range_of_expr()

◆ range_of_stmt()

◆ 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 dom_ranger, gimple_ranger, and ranger_cache.

References r, and range_query::range_of_expr().

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

◆ range_on_entry()

◆ range_on_exit()

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

◆ range_on_path_entry()

void path_range_query::range_on_path_entry ( vrange & r,
tree name )
private

◆ relation()

◆ relations_may_be_invalidated()

bool path_range_query::relations_may_be_invalidated ( edge e)
private

◆ reset_path()

void path_range_query::reset_path ( const vec< basic_block > & path,
const bitmap_head * dependencies )

◆ share_query()

◆ ssa_defined_in_bb()

bool path_range_query::ssa_defined_in_bb ( tree name,
basic_block bb )
private

◆ ssa_range_in_phi()

◆ unreachable_path_p()

bool path_range_query::unreachable_path_p ( )

◆ 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

Field Documentation

◆ m_cache

◆ m_exit_dependencies

auto_bitmap path_range_query::m_exit_dependencies
private

◆ m_gori

◆ m_infer

◆ m_map

◆ m_path

◆ m_pos

unsigned path_range_query::m_pos
private

◆ m_ranger

◆ m_relation

◆ m_resolve

◆ m_shared_copy_p

bool range_query::m_shared_copy_p
protectedinherited

◆ m_undefined_path

bool path_range_query::m_undefined_path
private

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