Skip to content

Commit d81fcce

Browse files
committed
Regex tests and remove auto
1 parent def6b16 commit d81fcce

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

mlir/lib/Target/LLVMIR/ModuleImport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ convertProfileSummaryModuleFlagValue(ModuleOp mlirModule,
607607
auto getConstantMD = [&](const llvm::MDOperand &md, StringRef matchKey,
608608
bool optional =
609609
false) -> llvm::ConstantAsMetadata * {
610-
auto *tupleEntry = getMDTuple(md);
610+
llvm::MDTuple *tupleEntry = getMDTuple(md);
611611
if (!tupleEntry)
612612
return nullptr;
613613
llvm::MDString *keyMD = dyn_cast<llvm::MDString>(tupleEntry->getOperand(0));

mlir/test/Target/LLVMIR/llvmir.mlir

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,19 +2894,23 @@ llvm.module_flags [#llvm.mlir.module_flag<error, "ProfileSummary",
28942894
<cut_off = 100000, min_count = 86427, num_counts = 1>
28952895
>>]
28962896

2897-
// CHECK: !llvm.module.flags = !{!0, !15}
2898-
2899-
// CHECK: !0 = !{i32 1, !"ProfileSummary", !1}
2900-
// CHECK: !1 = !{!2, !3, !4, !5, !6, !7, !8, !9, !10, !11}
2901-
// CHECK: !2 = !{!"ProfileFormat", !"InstrProf"}
2902-
// CHECK: !3 = !{!"TotalCount", i64 263646}
2903-
// CHECK: !4 = !{!"MaxCount", i64 86427}
2904-
// CHECK: !5 = !{!"MaxInternalCount", i64 86427}
2905-
// CHECK: !6 = !{!"MaxFunctionCount", i64 4691}
2906-
// CHECK: !7 = !{!"NumCounts", i64 3712}
2907-
// CHECK: !8 = !{!"NumFunctions", i64 796}
2908-
// CHECK: !9 = !{!"IsPartialProfile", i64 0}
2909-
// CHECK: !10 = !{!"PartialProfileRatio", double 0.000000e+00}
2897+
// CHECK: !llvm.module.flags = !{![[#PSUM:]], {{.*}}}
2898+
2899+
// CHECK: ![[#PSUM]] = !{i32 1, !"ProfileSummary", ![[#SUMLIST:]]}
2900+
// CHECK: ![[#SUMLIST]] = !{![[#FMT:]], ![[#TC:]], ![[#MC:]], ![[#MIC:]], ![[#MFC:]], ![[#NC:]], ![[#NF:]], ![[#IPP:]], ![[#PPR:]], ![[#DS:]]}
2901+
// CHECK: ![[#FMT]] = !{!"ProfileFormat", !"InstrProf"}
2902+
// CHECK: ![[#TC]] = !{!"TotalCount", i64 263646}
2903+
// CHECK: ![[#MC]] = !{!"MaxCount", i64 86427}
2904+
// CHECK: ![[#MIC]] = !{!"MaxInternalCount", i64 86427}
2905+
// CHECK: ![[#MFC]] = !{!"MaxFunctionCount", i64 4691}
2906+
// CHECK: ![[#NC]] = !{!"NumCounts", i64 3712}
2907+
// CHECK: ![[#NF]] = !{!"NumFunctions", i64 796}
2908+
// CHECK: ![[#IPP]] = !{!"IsPartialProfile", i64 0}
2909+
// CHECK: ![[#PPR]] = !{!"PartialProfileRatio", double 0.000000e+00}
2910+
// CHECK: ![[#DS]] = !{!"DetailedSummary", ![[#DETAILED:]]}
2911+
// CHECK: ![[#DETAILED]] = !{![[#DS0:]], ![[#DS1:]]}
2912+
// CHECK: ![[#DS0:]] = !{i64 10000, i64 86427, i64 1}
2913+
// CHECK: ![[#DS1:]] = !{i64 100000, i64 86427, i64 1}
29102914

29112915
// -----
29122916

0 commit comments

Comments
 (0)