[PATCH] D86360: Add new hidden option -print-changed which only reports changes to IR
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 21:06:59 PDT 2020
yrouban added inline comments.
================
Comment at: llvm/include/llvm/Passes/StandardInstrumentations.h:123-144
+ // callback on the first IR processed
+ std::function<void(Any IR)> HandleInitialIR;
+ // callback before and after a pass to get the representation of the IR
+ std::function<void(Any IR, StringRef PassID, T &Output)>
+ GenerateIRRepresentation;
+ // callback when the pass is not iteresting
+ std::function<void(StringRef PassID, std::string &Name)> OmitAfter;
----------------
minor comments:
swap 1st and 2nd parameters of //HandleAfter// for consistency with the other callbacks.
consider //const// for //Before// and //After// parameters:
std::function<bool(const T &Before, const T &After)> Same;
std::function<void(StringRef PassID, std::string &Name, const T &Before, const T &After, Any)> HandleAfter;
================
Comment at: llvm/include/llvm/Passes/StandardInstrumentations.h:94
+protected:
+ ChangePrinter(std::function<void(Any IR)> F1,
+ std::function<void(Any IR, StringRef PassID, T &Output)> F2,
----------------
minor: it would be more convenient to have meaningful names inplace of F1 - F8.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86360/new/
https://reviews.llvm.org/D86360
More information about the llvm-commits
mailing list