struct AAValueConstantRange

Declaration

struct AAValueConstantRange : public IntegerRangeState,
                              public AbstractAttribute,
                              public IRPosition { /* full declaration omitted */ };

Description

An abstract interface for range value analysis.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2447

Inherits from: IntegerRangeState, AbstractAttribute, IRPosition

Member Variables

public static const char ID
Unique ID (due to the unique address)

Inherited from IRPosition:

protected AnchorVal
protected KindOrArgNo
public static EmptyKey
public static TombstoneKey

Inherited from IntegerRangeState:

public BitWidth
public Assumed
public Known

Method Overview

  • public AAValueConstantRange(const llvm::IRPosition & IRP)
  • public static llvm::AAValueConstantRange & createForPosition(const llvm::IRPosition & IRP, llvm::Attributor & A)
  • public Optional<llvm::ConstantInt *> getAssumedConstantInt(llvm::Attributor & A, const llvm::Instruction * CtxI = nullptr) const
  • public virtual llvm::ConstantRange getAssumedConstantRange(llvm::Attributor & A, const llvm::Instruction * CtxI = nullptr) const
  • public const llvm::IRPosition & getIRPosition() const
  • public virtual llvm::ConstantRange getKnownConstantRange(llvm::Attributor & A, const llvm::Instruction * CtxI = nullptr) const
  • public llvm::IntegerRangeState & getState()
  • public const llvm::AbstractState & getState() const

Inherited from IRPosition:

Inherited from AbstractAttribute:

Inherited from IntegerRangeState:

Inherited from AbstractState:

Methods

AAValueConstantRange(const llvm::IRPosition& IRP)

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2450

Parameters

const llvm::IRPosition& IRP

static llvm::AAValueConstantRange&
createForPosition(const llvm::IRPosition& IRP,
                  llvm::Attributor& A)

Description

Create an abstract attribute view for the position \p IRP.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2463

Parameters

const llvm::IRPosition& IRP
llvm::Attributor& A

Optional<llvm::ConstantInt*>
getAssumedConstantInt(
    llvm::Attributor& A,
    const llvm::Instruction* CtxI = nullptr) const

Description

Return an assumed constant for the assocaited value a program point \p CtxI.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2481

Parameters

llvm::Attributor& A
const llvm::Instruction* CtxI = nullptr

virtual llvm::ConstantRange
getAssumedConstantRange(
    llvm::Attributor& A,
    const llvm::Instruction* CtxI = nullptr) const

Description

Return an assumed range for the assocaited value a program point \p CtxI. If \p I is nullptr, simply return an assumed range.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2469

Parameters

llvm::Attributor& A
const llvm::Instruction* CtxI = nullptr

const llvm::IRPosition& getIRPosition() const

Description

Return an IR position, see struct IRPosition.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2456

virtual llvm::ConstantRange getKnownConstantRange(
    llvm::Attributor& A,
    const llvm::Instruction* CtxI = nullptr) const

Description

Return a known range for the assocaited value at a program point \p CtxI. If \p I is nullptr, simply return a known range.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2475

Parameters

llvm::Attributor& A
const llvm::Instruction* CtxI = nullptr

llvm::IntegerRangeState& getState()

Description

See AbstractAttribute::getState(...).

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2459

const llvm::AbstractState& getState() const

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:2460