LLVM 24.0.0git
llvm::AAPointerInfo::RangeList Struct Reference

A container for a list of ranges. More...

#include "llvm/Transforms/IPO/Attributor.h"

Public Types

using RangeTy = AA::RangeTy
using VecTy = SmallVector<RangeTy>
using iterator = VecTy::iterator
using const_iterator = VecTy::const_iterator
using value_type = RangeTy

Public Member Functions

 RangeList (const RangeTy &R)
 RangeList (ArrayRef< int64_t > Offsets, int64_t Size)
 RangeList ()=default
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
void push_back (const RangeTy &R)
unsigned size () const
bool operator== (const RangeList &OI) const
bool merge (const RangeList &RHS)
 Merge the ranges in RHS into the current ranges.
std::pair< iterator, bool > insert (iterator Pos, const RangeTy &R)
 Insert R at the given iterator Pos, and merge if necessary.
void addToAllOffsets (int64_t Inc)
 Add the increment Inc to the offset of every range.
bool isUnknown () const
 Return true iff the list contains an unknown range.
iterator setUnknown ()
 Discard all ranges and insert a single unknown range.
bool isUnassigned () const
 Return true if no ranges have been inserted.

Static Public Member Functions

static void set_difference (const RangeList &L, const RangeList &R, RangeList &D)
 Copy ranges from L that are not in R, into D.

Public Attributes

VecTy Ranges

Detailed Description

A container for a list of ranges.

Definition at line 5779 of file Attributor.h.

Member Typedef Documentation

◆ const_iterator

◆ iterator

◆ RangeTy

◆ value_type

◆ VecTy

Constructor & Destructor Documentation

◆ RangeList() [1/3]

llvm::AAPointerInfo::RangeList::RangeList ( const RangeTy & R)
inline

Definition at line 5790 of file Attributor.h.

References Ranges.

Referenced by merge(), operator==(), and set_difference().

◆ RangeList() [2/3]

llvm::AAPointerInfo::RangeList::RangeList ( ArrayRef< int64_t > Offsets,
int64_t Size )
inline

Definition at line 5791 of file Attributor.h.

References assert(), Ranges, and Size.

◆ RangeList() [3/3]

llvm::AAPointerInfo::RangeList::RangeList ( )
default

Member Function Documentation

◆ addToAllOffsets()

void llvm::AAPointerInfo::RangeList::addToAllOffsets ( int64_t Inc)
inline

Add the increment Inc to the offset of every range.

Definition at line 5879 of file Attributor.h.

References assert(), isUnassigned(), isUnknown(), and Ranges.

◆ begin() [1/2]

iterator llvm::AAPointerInfo::RangeList::begin ( )
inline

Definition at line 5801 of file Attributor.h.

References Ranges.

◆ begin() [2/2]

const_iterator llvm::AAPointerInfo::RangeList::begin ( ) const
inline

Definition at line 5803 of file Attributor.h.

References Ranges.

◆ end() [1/2]

iterator llvm::AAPointerInfo::RangeList::end ( )
inline

Definition at line 5802 of file Attributor.h.

References Ranges.

◆ end() [2/2]

const_iterator llvm::AAPointerInfo::RangeList::end ( ) const
inline

Definition at line 5804 of file Attributor.h.

References Ranges.

◆ insert()

std::pair< iterator, bool > llvm::AAPointerInfo::RangeList::insert ( iterator Pos,
const RangeTy & R )
inline

Insert R at the given iterator Pos, and merge if necessary.

This assumes that all ranges before Pos are LessThan R, and then maintains the sorted order for the suffix list.

Returns
The place of insertion and true iff anything changed.

Definition at line 5860 of file Attributor.h.

References Changed, isUnknown(), llvm::AA::RangeTy::LessThan(), Ranges, and setUnknown().

Referenced by merge().

◆ isUnassigned()

bool llvm::AAPointerInfo::RangeList::isUnassigned ( ) const
inline

Return true if no ranges have been inserted.

Definition at line 5908 of file Attributor.h.

References Ranges.

Referenced by addToAllOffsets(), and isUnknown().

◆ isUnknown()

bool llvm::AAPointerInfo::RangeList::isUnknown ( ) const
inline

Return true iff the list contains an unknown range.

Definition at line 5890 of file Attributor.h.

References assert(), isUnassigned(), and Ranges.

Referenced by addToAllOffsets(), insert(), and merge().

◆ merge()

bool llvm::AAPointerInfo::RangeList::merge ( const RangeList & RHS)
inline

Merge the ranges in RHS into the current ranges.

  • Merging a list of unknown ranges makes the current list unknown.
  • Ranges with the same offset are merged according to RangeTy::operator&
    Returns
    true if the current RangeList changed.

Definition at line 5829 of file Attributor.h.

References Changed, insert(), isUnknown(), RangeList(), Ranges, RHS, and setUnknown().

◆ operator==()

bool llvm::AAPointerInfo::RangeList::operator== ( const RangeList & OI) const
inline

Definition at line 5823 of file Attributor.h.

References RangeList(), and Ranges.

◆ push_back()

void llvm::AAPointerInfo::RangeList::push_back ( const RangeTy & R)
inline

Definition at line 5808 of file Attributor.h.

References assert(), llvm::AA::RangeTy::LessThan(), and Ranges.

◆ set_difference()

void llvm::AAPointerInfo::RangeList::set_difference ( const RangeList & L,
const RangeList & R,
RangeList & D )
inlinestatic

Copy ranges from L that are not in R, into D.

Definition at line 5815 of file Attributor.h.

References D(), llvm::AA::RangeTy::LessThan(), and RangeList().

Referenced by llvm::AA::PointerInfo::State::addAccess().

◆ setUnknown()

iterator llvm::AAPointerInfo::RangeList::setUnknown ( )
inline

Discard all ranges and insert a single unknown range.

Definition at line 5901 of file Attributor.h.

References llvm::AA::RangeTy::getUnknown(), and Ranges.

Referenced by insert(), and merge().

◆ size()

unsigned llvm::AAPointerInfo::RangeList::size ( ) const
inline

Definition at line 5821 of file Attributor.h.

References Ranges.

Member Data Documentation

◆ Ranges

VecTy llvm::AAPointerInfo::RangeList::Ranges

The documentation for this struct was generated from the following file: