Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion llvm/include/llvm/Passes/StandardInstrumentations.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,9 @@ class StandardInstrumentations {
public:
StandardInstrumentations(LLVMContext &Context, bool DebugLogging,
bool VerifyEach = false,
PrintPassOptions PrintPassOpts = PrintPassOptions());
PrintPassOptions PrintPassOpts = PrintPassOptions(),
std::optional<bool> TimePasses = std::nullopt,
std::optional<bool> TimePassesPerRun = std::nullopt);

// Register all the standard instrumentation callbacks. If \p FAM is nullptr
// then PreservedCFGChecker is not enabled.
Expand Down
5 changes: 4 additions & 1 deletion llvm/lib/Passes/StandardInstrumentations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2442,8 +2442,11 @@ void DotCfgChangeReporter::registerCallbacks(

StandardInstrumentations::StandardInstrumentations(
LLVMContext &Context, bool DebugLogging, bool VerifyEach,
PrintPassOptions PrintPassOpts)
PrintPassOptions PrintPassOpts, std::optional<bool> EnableTimePasses,
std::optional<bool> EnablePerRunTiming)
: PrintPass(DebugLogging, PrintPassOpts),
TimePasses(EnableTimePasses ? *EnableTimePasses : TimePassesIsEnabled,
EnablePerRunTiming ? *EnablePerRunTiming : TimePassesPerRun),
OptNone(DebugLogging),
OptPassGate(Context),
PrintChangedIR(PrintChanged == ChangePrinter::Verbose),
Expand Down