[Mlir-commits] [mlir] [MLIR] Add remark flags to mlir-opt (PR #156825)
Mehdi Amini
llvmlistbot at llvm.org
Mon Sep 8 06:25:21 PDT 2025
================
@@ -204,6 +207,46 @@ struct MlirOptMainConfigCLOptions : public MlirOptMainConfig {
cl::location(generateReproducerFileFlag), cl::init(""),
cl::value_desc("filename"));
+ static cl::OptionCategory remarkCategory(
+ "Remark Options",
+ "Filter remarks by regular expression (llvm::Regex syntax).");
+
+ static llvm::cl::opt<RemarkFormat, /*ExternalStorage=*/true> remarkFormat{
+ "remark-format",
+ llvm::cl::desc("Specify the format for remark output."),
+ cl::location(remarkFormatFlag),
+ llvm::cl::value_desc("format"),
+ llvm::cl::init(REMARK_FORMAT_STDOUT),
+ llvm::cl::values(
+ clEnumValN(REMARK_FORMAT_STDOUT, "emitRemark",
+ "Print as emitRemark to command-line"),
+ clEnumValN(REMARK_FORMAT_YAML, "yaml", "Print yaml file"),
+ clEnumValN(REMARK_FORMAT_BITSTREAM, "bitstream",
+ "Print bitstream file")),
+ llvm::cl::cat(remarkCategory)};
+
+ static cl::opt<std::string, /*ExternalStorage=*/true> remarksAll(
+ "remarks",
+ cl::desc("Show all remarks: passed, missed, failed, analysis"),
+ cl::location(remarksAllFlag), cl::init(""), cl::cat(remarkCategory));
+
+ static cl::opt<std::string, /*ExternalStorage=*/true> remarksPassed(
+ "remarks-passed", cl::desc("Show passed remarks"),
+ cl::location(remarksPassedFlag), cl::init(""), cl::cat(remarkCategory));
+
+ static cl::opt<std::string, /*ExternalStorage=*/true> remarksFailed(
+ "remarks-failed", cl::desc("Show failed remarks"),
+ cl::location(remarksFailedFlag), cl::init(""), cl::cat(remarkCategory));
+
+ static cl::opt<std::string, /*ExternalStorage=*/true> remarksMissed(
+ "remarks-missed", cl::desc("Show missed remarks"),
+ cl::location(remarksMissedFlag), cl::init(""), cl::cat(remarkCategory));
+
+ static cl::opt<std::string, /*ExternalStorage=*/true> remarksAnalyse(
+ "remarks-analyse", cl::desc("Show analysis remarks"),
+ cl::location(remarksAnalyseFlag), cl::init(""),
+ cl::cat(remarkCategory));
----------------
joker-eph wrote:
I don't think this changed, did it?
https://github.com/llvm/llvm-project/pull/156825
More information about the Mlir-commits
mailing list