Create a new loop identifier for a loop created from a loop transformation.
Declared in <llvm/Transforms/Utils/LoopUtils.h>
std::optional<MDNode*>
makeFollowupLoopID(
MDNode* OrigLoopID,
ArrayRef<StringRef> FollowupAttrs,
char const* InheritOptionsAttrsPrefix = "",
bool AlwaysNew = false);
The loop ID for the after-transformation loop. The following values can be returned: std::nullopt : No followup attribute was found; it is up to the transformation to choose attributes that make sense. OrigLoopID The original identifier can be reused. nullptr : The new loop has no attributes. MDNode* : A new unique loop identifier.
| Name | Description |
|---|---|
| OrigLoopID | The loop ID of the loop before the transformation. |
| FollowupAttrs | List of attribute names that contain attributes to be added to the new loop ID. |
| InheritOptionsAttrsPrefix | Selects which attributes should be inherited from the original loop. The following values are considered: nullptr : Inherit all attributes from OrigLoopID. "" : Do not inherit any attribute from OrigLoopID; only use those specified by a followup attribute. "<prefix>": Inherit all attributes except those which start with <prefix>; commonly used to remove metadata for the applied transformation. |
| AlwaysNew | If true, do not try to reuse OrigLoopID and never return std::nullopt. |