llvm::AAPrivatizablePtr

An abstract interface for privatizability.

Synopsis

Declared in <llvm/Transforms/IPO/Attributor.h>

struct AAPrivatizablePtr
    : StateWrapper<BooleanState, AbstractAttribute>

Description

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).

Base Classes

NameDescription
StateWrapper<BooleanState, AbstractAttribute>Helper to tie a abstract state implementation to an abstract attribute.

Type Aliases

NameDescription
Base Base type of this abstract attribute.
StateType Provide static access to the type of the state.

Member Functions

NameDescription
AAPrivatizablePtr [constructor]Create a AAPrivatizablePtr for the position IRP.
getIdAddr [virtual]See AbstractAttribute::getIdAddr()
getName [virtual]See AbstractAttribute::getName()
getPrivatizableType [virtual]Return the type we can choose for a private copy of the underlying value. std::nullopt means it is not clear yet, nullptr means there is none.
getState See AbstractAttribute::getState(...).
isAssumedPrivatizablePtr Returns true if pointer privatization is assumed to be possible.
isKnownPrivatizablePtr Returns true if pointer privatization is known to be possible.

Static Member Functions

NameDescription
classof This function should return true if the type of the AA is AAPricatizablePtr
createForPosition Create an abstract attribute view for the position IRP.
isValidIRPositionForInit See AbstractAttribute::isValidIRPositionForInit
requiresCallersForArgOrFunction See AbstractAttribute::requiresCallersForArgOrFunction

Static Data Members

NameDescription
ID Unique ID (due to the unique address)