LLVM: llvm::Attributor::ArgumentReplacementInfo Struct Reference (original) (raw)
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. More...
#include "[llvm/Transforms/IPO/Attributor.h](Attributor%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| using | CalleeRepairCBTy |
| Callee repair callback type. | |
| using | ACSRepairCBTy |
| Abstract call site (ACS) repair callback type. |
| Public Member Functions | |
|---|---|
| Attributor & | getAttributor () const |
| Simple getters, see the corresponding members for details. | |
| const Function & | getReplacedFn () const |
| const Argument & | getReplacedArg () const |
| unsigned | getNumReplacementArgs () const |
| const SmallVectorImpl< Type * > & | getReplacementTypes () const |
| Friends | |
|---|---|
| struct | Attributor |
| Allow access to the private members from the Attributor. |
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.
Definition at line 2245 of file Attributor.h.
◆ ACSRepairCBTy
Initial value:
std::function<void(const ArgumentReplacementInfo &, AbstractCallSite,
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Abstract call site (ACS) repair callback type.
The abstract call site repair callback is invoked once on every abstract call site of the replaced function (
See also
ReplacedFn). The callback needs to provide the operands for the call to the new replacement function. The number and type of the operands appended to the provided vector (second argument) is defined by the number and types determined through the replacement type vector (
ReplacementTypes). The first argument is the ArgumentReplacementInfo object registered with the Attributor through the registerFunctionSignatureRewrite call.
Definition at line 2266 of file Attributor.h.
◆ CalleeRepairCBTy
Initial value:
Callee repair callback type.
The function repair callback is invoked once to rewire the replacement arguments in the body of the new function. The argument replacement info is passed, as build from the registerFunctionSignatureRewrite call, as well as the replacement function and an iteratore to the first replacement argument.
Definition at line 2253 of file Attributor.h.
◆ getAttributor()
| Attributor & llvm::Attributor::ArgumentReplacementInfo::getAttributor ( ) const | inline |
|---|
◆ getNumReplacementArgs()
| unsigned llvm::Attributor::ArgumentReplacementInfo::getNumReplacementArgs ( ) const | inline |
|---|
◆ getReplacedArg()
| const Argument & llvm::Attributor::ArgumentReplacementInfo::getReplacedArg ( ) const | inline |
|---|
◆ getReplacedFn()
| const Function & llvm::Attributor::ArgumentReplacementInfo::getReplacedFn ( ) const | inline |
|---|
◆ getReplacementTypes()
The documentation for this struct was generated from the following file:
- include/llvm/Transforms/IPO/Attributor.h