GCC Middle and Back End API Reference
range_def_chain Class Reference

#include <gimple-range-gori.h>

Inheritance diagram for range_def_chain:
Collaboration diagram for range_def_chain:

Data Structures

struct  rdc

Public Member Functions

 range_def_chain ()
 ~range_def_chain ()
tree depend1 (tree name) const
tree depend2 (tree name) const
bool in_chain_p (tree name, tree def)
bool chain_import_p (tree name, tree import)
void register_dependency (tree name, tree ssa1, basic_block bb=NULL)
void dump (FILE *f, basic_block bb, const char *prefix=NULL)

Protected Member Functions

bool has_def_chain (tree name)
bool def_chain_in_bitmap_p (tree name, bitmap b)
void add_def_chain_to_bitmap (bitmap b, tree name)
bitmap get_def_chain (tree name)
bitmap get_imports (tree name)

Protected Attributes

bitmap_obstack m_bitmaps

Private Member Functions

void set_import (struct rdc &data, tree imp, bitmap b)

Private Attributes

vec< rdcm_def_chain
int m_logical_depth

Detailed Description

Header file for gimple range GORI structures.
   Copyright (C) 2017-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

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
 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

Constructor & Destructor Documentation

◆ range_def_chain()

range_def_chain::range_def_chain ( )
RANGE_DEF_CHAIN is used to determine which SSA names in a block can
have range information calculated for them, and what the
dependencies on each other are.

Information for a basic block is calculated once and stored.  It is
only calculated the first time a query is made, so if no queries
are made, there is little overhead.

The def_chain bitmap is indexed by SSA_NAME_VERSION.  Bits are set
within this bitmap to indicate SSA names that are defined in the
SAME block and used to calculate this SSA name.

 <bb 2> :
   _1 = x_4(D) + -2;
   _2 = _1 * 4;
   j_7 = foo ();
   q_5 = _2 + 3;
   if (q_5 <= 13)

 _1  : x_4(D)
 _2  : 1  x_4(D)
 q_5  : _1  _2  x_4(D)

 This dump indicates the bits set in the def_chain vector.
 as well as demonstrates the def_chain bits for the related ssa_names.

 Checking the chain for _2 indicates that _1 and x_4 are used in
 its evaluation.

 Def chains also only include statements which are valid gimple
 so a def chain will only span statements for which the range
 engine implements operations for.   

References bitmap_obstack_initialize(), m_bitmaps, m_def_chain, m_logical_depth, and num_ssa_names.

◆ ~range_def_chain()

range_def_chain::~range_def_chain ( )

Member Function Documentation

◆ add_def_chain_to_bitmap()

void range_def_chain::add_def_chain_to_bitmap ( bitmap b,
tree name )

References b, bitmap_ior_into(), get_def_chain(), and r.

Referenced by gori_map::maybe_add_gori().

◆ chain_import_p()

bool range_def_chain::chain_import_p ( tree name,
tree import )

◆ def_chain_in_bitmap_p()

bool range_def_chain::def_chain_in_bitmap_p ( tree name,
bitmap b )

◆ depend1()

tree range_def_chain::depend1 ( tree name) const

◆ depend2()

tree range_def_chain::depend2 ( tree name) const

◆ dump()

◆ get_def_chain()

◆ get_imports()

bitmap range_def_chain::get_imports ( tree name)

◆ has_def_chain()

bool range_def_chain::has_def_chain ( tree name)

◆ in_chain_p()

◆ register_dependency()

◆ set_import()

void range_def_chain::set_import ( struct rdc & data,
tree imp,
bitmap b )

Field Documentation

◆ m_bitmaps

◆ m_def_chain

◆ m_logical_depth

int range_def_chain::m_logical_depth

Referenced by get_def_chain(), and range_def_chain().

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