[Mlir-commits] [mlir] [MLIR][LLVM] Add CG Profile module flags support (PR #137115)
Tobias Gysi
llvmlistbot at llvm.org
Wed Apr 23 23:20:40 PDT 2025
================
@@ -380,8 +380,20 @@ LogicalResult
ModuleFlagAttr::verify(function_ref<InFlightDiagnostic()> emitError,
LLVM::ModFlagBehavior flagBehavior, StringAttr key,
Attribute value) {
- if (!isa<IntegerAttr, StringAttr>(value))
- return emitError()
- << "only integer and string values are currently supported";
- return success();
+ if (key == "CG Profile") {
+ auto arrayAttr = dyn_cast<ArrayAttr>(value);
+ if ((!arrayAttr) || (!llvm::all_of(arrayAttr, [](Attribute v) {
----------------
gysit wrote:
```suggestion
if ((!arrayAttr) || (!llvm::all_of(arrayAttr, [](Attribute attr) {
```
ultra nit: for attributes we usually use attr or similar.
https://github.com/llvm/llvm-project/pull/137115
More information about the Mlir-commits
mailing list