Skip to content

Commit

Permalink
remove pointless cold_path impl in interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 18, 2024
1 parent 3fb7e44 commit dff98a8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@ fn codegen_regular_intrinsic_call<'tcx>(

sym::cold_path => {
// This is a no-op. The intrinsic is just a hint to the optimizer.
// We still have an impl here to avoid it being turned into a call.
}

// Unimplemented intrinsics must have a fallback body. The fallback body is obtained
Expand Down
3 changes: 0 additions & 3 deletions compiler/rustc_const_eval/src/interpret/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,6 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
// These just return their argument
self.copy_op(&args[0], dest)?;
}
sym::cold_path => {
// This is a no-op. The intrinsic is just a hint to the optimizer.
}
sym::raw_eq => {
let result = self.raw_eq_intrinsic(&args[0], &args[1])?;
self.write_scalar(result, dest)?;
Expand Down

0 comments on commit dff98a8

Please sign in to comment.