Skip to content

Commit 8241106

Browse files
authored
[Exegesis] Print epsilon value in the sched model inconsistency report (#80080)
Since I've formatted the epsilon value, I don't think it's necessary to escape it.
1 parent 16c4843 commit 8241106

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

llvm/test/tools/llvm-exegesis/X86/analysis-epsilons.test

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
# CHECK-CLUSTERS-ONE-NEXT: {{^}}0,
2121
# CHECK-CLUSTERS-ONE-SAME: ,100.00{{$}}
2222

23+
# CHECK-INCONSISTENCIES-FAIL: Epsilon: <span class="mono">0.10</span>
2324
# CHECK-INCONSISTENCIES-FAIL: contains instructions whose performance characteristics do not match that of LLVM
2425
# CHECK-INCONSISTENCIES-FAIL: contains instructions whose performance characteristics do not match that of LLVM
2526
# CHECK-INCONSISTENCIES-FAIL-NOT: contains instructions whose performance characteristics do not match that of LLVM
2627

28+
# CHECK-INCONSISTENCIES-PASS: Epsilon: <span class="mono">100.00</span>
2729
# CHECK-INCONSISTENCIES-PASS-NOT: contains instructions whose performance characteristics do not match that of LLVM
2830

2931
---

llvm/tools/llvm-exegesis/lib/Analysis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,9 @@ Error Analysis::run<Analysis::PrintSchedClassInconsistencies>(
524524
OS << "</span></h3><h3>Cpu: <span class=\"mono\">";
525525
writeEscaped<kEscapeHtml>(OS, FirstPoint.CpuName);
526526
OS << "</span></h3>";
527+
OS << "<h3>Epsilon: <span class=\"mono\">"
528+
<< format("%0.2f", std::sqrt(AnalysisInconsistencyEpsilonSquared_))
529+
<< "</span></h3>";
527530

528531
const auto &SI = State_.getSubtargetInfo();
529532
for (const auto &RSCAndPoints : makePointsPerSchedClass()) {

0 commit comments

Comments
 (0)