struct AAPrivatizablePtr
Declaration
struct AAPrivatizablePtr : public StateWrapper { /* full declaration omitted */ };
Description
An abstract interface for privatizability. A pointer is privatizable if it can be replaced by a new, private one. Privatizing pointer reduces the use count, interaction between unrelated code parts. In order for a pointer to be privatizable its value cannot be observed (=nocapture), it is (for now) not written (=readonly & noalias), we know what values are necessary to make the private copy look like the original one, and the values we need can be loaded (=dereferenceable).
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4017
Inherits from: StateWrapper
Member Variables
- public static const char ID
- Unique ID (due to the unique address)
Method Overview
- public AAPrivatizablePtr(const llvm::IRPosition & IRP, llvm::Attributor & A)
- public static bool classof(const llvm::AbstractAttribute * AA)
- public static llvm::AAPrivatizablePtr & createForPosition(const llvm::IRPosition & IRP, llvm::Attributor & A)
- public const char * getIdAddr() const
- public const std::string getName() const
- public virtual Optional<llvm::Type *> getPrivatizableType() const
- public bool isAssumedPrivatizablePtr() const
- public bool isKnownPrivatizablePtr() const
Methods
¶AAPrivatizablePtr(const llvm::IRPosition& IRP,
llvm::Attributor& A)
AAPrivatizablePtr(const llvm::IRPosition& IRP,
llvm::Attributor& A)
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4020
Parameters
- const llvm::IRPosition& IRP
- llvm::Attributor& A
¶static bool classof(
const llvm::AbstractAttribute* AA)
static bool classof(
const llvm::AbstractAttribute* AA)
Description
This function should return true if the type of the \p AA is AAPricatizablePtr
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4044
Parameters
- const llvm::AbstractAttribute* AA
¶static llvm::AAPrivatizablePtr& createForPosition(
const llvm::IRPosition& IRP,
llvm::Attributor& A)
static llvm::AAPrivatizablePtr& 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:4033
Parameters
- const llvm::IRPosition& IRP
- llvm::Attributor& A
¶const char* getIdAddr() const
const char* getIdAddr() const
Description
See AbstractAttribute::getIdAddr()
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4040
¶const std::string getName() const
const std::string getName() const
Description
See AbstractAttribute::getName()
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4037
¶virtual Optional<llvm::Type*>
getPrivatizableType() const
virtual Optional<llvm::Type*>
getPrivatizableType() const
Description
Return the type we can choose for a private copy of the underlying value. None means it is not clear yet, nullptr means there is none.
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4030
¶bool isAssumedPrivatizablePtr() const
bool isAssumedPrivatizablePtr() const
Description
Returns true if pointer privatization is assumed to be possible.
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4023
¶bool isKnownPrivatizablePtr() const
bool isKnownPrivatizablePtr() const
Description
Returns true if pointer privatization is known to be possible.
Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:4026