21#define DEBUG_TYPE "last-run-tracking"
22STATISTIC(NumSkippedPasses,
"Number of skipped passes");
23STATISTIC(NumLRTQueries,
"Number of LastRunTracking queries");
27 cl::desc(
"Disable last run tracking"),
30bool LastRunTrackingInfo::shouldSkipImpl(PassID
ID, OptionPtr
Ptr)
const {
34 auto Iter = TrackedPasses.
find(
ID);
35 if (Iter == TrackedPasses.
end())
37 if (!Iter->second || Iter->second(
Ptr)) {
44void LastRunTrackingInfo::updateImpl(PassID
ID,
bool Changed,
45 CompatibilityCheckFn CheckFn) {
47 TrackedPasses.
clear();
48 TrackedPasses[
ID] = std::move(CheckFn);
static cl::opt< bool > DisableLastRunTracking("disable-last-run-tracking", cl::Hidden, cl::desc("Disable last run tracking"), cl::init(false))
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)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
A special type used by analysis passes to provide an address that identifies that particular analysis...