LLVM 20.0.0git
|
This class is used to track the last run of a set of module/function passes. More...
#include "llvm/Analysis/LastRunTrackingAnalysis.h"
Public Types | |
using | PassID = const void * |
using | OptionPtr = const void * |
using | CompatibilityCheckFn = std::function< bool(OptionPtr)> |
Public Member Functions | |
template<typename OptionT > | |
bool | shouldSkip (PassID ID, const OptionT &Opt) const |
Check if we should skip a pass. | |
bool | shouldSkip (PassID ID) const |
template<typename OptionT > | |
void | update (PassID ID, bool Changed, const OptionT &Opt) |
Update the tracking info. | |
void | update (PassID ID, bool Changed) |
This class is used to track the last run of a set of module/function passes.
Invalidation are conservatively handled by the pass manager if a pass doesn't explicitly preserve the result. If we want to skip a pass, we should define a unique ID PassID
to identify the pass, which is usually a pointer to a static member. If a pass has parameters, they should be stored in a struct OptionT
with a method bool isCompatibleWith(const OptionT& LastOpt) const to check compatibility.
Definition at line 46 of file LastRunTrackingAnalysis.h.
using llvm::LastRunTrackingInfo::CompatibilityCheckFn = std::function<bool(OptionPtr)> |
Definition at line 51 of file LastRunTrackingAnalysis.h.
using llvm::LastRunTrackingInfo::OptionPtr = const void * |
Definition at line 49 of file LastRunTrackingAnalysis.h.
using llvm::LastRunTrackingInfo::PassID = const void * |
Definition at line 48 of file LastRunTrackingAnalysis.h.
Definition at line 63 of file LastRunTrackingAnalysis.h.
|
inline |
Check if we should skip a pass.
ID | The unique ID of the pass. |
Opt | The parameters of the pass. If the pass has no parameters, use shouldSkip(PassID ID) instead. |
Definition at line 60 of file LastRunTrackingAnalysis.h.
Definition at line 78 of file LastRunTrackingAnalysis.h.
|
inline |
Update the tracking info.
ID | The unique ID of the pass. |
Changed | Whether the pass makes changes. |
Opt | The parameters of the pass. It must have the same type as the parameters of the last run. If the pass has no parameters, use update(PassID ID, bool Changed) instead. |
Definition at line 73 of file LastRunTrackingAnalysis.h.
References Ptr.