rustc_trait_selection: work around instruction-counting non-determinism.
This commit is contained in:
parent
44783f1db0
commit
85947f0fe2
1 changed files with 6 additions and 0 deletions
|
|
@ -1525,6 +1525,12 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
|||
other: &EvaluatedCandidate<'tcx>,
|
||||
needs_infer: bool,
|
||||
) -> bool {
|
||||
// HACK(eddyb) remove instruction-counting noise from `-Z self-profile`.
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
unsafe {
|
||||
std::arch::asm!("mfence", options(nostack));
|
||||
}
|
||||
|
||||
if victim.candidate == other.candidate {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue