LLVM  10.0.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::IntegerRangeState Struct Reference

State for an integer range. More...

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

Inheritance diagram for llvm::IntegerRangeState:
[legend]
Collaboration diagram for llvm::IntegerRangeState:
[legend]

Public Member Functions

 IntegerRangeState (uint32_t BitWidth)
 
uint32_t getBitWidth () const
 Return associated values' bit width. More...
 
bool isValidState () const override
 See AbstractState::isValidState() More...
 
bool isAtFixpoint () const override
 See AbstractState::isAtFixpoint() More...
 
ChangeStatus indicateOptimisticFixpoint () override
 See AbstractState::indicateOptimisticFixpoint(...) More...
 
ChangeStatus indicatePessimisticFixpoint () override
 See AbstractState::indicatePessimisticFixpoint(...) More...
 
ConstantRange getKnown () const
 Return the known state encoding. More...
 
ConstantRange getAssumed () const
 Return the assumed state encoding. More...
 
void unionAssumed (const ConstantRange &R)
 Unite assumed range with the passed state. More...
 
void unionAssumed (const IntegerRangeState &R)
 See IntegerRangeState::unionAssumed(..). More...
 
void unionKnown (const ConstantRange &R)
 Unite known range with the passed state. More...
 
void unionKnown (const IntegerRangeState &R)
 See IntegerRangeState::unionKnown(..). More...
 
void intersectKnown (const ConstantRange &R)
 Intersect known range with the passed state. More...
 
void intersectKnown (const IntegerRangeState &R)
 See IntegerRangeState::intersectKnown(..). More...
 
bool operator== (const IntegerRangeState &R) const
 Equality for IntegerRangeState. More...
 
IntegerRangeState operator^= (const IntegerRangeState &R)
 "Clamp" this state with R. More...
 
IntegerRangeState operator &= (const IntegerRangeState &R)
 
- Public Member Functions inherited from llvm::AbstractState
virtual ~AbstractState ()
 

Static Public Member Functions

static ConstantRange getWorstState (uint32_t BitWidth)
 Return the worst possible representable state. More...
 
static ConstantRange getBestState (uint32_t BitWidth)
 Return the best possible representable state. More...
 

Public Attributes

uint32_t BitWidth
 Bitwidth of the associated value. More...
 
ConstantRange Assumed
 State representing assumed range, initially set to empty. More...
 
ConstantRange Known
 State representing known range, initially set to [-inf, inf]. More...
 

Detailed Description

State for an integer range.

Definition at line 1508 of file Attributor.h.

Constructor & Destructor Documentation

◆ IntegerRangeState()

llvm::IntegerRangeState::IntegerRangeState ( uint32_t  BitWidth)
inline

Definition at line 1519 of file Attributor.h.

Member Function Documentation

◆ getAssumed()

ConstantRange llvm::IntegerRangeState::getAssumed ( ) const
inline

Return the assumed state encoding.

Definition at line 1560 of file Attributor.h.

Referenced by llvm::operator<<(), operator==(), and unionAssumed().

◆ getBestState()

static ConstantRange llvm::IntegerRangeState::getBestState ( uint32_t  BitWidth)
inlinestatic

Return the best possible representable state.

Definition at line 1529 of file Attributor.h.

◆ getBitWidth()

uint32_t llvm::IntegerRangeState::getBitWidth ( ) const
inline

Return associated values' bit width.

Definition at line 1534 of file Attributor.h.

Referenced by llvm::operator<<().

◆ getKnown()

ConstantRange llvm::IntegerRangeState::getKnown ( ) const
inline

Return the known state encoding.

Definition at line 1557 of file Attributor.h.

Referenced by intersectKnown(), llvm::operator<<(), operator==(), and unionKnown().

◆ getWorstState()

static ConstantRange llvm::IntegerRangeState::getWorstState ( uint32_t  BitWidth)
inlinestatic

Return the worst possible representable state.

Definition at line 1524 of file Attributor.h.

◆ indicateOptimisticFixpoint()

ChangeStatus llvm::IntegerRangeState::indicateOptimisticFixpoint ( )
inlineoverridevirtual

See AbstractState::indicateOptimisticFixpoint(...)

Implements llvm::AbstractState.

Definition at line 1545 of file Attributor.h.

References llvm::CHANGED.

◆ indicatePessimisticFixpoint()

ChangeStatus llvm::IntegerRangeState::indicatePessimisticFixpoint ( )
inlineoverridevirtual

See AbstractState::indicatePessimisticFixpoint(...)

Implements llvm::AbstractState.

Definition at line 1551 of file Attributor.h.

References llvm::CHANGED.

◆ intersectKnown() [1/2]

void llvm::IntegerRangeState::intersectKnown ( const ConstantRange &  R)
inline

Intersect known range with the passed state.

Definition at line 1584 of file Attributor.h.

References llvm::ConstantRange::intersectWith().

◆ intersectKnown() [2/2]

void llvm::IntegerRangeState::intersectKnown ( const IntegerRangeState &  R)
inline

See IntegerRangeState::intersectKnown(..).

Definition at line 1590 of file Attributor.h.

References getKnown().

◆ isAtFixpoint()

bool llvm::IntegerRangeState::isAtFixpoint ( ) const
inlineoverridevirtual

See AbstractState::isAtFixpoint()

Implements llvm::AbstractState.

Definition at line 1542 of file Attributor.h.

◆ isValidState()

bool llvm::IntegerRangeState::isValidState ( ) const
inlineoverridevirtual

◆ operator &=()

IntegerRangeState llvm::IntegerRangeState::operator&= ( const IntegerRangeState &  R)
inline

Definition at line 1609 of file Attributor.h.

◆ operator==()

bool llvm::IntegerRangeState::operator== ( const IntegerRangeState &  R) const
inline

Equality for IntegerRangeState.

Definition at line 1595 of file Attributor.h.

References getAssumed(), and getKnown().

◆ operator^=()

IntegerRangeState llvm::IntegerRangeState::operator^= ( const IntegerRangeState &  R)
inline

"Clamp" this state with R.

The result is subtype dependent but it is intended that only information assumed in both states will be assumed in this one afterwards.

Definition at line 1602 of file Attributor.h.

◆ unionAssumed() [1/2]

void llvm::IntegerRangeState::unionAssumed ( const ConstantRange &  R)
inline

◆ unionAssumed() [2/2]

void llvm::IntegerRangeState::unionAssumed ( const IntegerRangeState &  R)
inline

See IntegerRangeState::unionAssumed(..).

Definition at line 1569 of file Attributor.h.

References getAssumed().

◆ unionKnown() [1/2]

void llvm::IntegerRangeState::unionKnown ( const ConstantRange &  R)
inline

Unite known range with the passed state.

Definition at line 1574 of file Attributor.h.

References llvm::ConstantRange::unionWith().

◆ unionKnown() [2/2]

void llvm::IntegerRangeState::unionKnown ( const IntegerRangeState &  R)
inline

See IntegerRangeState::unionKnown(..).

Definition at line 1581 of file Attributor.h.

References getKnown(), and unionKnown().

Referenced by unionKnown().

Member Data Documentation

◆ Assumed

ConstantRange llvm::IntegerRangeState::Assumed

State representing assumed range, initially set to empty.

Definition at line 1514 of file Attributor.h.

◆ BitWidth

uint32_t llvm::IntegerRangeState::BitWidth

Bitwidth of the associated value.

Definition at line 1511 of file Attributor.h.

◆ Known

ConstantRange llvm::IntegerRangeState::Known

State representing known range, initially set to [-inf, inf].

Definition at line 1517 of file Attributor.h.


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