[Mlir-commits] [mlir] [MLIR] Add remark flags to mlir-opt (PR #156825)
Mehdi Amini
llvmlistbot at llvm.org
Mon Sep 15 08:27:26 PDT 2025
================
@@ -221,15 +227,53 @@ class MlirOptMainConfig {
}
bool shouldVerifyRoundtrip() const { return verifyRoundtripFlag; }
+ /// Checks if any remark filters are set.
+ bool shouldEmitRemarks() const {
+ // Emit all remarks only when no filters are specified.
+ const bool hasFilters =
+ !getRemarksAllFilter().empty() || !getRemarksPassedFilter().empty() ||
+ !getRemarksFailedFilter().empty() ||
+ !getRemarksMissedFilter().empty() || !getRemarksAnalyseFilter().empty();
+ return hasFilters;
+ }
+
/// Reproducer file generation (no crash required).
StringRef getReproducerFilename() const { return generateReproducerFileFlag; }
+ /// Set the reproducer output filename
+ RemarkFormat getRemarkFormat() const { return remarkFormatFlag; }
+ /// Set the remark format to use.
+ std::string getRemarksAllFilter() const { return remarksAllFilterFlag; }
+ /// Set the remark output file.
+ std::string getRemarksOutputFile() const { return remarksOutputFileFlag; }
+ /// Set the remark passed filters.
+ std::string getRemarksPassedFilter() const { return remarksPassedFilterFlag; }
+ /// Set the remark failed filters.
+ std::string getRemarksFailedFilter() const { return remarksFailedFilterFlag; }
+ /// Set the remark missed filters.
+ std::string getRemarksMissedFilter() const { return remarksMissedFilterFlag; }
+ /// Set the remark analyse filters.
+ std::string getRemarksAnalyseFilter() const {
+ return remarksAnalyseFilterFlag;
+ }
+
protected:
/// Allow operation with no registered dialects.
/// This option is for convenience during testing only and discouraged in
/// general.
bool allowUnregisteredDialectsFlag = false;
+ /// Remark format
+ RemarkFormat remarkFormatFlag;
----------------
joker-eph wrote:
The sanitizer issue is because there is no default here.
https://github.com/llvm/llvm-project/pull/156825
More information about the Mlir-commits
mailing list