class LPMUpdater
Declaration
class LPMUpdater { /* full declaration omitted */ };
Description
This class provides an interface for updating the loop pass manager based on mutations to the loop nest. A reference to an instance of this class is passed as an argument to each Loop pass, and Loop passes should use it to update LPM infrastructure if they modify the loop nest structure.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:146
Method Overview
- public void addChildLoops(ArrayRef<llvm::Loop *> NewChildLoops)
- public void addSiblingLoops(ArrayRef<llvm::Loop *> NewSibLoops)
- public void markLoopAsDeleted(llvm::Loop & L, llvm::StringRef Name)
- public void revisitCurrentLoop()
- public bool skipCurrentLoop() const
Methods
¶void addChildLoops(
ArrayRef<llvm::Loop*> NewChildLoops)
void addChildLoops(
ArrayRef<llvm::Loop*> NewChildLoops)
Description
Loop passes should use this method to indicate they have added new child loops of the current loop. \p NewChildLoops must contain only the immediate children. Any nested loops within them will be visited in postorder as usual for the loop pass manager.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:181
Parameters
- ArrayRef<llvm::Loop*> NewChildLoops
¶void addSiblingLoops(
ArrayRef<llvm::Loop*> NewSibLoops)
void addSiblingLoops(
ArrayRef<llvm::Loop*> NewSibLoops)
Description
Loop passes should use this method to indicate they have added new sibling loops to the current loop. \p NewSibLoops must only contain the immediate sibling loops. Any nested loops within them will be visited in postorder as usual for the loop pass manager.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:206
Parameters
- ArrayRef<llvm::Loop*> NewSibLoops
¶void markLoopAsDeleted(llvm::Loop& L,
llvm::StringRef Name)
void markLoopAsDeleted(llvm::Loop& L,
llvm::StringRef Name)
Description
Loop passes should use this method to indicate they have deleted a loop from the nest. Note that this loop must either be the current loop or a subloop of the current loop. This routine must be called prior to removing the loop from the loop nest. If this is called for the current loop, in addition to clearing any state, this routine will mark that the current loop should be skipped by the rest of the pass management infrastructure.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:166
Parameters
- llvm::Loop& L
- llvm::StringRef Name
¶void revisitCurrentLoop()
void revisitCurrentLoop()
Description
Restart the current loop. Loop passes should call this method to indicate the current loop has been sufficiently changed that it should be re-visited from the begining of the loop pass pipeline rather than continuing.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:224
¶bool skipCurrentLoop() const
bool skipCurrentLoop() const
Description
This can be queried by loop passes which run other loop passes (like pass managers) to know whether the loop needs to be skipped due to updates to the loop nest. If this returns true, the loop object may have been deleted, so passes should take care not to touch the object.
Declared at: llvm/include/llvm/Transforms/Scalar/LoopPassManager.h:154