struct AAReturnedValues

Declaration

struct AAReturnedValues : public IRAttribute { /* full declaration omitted */ };

Description

An abstract attribute for the returned values of a function.

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

Inherits from: IRAttribute

Member Variables

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

Method Overview

Methods

AAReturnedValues(const llvm::IRPosition& IRP,
                 llvm::Attributor& A)

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

Parameters

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

virtual bool
checkForAllReturnedValuesAndReturnInsts(
    function_ref<bool(
        llvm::Value&,
        const SmallSetVector<llvm::ReturnInst*,
                             4>&)> Pred) const

Description

Check \p Pred on all returned values. This method will evaluate \p Pred on returned values and return true if (1) all returned values are known, and (2) \p Pred returned true for all returned values. Note: Unlike the Attributor::checkForAllReturnedValuesAndReturnInsts method, this one will not filter dead return instructions.

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

Parameters

function_ref<bool( llvm::Value&, const SmallSetVector<llvm::ReturnInst*, 4>&)> Pred

static bool classof(
    const llvm::AbstractAttribute* AA)

Description

This function should return true if the type of the \p AA is AAReturnedValues

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

Parameters

const llvm::AbstractAttribute* AA

static llvm::AAReturnedValues& 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:3096

Parameters

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

Optional<llvm::Value*>
getAssumedUniqueReturnValue(
    llvm::Attributor& A) const

Description

Return an assumed unique return value if a single candidate is found. If there cannot be one, return a nullptr. If it is not clear yet, return the Optional::NoneType.

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

Parameters

llvm::Attributor& A

const char* getIdAddr() const

Description

See AbstractAttribute::getIdAddr()

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

const std::string getName() const

Description

See AbstractAttribute::getName()

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

virtual size_t getNumReturnValues() const

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

virtual llvm::iterator_range<iterator>
returned_values()

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

virtual llvm::iterator_range<const_iterator>
returned_values() const

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