@@ -216,22 +216,28 @@ const quickLinksKey = ref(0);
216
216
const filter = ref (loadFilterFromUrl (urlParams , defaultCompileFilter ));
217
217
218
218
// 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
+ });
222
228
223
229
function exportData() {
224
230
exportToMarkdown (comparisons .value , filter .value .showRawData );
225
231
}
226
232
227
- // Are we currently comparing the same commit against each other ?
233
+ // Are we currently comparing the same commit in the before/after toolchains ?
228
234
const comparesIdenticalCommits = computed (() => {
229
235
return props .data .a .commit === props .data .b .commit ;
230
236
});
231
237
const benchmarkMap = createCompileBenchmarkMap (props .data );
232
238
233
- // Artificially restructure the data to create a comparison between backends
234
239
const compileComparisons = computed (() => {
240
+ // If requested, artificially restructure the data to create a comparison between backends
235
241
if (selfCompareBackend .value ) {
236
242
return transformDataForBackendComparison (props .data .compile_comparisons );
237
243
} else {
@@ -258,8 +264,11 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
258
264
:selected-metric =" selector.stat"
259
265
:metrics =" benchmarkInfo.compile_metrics"
260
266
/>
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:
263
272
<input
264
273
type =" checkbox"
265
274
:checked =" selfCompareBackend"
@@ -275,7 +284,8 @@ const filteredSummary = computed(() => computeSummary(comparisons.value));
275
284
<OverallSummary :summary =" filteredSummary" />
276
285
<Aggregations :cases =" comparisons" />
277
286
<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.
279
289
</div >
280
290
<Benchmarks
281
291
:data =" data"
0 commit comments