Helper to describe and deal with positions in the LLVM‐IR.
Synopsis
Declared in <llvm/Transforms/IPO/Attributor.h>
struct IRPosition;
Description
A position in the IR is described by an anchor value and an "offset" that could be the argument number, for call sites and arguments, or an indicator of the "position kind". The kinds, specified in the Kind enum below, include the locations in the attribute list, i.a., function scope and return value, as well as a distinction between call sites and functions. Finally, there are floating values that do not have a corresponding attribute list position.
Type Aliases
Name |
Description |
Call‐base context associated with an IR position. |
Enums
Name |
Description |
The positions we distinguish in the IR. |
Member Functions
Name |
Description |
|
Construct an invalid IR position. |
Return the Function surrounding the anchor value. |
|
Return the value this abstract attribute is anchored with. |
|
Return theargument |
|
Return the associated argument, if any. |
|
Return the associated function, if any. |
|
Return the type this abstract attribute is associated with. |
|
Return the value this abstract attribute is associated with. |
|
Return the index in the attribute list for this position. |
|
Return the attributes associated with this function or call site scope. |
|
Return the value attributes are attached to. |
|
Get the call base context from the position. |
|
Return the call‐site argument number of the associated value. |
|
Return the callee‐side argument number, or a negative value. |
|
Return the context instruction, if any. |
|
Return the number of arguments associated with this function or call site scope. |
|
Return the associated position kind. |
|
Check if the position has any call base context. |
|
Return true if this is any call‐site‐related position. |
|
Return true if the position is an argument or call site argument. |
|
Return true if the position refers to a function interface, that is the function scope, the function return, or an argument. |
|
Return true if this is a function or call site position. |
|
Update the attributes associated with this function or call site scope. |
|
Return the same position without the call base context. |
|
Conversion into a void * to allow reuse of pointer hashing. |
|
Return true if this equals |
|
Return true if this differs from |
Static Member Functions
Name |
Description |
Create a position describing the argument |
|
|
|
Create a position describing the function scope of |
|
Create a position describing the returned value of |
|
Create a position describing the function scope of |
|
Create a function‐scope position matching the context of |
|
Create a position describing the instruction |
|
Create a position describing the returned value of |
|
Create a position describing the value of |
Derived Classes
Name |
Description |
Base struct for all "concrete attribute" deductions. |
Created with MrDocs