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 bool range_on_edge (vrange &r, edge, 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
 

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
 

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

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

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

◆ compute_phi_relations()

◆ compute_ranges()

◆ compute_ranges_in_block()

◆ compute_ranges_in_phis()

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

◆ defined_outside_path()

bool path_range_query::defined_outside_path ( tree name)
private

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

◆ internal_range_of_expr()

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

◆ oracle()

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

◆ query_relation() [1/2]

◆ query_relation() [2/2]

◆ range_defined_in_block()

◆ range_of_expr()

◆ range_of_stmt()

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

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

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

◆ relations_may_be_invalidated()

bool path_range_query::relations_may_be_invalidated ( edge e)
private

◆ reset_path()

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

References m_undefined_path.

◆ value_of_expr()

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

◆ value_of_stmt()

◆ value_on_edge()

Field Documentation

◆ m_cache

◆ m_exit_dependencies

auto_bitmap path_range_query::m_exit_dependencies
private

◆ m_oracle

◆ m_path

◆ m_pos

unsigned path_range_query::m_pos
private

◆ m_ranger

◆ m_resolve

◆ m_undefined_path

bool path_range_query::m_undefined_path
private

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