GCC Middle and Back End API Reference
irange_bitmask Class Reference

#include <value-range.h>

Collaboration diagram for irange_bitmask:

Public Member Functions

 irange_bitmask ()
 irange_bitmask (unsigned prec)
 irange_bitmask (const wide_int &value, const wide_int &mask)
 irange_bitmask (tree type, const wide_int &min, const wide_int &max)
wide_int value () const
wide_int mask () const
void set_unknown (unsigned prec)
bool unknown_p () const
unsigned get_precision () const
void union_ (const irange_bitmask &src)
void intersect (const irange_bitmask &src)
bool operator== (const irange_bitmask &src) const
bool operator!= (const irange_bitmask &src) const
void verify_mask () const
void dump (FILE *) const
bool member_p (const wide_int &val) const
wide_int get_nonzero_bits () const
void set_nonzero_bits (const wide_int &bits)

Private Attributes

wide_int m_value
wide_int m_mask

Constructor & Destructor Documentation

◆ irange_bitmask() [1/4]

irange_bitmask::irange_bitmask ( )
inline

◆ irange_bitmask() [2/4]

irange_bitmask::irange_bitmask ( unsigned prec)
inline

References set_unknown().

◆ irange_bitmask() [3/4]

irange_bitmask::irange_bitmask ( const wide_int & value,
const wide_int & mask )
inline

References m_mask, m_value, mask(), value(), and verify_mask().

◆ irange_bitmask() [4/4]

irange_bitmask::irange_bitmask ( tree type,
const wide_int & min,
const wide_int & max )
Support routines for value ranges. Copyright (C) 2019-2025 Free Software Foundation, Inc. Major hacks 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/>.

References wi::clz(), m_mask, m_value, wi::mask(), TYPE_PRECISION, and wi::zero().

Member Function Documentation

◆ dump()

void irange_bitmask::dump ( FILE * file) const

References WIDE_INT_PRINT_BUFFER_SIZE.

Referenced by debug().

◆ get_nonzero_bits()

wide_int irange_bitmask::get_nonzero_bits ( ) const
inline

References m_mask, and m_value.

Referenced by cfn_popcount::fold_range().

◆ get_precision()

unsigned irange_bitmask::get_precision ( ) const
inline

References m_mask.

◆ intersect()

◆ mask()

◆ member_p()

◆ operator!=()

bool irange_bitmask::operator!= ( const irange_bitmask & src) const
inline

References irange_bitmask().

◆ operator==()

bool irange_bitmask::operator== ( const irange_bitmask & src) const
inline

◆ set_nonzero_bits()

void irange_bitmask::set_nonzero_bits ( const wide_int & bits)
inline

◆ set_unknown()

void irange_bitmask::set_unknown ( unsigned prec)
inline

◆ union_()

void irange_bitmask::union_ ( const irange_bitmask & src)
inline

◆ unknown_p()

◆ value()

◆ verify_mask()

void irange_bitmask::verify_mask ( ) const

Field Documentation

◆ m_mask

◆ m_value


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