struct AAValueConstantRangeImpl

Declaration

struct AAValueConstantRangeImpl : public AAValueConstantRange { /* full declaration omitted */ };

Description

------------------ Value Constant Range Attribute -------------------------

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5118

Inherits from: AAValueConstantRange

Member Variables

Inherited from AAValueConstantRange:

public static ID

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 AAValueConstantRangeImpl(const llvm::IRPosition & IRP)
  • public const std::string getAsStr() const
  • public llvm::ConstantRange getAssumedConstantRange(llvm::Attributor & A, const llvm::Instruction * CtxI = nullptr) const
  • public llvm::ConstantRange getConstantRangeFromLVI(llvm::Attributor & A, const llvm::Instruction * CtxI = nullptr) const
  • public llvm::ConstantRange getConstantRangeFromSCEV(llvm::Attributor & A, const llvm::Instruction * I = nullptr) const
  • public llvm::ConstantRange getKnownConstantRange(llvm::Attributor & A, const llvm::Instruction * CtxI = nullptr) const
  • public static llvm::MDNode * getMDNodeForConstantRange(llvm::Type * Ty, llvm::LLVMContext & Ctx, const llvm::ConstantRange & AssumedConstantRange)
  • public const llvm::SCEV * getSCEV(llvm::Attributor & A, const llvm::Instruction * I = nullptr) const
  • public void initialize(llvm::Attributor & A)
  • public static bool isBetterRange(const llvm::ConstantRange & Assumed, llvm::MDNode * KnownRanges)
  • public llvm::ChangeStatus manifest(llvm::Attributor & A)
  • public static bool setRangeMetadataIfisBetterRange(llvm::Instruction * I, const llvm::ConstantRange & AssumedConstantRange)

Inherited from AAValueConstantRange:

Inherited from IRPosition:

Inherited from AbstractAttribute:

Inherited from IntegerRangeState:

Inherited from AbstractState:

Methods

AAValueConstantRangeImpl(
    const llvm::IRPosition& IRP)

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5120

Parameters

const llvm::IRPosition& IRP

const std::string getAsStr() const

Description

See AbstractAttribute::getAsStr().

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5123

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

Description

See AAValueConstantRange::getAssumedConstantRange(..).

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5208

Parameters

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

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

Description

Helper function to get a range from LVI for the associated value at program point \p I.

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5178

Parameters

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

llvm::ConstantRange getConstantRangeFromSCEV(
    llvm::Attributor& A,
    const llvm::Instruction* I = nullptr) const

Description

Helper function to get a range from SCEV for the associated value at program point \p I.

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5159

Parameters

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

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

Description

See AAValueConstantRange::getKnownConstantRange(..).

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5196

Parameters

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

static llvm::MDNode* getMDNodeForConstantRange(
    llvm::Type* Ty,
    llvm::LLVMContext& Ctx,
    const llvm::ConstantRange&
        AssumedConstantRange)

Description

Helper function to create MDNode for range metadata.

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5234

Parameters

llvm::Type* Ty
llvm::LLVMContext& Ctx
const llvm::ConstantRange& AssumedConstantRange

const llvm::SCEV* getSCEV(
    llvm::Attributor& A,
    const llvm::Instruction* I = nullptr) const

Description

Helper function to get a SCEV expr for the associated value at program point \p I.

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5136

Parameters

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

void initialize(llvm::Attributor& A)

Description

See AbstractAttribute::initialize(..).

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5224

Parameters

llvm::Attributor& A

static bool isBetterRange(
    const llvm::ConstantRange& Assumed,
    llvm::MDNode* KnownRanges)

Description

Return true if \p Assumed is included in \p KnownRanges.

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5244

Parameters

const llvm::ConstantRange& Assumed
llvm::MDNode* KnownRanges

llvm::ChangeStatus manifest(llvm::Attributor& A)

Description

See AbstractAttribute::manifest()

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5286

Parameters

llvm::Attributor& A

static bool setRangeMetadataIfisBetterRange(
    llvm::Instruction* I,
    const llvm::ConstantRange&
        AssumedConstantRange)

Description

Helper function to set range metadata.

Declared at: llvm/lib/Transforms/IPO/Attributor.cpp:5271

Parameters

llvm::Instruction* I
const llvm::ConstantRange& AssumedConstantRange