Skip to content

Consider creating a ranged version of CORINFO_HELP_ASSIGN_BYREF #8627

Closed
@AndyAyersMS

Description

@AndyAyersMS

We often see numerous back to back calls to this helper that could be trivially turned into one call with a count. For instance:

;; System.TupleExtensions:CreateLong(ref,ref,ref,ref,ref,ref,ref,ref):struct
       mov      rdi, rbx
       lea      rsi, bword ptr [rbp-68H]
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF
       call     CORINFO_HELP_ASSIGN_BYREF

Each call does a series of range checks, a write, a card table update, and src/dest pointer updates, so there is a lot of overhead here that could be reduced via ranged version.

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

Metadata

Metadata

Assignees

Labels

JitUntriagedCLR JIT issues needing additional triagearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additionsoptimizationtenet-performancePerformance related issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions