Skip to content

Evaluate JIT_MemCpy without overlap check #6701

Open

Description

@helloguo

The current implementation of JIT_MemCpy on x64 Windows checks for address overlap and different paths are taken depending on result. However, ECMA-335 mentions "The behavior of cpblk is unspecified if the source and destination areas overlap". An optimized version without overlap check may be worth evaluating and implementing. dotnet/coreclr#7198

category:cq
theme:helpers
skill-level:expert
cost:medium

Activity

  1. transferred this issue fromdotnet/coreclron Jan 31, 2020
  2. added this to the Future milestone on Jan 31, 2020
  3. TIHan commented on Nov 1, 2023

    @TIHan
    Contributor

    Comment regarding the overlapping buffers:

            ; Use memmove to handle overlapping buffers for better
            ; compatibility with .NET Framework. Needing to handle
            ; overlapping buffers in cpblk is undefined by the spec.

    It might be worth evaluating? Hard to tell, but keeping this as future.

  4. removed
    JitUntriagedCLR JIT issues needing additional triage
    on Nov 1, 2023
  5. EgorBo commented on Mar 16, 2024

    @EgorBo
    Member

    Closed by #98623

  6. EgorBo commented on Mar 16, 2024

    @EgorBo
    Member

    Ah, sorry, it's a different issue. Although, I don't think we'll remove the overlap check

  7. reopened this on Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionstenet-performancePerformance related issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions