struct Attributor::ArgumentReplacementInfo

Declaration

struct Attributor::ArgumentReplacementInfo { /* full declaration omitted */ };

Description

Helper struct used in the communication between an abstract attribute (AA) that wants to change the signature of a function and the Attributor which applies the changes. The struct is partially initialized with the information from the AA (see the constructor). All other members are provided by the Attributor prior to invoking any callbacks.

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

Member Variables

private llvm::Attributor& A
Reference to the attributor to allow access from the callbacks.
private const llvm::Function& ReplacedFn
The "old" function replaced by ReplacementFn.
private const llvm::Argument& ReplacedArg
The "old" argument replaced by new ones defined via ReplacementTypes.
private const SmallVector<llvm::Type*, 8> ReplacementTypes
The types of the arguments replacing ReplacedArg.
private const llvm::Attributor::ArgumentReplacementInfo:: CalleeRepairCBTy CalleeRepairCB
Callee repair callback, see CalleeRepairCBTy.
private const llvm::Attributor::ArgumentReplacementInfo:: ACSRepairCBTy ACSRepairCB
Abstract call site (ACS) repair callback, see ACSRepairCBTy.

Method Overview

  • private ArgumentReplacementInfo(llvm::Attributor & A, llvm::Argument & Arg, ArrayRef<llvm::Type *> ReplacementTypes, llvm::Attributor::ArgumentReplacementInfo::CalleeRepairCBTy && CalleeRepairCB, llvm::Attributor::ArgumentReplacementInfo::ACSRepairCBTy && ACSRepairCB)
  • public llvm::Attributor & getAttributor() const
  • public unsigned int getNumReplacementArgs() const
  • public const llvm::Argument & getReplacedArg() const
  • public const llvm::Function & getReplacedFn() const
  • public const SmallVectorImpl<llvm::Type *> & getReplacementTypes() const

Methods

ArgumentReplacementInfo(
    llvm::Attributor& A,
    llvm::Argument& Arg,
    ArrayRef<llvm::Type*> ReplacementTypes,
    llvm::Attributor::ArgumentReplacementInfo::
        CalleeRepairCBTy&& CalleeRepairCB,
    llvm::Attributor::ArgumentReplacementInfo::
        ACSRepairCBTy&& ACSRepairCB)

Description

Constructor that takes the argument to be replaced, the types of the replacement arguments, as well as callbacks to repair the call sites and new function after the replacement happened.

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

Parameters

llvm::Attributor& A
llvm::Argument& Arg
ArrayRef<llvm::Type*> ReplacementTypes
llvm::Attributor::ArgumentReplacementInfo:: CalleeRepairCBTy&& CalleeRepairCB
llvm::Attributor::ArgumentReplacementInfo:: ACSRepairCBTy&& ACSRepairCB

llvm::Attributor& getAttributor() const

Description

Simple getters, see the corresponding members for details. {

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

unsigned int getNumReplacementArgs() const

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

const llvm::Argument& getReplacedArg() const

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

const llvm::Function& getReplacedFn() const

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

const SmallVectorImpl<llvm::Type*>&
getReplacementTypes() const

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