An abstract interface for privatizability.
Declared in <llvm/Transforms/IPO/Attributor.h>
struct AAPrivatizablePtr
: StateWrapper<BooleanState, AbstractAttribute>
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).
| Name | Description |
|---|---|
StateWrapper<BooleanState, AbstractAttribute> | Helper to tie a abstract state implementation to an abstract attribute. |
| Name | Description |
|---|---|
Base | Base type of this abstract attribute. |
StateType | Provide static access to the type of the state. |
| Name | Description |
|---|---|
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. |
| Name | Description |
|---|---|
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 |
| Name | Description |
|---|---|
ID | Unique ID (due to the unique address) |