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:1824

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)

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

Parameters

const llvm::IRPosition& IRP

virtual bool
checkForAllReturnedValuesAndReturnInsts(
    const 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:1841

Parameters

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

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:1856

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:1831

Parameters

llvm::Attributor& A

virtual size_t getNumReturnValues() const

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

virtual const SmallSetVector<llvm::CallBase*, 4>&
getUnresolvedCalls() const

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

virtual llvm::iterator_range<iterator>
returned_values()

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

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

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