@@ -216,22 +216,28 @@ const quickLinksKey = ref(0);
216216const filter = ref (loadFilterFromUrl (urlParams , defaultCompileFilter ));
217217
218218// Should we use the backend as the source of before/after data?
219- const selfCompareBackend = computed (
220- () => comparesIdenticalCommits .value && filter .value .selfCompareBackend
221- );
219+ const selfCompareBackend = computed (() => {
220+ const hasMultipleBackends =
221+ new Set (props .data .compile_comparisons .map ((c ) => c .backend )).size > 1 ;
222+ return (
223+ comparesIdenticalCommits .value &&
224+ filter .value .selfCompareBackend &&
225+ hasMultipleBackends
226+ );
227+ });
222228
223229function exportData() {
224230 exportToMarkdown (comparisons .value , filter .value .showRawData );
225231}
226232
227- // Are we currently comparing the same commit against each other ?
233+ // Are we currently comparing the same commit in the before/after toolchains ?
228234const comparesIdenticalCommits = computed (() => {
229235 return props .data .a .commit === props .data .b .commit ;
230236});
231237const benchmarkMap = createCompileBenchmarkMap (props .data );
232238
233- // Artificially restructure the data to create a comparison between backends
234239const compileComparisons = computed (() => {
240+ // If requested, artificially restructure the data to create a comparison between backends
235241 if (selfCompareBackend .value ) {
236242 return transformDataForBackendComparison (props .data .compile_comparisons );
237243 } else {
@@ -258,8 +264,11 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
258264 :selected-metric =" selector.stat"
259265 :metrics =" benchmarkInfo.compile_metrics"
260266 />
261- <div v-if =" comparesIdenticalCommits" >
262- Self-compare backend:
267+ <div
268+ v-if =" comparesIdenticalCommits"
269+ :title =" `Compare codegen backends for commit '${props.data.a.commit}'`"
270+ >
271+ Compare codegen backends for this commit:
263272 <input
264273 type =" checkbox"
265274 :checked =" selfCompareBackend"
@@ -275,7 +284,8 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
275284 <OverallSummary :summary =" filteredSummary" />
276285 <Aggregations :cases =" comparisons" />
277286 <div class =" warning" v-if =" selfCompareBackend" >
278- Comparing Cranelift against LLVM baseline!
287+ Note: comparing results of the baseline LLVM backend to the Cranelift
288+ backend.
279289 </div >
280290 <Benchmarks
281291 :data =" data"
0 commit comments