Repository navigation
Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic - #165923
Conversation
|
|
376bd37 to
ac208b4
Compare
This comment has been minimized.
This comment has been minimized.
… generic SIMD intrinsic
ac208b4 to
30a6ef9
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
nice. @bors r+ rollup |
…, r=workingjubilee Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic `codegen_intrinsic_call` already stores the result to the return place for non-ZST `BackendRepr::Memory` types, so there's no need to convert the LLVM integer to a LLVM array when it's going to get stored the same anyway. This PR also fixes the `llret_ty` passed to `generic_simd_intrinsic` to be `void` when the intrinsic returns nothing (i.e. when the Rust return type is a ZST) - this change is just to allow for future improvements elsewhere, as `llret_ty` is unused for intrinsics that don't return anything. r? @workingjubilee
Rollup of 15 pull requests Successful merges: - #166266 (miri subtree update) - #165720 (windows: remove redundant prefix parsing in `PathBuf::_push`) - #164878 (Don't require `extern "llvm-intrinsic"` return structs to be `#[repr(packed)]`) - #165008 (Support `NonNull` pointers as `asm!` input operands) - #165892 (`rustc_builtin_macros` cleanup, part 10) - #164485 (Stabilize unchecked `nonzero_ops`) - #165618 (Implement RangeIntersect on core::range types) - #165833 (Deallocate with the right provenance on Windows) - #165834 (Implement tidy alphabetical --bless on Windows) - #165889 (Fix docs of alloc fn: Allocator API stabilized) - #165923 (Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic) - #166012 (Added more queries to AdtDef in rustc_public to check for rust language types) - #166216 (Stop using #![no_core] in profiler_builtins) - #166259 (fmt: Improve `Debug` for `FormattingOptions`) - #166263 (Show slice split results for empty and singleton slices)
…, r=workingjubilee Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic `codegen_intrinsic_call` already stores the result to the return place for non-ZST `BackendRepr::Memory` types, so there's no need to convert the LLVM integer to a LLVM array when it's going to get stored the same anyway. This PR also fixes the `llret_ty` passed to `generic_simd_intrinsic` to be `void` when the intrinsic returns nothing (i.e. when the Rust return type is a ZST) - this change is just to allow for future improvements elsewhere, as `llret_ty` is unused for intrinsics that don't return anything. r? @workingjubilee
…, r=workingjubilee Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic `codegen_intrinsic_call` already stores the result to the return place for non-ZST `BackendRepr::Memory` types, so there's no need to convert the LLVM integer to a LLVM array when it's going to get stored the same anyway. This PR also fixes the `llret_ty` passed to `generic_simd_intrinsic` to be `void` when the intrinsic returns nothing (i.e. when the Rust return type is a ZST) - this change is just to allow for future improvements elsewhere, as `llret_ty` is unused for intrinsics that don't return anything. r? @workingjubilee
…uwer Rollup of 19 pull requests Successful merges: - #166266 (miri subtree update) - #164878 (Don't require `extern "llvm-intrinsic"` return structs to be `#[repr(packed)]`) - #165008 (Support `NonNull` pointers as `asm!` input operands) - #165892 (`rustc_builtin_macros` cleanup, part 10) - #165930 (Add red-green mark when dumping dep graph. Show DefIds if available) - #166280 (std: also mark doctests with skip_unsupported_miri_tests) - #166295 (use `cfg!(overflow_checks)` in `overflow_checks` intrinsic instead of `cfg!(debug_assertions)`) - #164485 (Stabilize unchecked `nonzero_ops`) - #165618 (Implement RangeIntersect on core::range types) - #165782 (Make unsafe unknown diagnostic attributes an error again) - #165833 (Deallocate with the right provenance on Windows) - #165834 (Implement tidy alphabetical --bless on Windows) - #165889 (Fix docs of alloc fn: Allocator API stabilized) - #165923 (Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic) - #166012 (Added more queries to AdtDef in rustc_public to check for rust language types) - #166186 (OpenOptions::append: clarify docs) - #166216 (Stop using #![no_core] in profiler_builtins) - #166259 (fmt: Improve `Debug` for `FormattingOptions`) - #166263 (Show slice split results for empty and singleton slices)
…uwer Rollup of 18 pull requests Successful merges: - #164878 (Don't require `extern "llvm-intrinsic"` return structs to be `#[repr(packed)]`) - #165008 (Support `NonNull` pointers as `asm!` input operands) - #165892 (`rustc_builtin_macros` cleanup, part 10) - #165930 (Add red-green mark when dumping dep graph. Show DefIds if available) - #166280 (std: also mark doctests with skip_unsupported_miri_tests) - #166295 (use `cfg!(overflow_checks)` in `overflow_checks` intrinsic instead of `cfg!(debug_assertions)`) - #164485 (Stabilize unchecked `nonzero_ops`) - #165618 (Implement RangeIntersect on core::range types) - #165782 (Make unsafe unknown diagnostic attributes an error again) - #165833 (Deallocate with the right provenance on Windows) - #165834 (Implement tidy alphabetical --bless on Windows) - #165889 (Fix docs of alloc fn: Allocator API stabilized) - #165923 (Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic) - #166012 (Added more queries to AdtDef in rustc_public to check for rust language types) - #166186 (OpenOptions::append: clarify docs) - #166216 (Stop using #![no_core] in profiler_builtins) - #166259 (fmt: Improve `Debug` for `FormattingOptions`) - #166263 (Show slice split results for empty and singleton slices)
…uwer Rollup of 18 pull requests Successful merges: - #164878 (Don't require `extern "llvm-intrinsic"` return structs to be `#[repr(packed)]`) - #165008 (Support `NonNull` pointers as `asm!` input operands) - #165892 (`rustc_builtin_macros` cleanup, part 10) - #165930 (Add red-green mark when dumping dep graph. Show DefIds if available) - #166280 (std: also mark doctests with skip_unsupported_miri_tests) - #166295 (use `cfg!(overflow_checks)` in `overflow_checks` intrinsic instead of `cfg!(debug_assertions)`) - #164485 (Stabilize unchecked `nonzero_ops`) - #165618 (Implement RangeIntersect on core::range types) - #165782 (Make unsafe unknown diagnostic attributes an error again) - #165833 (Deallocate with the right provenance on Windows) - #165834 (Implement tidy alphabetical --bless on Windows) - #165889 (Fix docs of alloc fn: Allocator API stabilized) - #165923 (Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic) - #166012 (Added more queries to AdtDef in rustc_public to check for rust language types) - #166186 (OpenOptions::append: clarify docs) - #166216 (Stop using #![no_core] in profiler_builtins) - #166259 (fmt: Improve `Debug` for `FormattingOptions`) - #166263 (Show slice split results for empty and singleton slices)
Rollup merge of #165923 - beetrees:generic-simd-array-return, r=workingjubilee Don't load/store a LLVM aggregate type when returning an array from a generic SIMD intrinsic `codegen_intrinsic_call` already stores the result to the return place for non-ZST `BackendRepr::Memory` types, so there's no need to convert the LLVM integer to a LLVM array when it's going to get stored the same anyway. This PR also fixes the `llret_ty` passed to `generic_simd_intrinsic` to be `void` when the intrinsic returns nothing (i.e. when the Rust return type is a ZST) - this change is just to allow for future improvements elsewhere, as `llret_ty` is unused for intrinsics that don't return anything. r? @workingjubilee
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (0518f56): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression 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 -2.5%)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. Artifact size: 405.67 MiB -> 406.44 MiB (0.19%) |
|
perf triage:
@rustbot label: +perf-regression-triaged |
codegen_intrinsic_callalready stores the result to the return place for non-ZSTBackendRepr::Memorytypes, so there's no need to convert the LLVM integer to a LLVM array when it's going to get stored the same anyway. This PR also fixes thellret_typassed togeneric_simd_intrinsicto bevoidwhen the intrinsic returns nothing (i.e. when the Rust return type is a ZST) - this change is just to allow for future improvements elsewhere, asllret_tyis unused for intrinsics that don't return anything.r? @workingjubilee