Repository navigation
Skip redundant monomorphization checks - #164330
rust-bors[bot] merged 3 commits into
Conversation
|
r? @adwinwhite rustbot has assigned @adwinwhite. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ks, r=<try> Skip redundant monomorphization checks
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (dea04eb): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @bors rollup=iffy rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary 1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.902s -> 489.636s (-0.05%) |
|
CI failure is sus. Re-triggering it. |
|
Given that this fast path has a soundness hole (see |
| instance: Instance<'tcx>, | ||
| caller: InstanceKind<'tcx>, |
There was a problem hiding this comment.
Could we replace caller: InstanceKind with caller: Instance and avoid the redundant arguments?
| let extern_abi = callee.fn_sig(tcx).abi(); | ||
| // The ABI does not depend on generic arguments. | ||
| let extern_abi = match *callee.kind() { | ||
| ty::FnDef(def_id, _) => tcx.fn_sig(def_id).skip_binder().abi(), | ||
| _ => callee.fn_sig(tcx).abi(), | ||
| }; |
There was a problem hiding this comment.
We can call .fn_sig(tcx).abi() as before?
|
@bors r+ rollup |
…nt-abi-checks, r=adwinwhite Skip redundant monomorphization checks ## Summary This PR attempts to avoid unnecessary work during call-site ABI checks. On main, we instantiate generic arguments and normalize the callee type, but then immediately return for Rust ABIs and LLVM intrinsics. Since the ABI doesn't depend on generic arguments, we can instead check it first and skip that preparation if the subsequent checks would be a no-op.
…uwer Rollup of 8 pull requests Successful merges: - #162460 (Feat - `#[inline(always)] + #[target_feature(enable = "....")]` #2) - #163485 (`rustc_builtin_macros` cleanup, part 8) - #164578 (Don't ignore unknown LLVM diagnostics) - #162369 (Document the `recursion_limit` built-in attribute) - #162840 (tier 3 target policy: target CPU and features must be supported by upstream backend) - #164330 (Skip redundant monomorphization checks) - #164656 (stabilize ExitCodeExt for Windows) - #164660 (Touch up attribute docs)
…nt-abi-checks, r=adwinwhite Skip redundant monomorphization checks ## Summary This PR attempts to avoid unnecessary work during call-site ABI checks. On main, we instantiate generic arguments and normalize the callee type, but then immediately return for Rust ABIs and LLVM intrinsics. Since the ABI doesn't depend on generic arguments, we can instead check it first and skip that preparation if the subsequent checks would be a no-op.
…uwer Rollup of 13 pull requests Successful merges: - #162460 (Feat - `#[inline(always)] + #[target_feature(enable = "....")]` #2) - #163485 (`rustc_builtin_macros` cleanup, part 8) - #164457 (Add `vec_visualizer` lldb test) - #161253 (Implement `AsMut<T>` and `AsRef<T>` for `!`.) - #162369 (Document the `recursion_limit` built-in attribute) - #162840 (tier 3 target policy: target CPU and features must be supported by upstream backend) - #164329 (use default_field_values in declare_lint) - #164330 (Skip redundant monomorphization checks) - #164527 (doc: added addtional docs for Write) - #164656 (stabilize ExitCodeExt for Windows) - #164660 (Touch up attribute docs) - #164681 (tidy: use repository-relative path for style checks) - #164688 (re-enable test_dir_remove_dir test on QNX)
Rollup merge of #164330 - charliermarsh:charlie/skip-redundant-abi-checks, r=adwinwhite Skip redundant monomorphization checks ## Summary This PR attempts to avoid unnecessary work during call-site ABI checks. On main, we instantiate generic arguments and normalize the callee type, but then immediately return for Rust ABIs and LLVM intrinsics. Since the ABI doesn't depend on generic arguments, we can instead check it first and skip that preparation if the subsequent checks would be a no-op.
Summary
This PR attempts to avoid unnecessary work during call-site ABI checks. On main, we instantiate generic arguments and normalize the callee type, but then immediately return for Rust ABIs and LLVM intrinsics.
Since the ABI doesn't depend on generic arguments, we can instead check it first and skip that preparation if the subsequent checks would be a no-op.