21#define DEBUG_TYPE "last-run-tracking"
22STATISTIC(NumSkippedPasses,
"Number of skipped passes");
23STATISTIC(NumLRTQueries,
"Number of LastRunTracking queries");
25bool LastRunTrackingInfo::shouldSkipImpl(
PassID ID, OptionPtr Ptr)
const {
26 if (!Opts.enable_last_run_tracking)
29 auto Iter = TrackedPasses.
find(ID);
30 if (Iter == TrackedPasses.
end())
32 if (!Iter->second || Iter->second(Ptr)) {
39void LastRunTrackingInfo::updateImpl(PassID ID,
bool Changed,
40 CompatibilityCheckFn CheckFn) {
42 TrackedPasses.clear();
43 TrackedPasses[
ID] = std::move(CheckFn);
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
iterator find(const_arg_type_t< KeyT > Val)
LLVM_ABI LastRunTrackingInfo run(Function &F, FunctionAnalysisManager &)
This class is used to track the last run of a set of module/function passes.
A Module instance is used to store all the information related to an LLVM module.
This is an optimization pass for GlobalISel generic memory operations.
const AnalysisOptions & getAnalysisOptions(const LLVMContext &C)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
A special type used by analysis passes to provide an address that identifies that particular analysis...