Skip to content

Reduce iteration over regmaskTP in relevant methods #113670

Closed

Description

@DeepakRajendrakumaran

My profiling shows among others 3 methods whose tpdiff spikes when we have more than 64 registers – processKills(), freeRegisters(), processBlockStartLocations(). These 3 iterate over a regMaskTP and modifies it. The idea here is to work on 2 regMaskSmalls separately instead of regMaskTP

Activity

  1. ghost added
    needs-area-label
    on Mar 18, 2025
  2. added
    untriaged
    on Mar 18, 2025
  3. added
    area-CodeGen-coreclr
    on Mar 20, 2025
  4. dotnet-policy-service commented on Mar 20, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
    See info in area-owners.md if you want to be subscribed.

  5. DeepakRajendrakumaran commented on Mar 20, 2025

    @DeepakRajendrakumaran
    ContributorAuthor

    PR merged : #112704

  6. removed
    needs-area-label
    on Mar 21, 2025
  7. DeepakRajendrakumaran commented on Mar 24, 2025

    @DeepakRajendrakumaran
    ContributorAuthor

    Improvement from this

    linux arm64

    Overall (-0.87% to -0.61%)
    Collection PDIFF
    benchmarks.run.linux.arm64.checked.mch -0.71%
    benchmarks.run_pgo.linux.arm64.checked.mch -0.75%
    benchmarks.run_tiered.linux.arm64.checked.mch -0.87%
    coreclr_tests.run.linux.arm64.checked.mch -0.78%
    libraries.crossgen2.linux.arm64.checked.mch -0.68%
    libraries.pmi.linux.arm64.checked.mch -0.67%
    libraries_tests.run.linux.arm64.Release.mch -0.80%
    libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch -0.61%
    realworld.run.linux.arm64.checked.mch -0.64%
    smoke_tests.nativeaot.linux.arm64.checked.mch -0.72%
    MinOpts (-1.39% to -0.88%)
    Collection PDIFF
    benchmarks.run.linux.arm64.checked.mch -0.99%
    benchmarks.run_pgo.linux.arm64.checked.mch -1.13%
    benchmarks.run_tiered.linux.arm64.checked.mch -1.12%
    coreclr_tests.run.linux.arm64.checked.mch -0.88%
    libraries.crossgen2.linux.arm64.checked.mch -0.89%
    libraries.pmi.linux.arm64.checked.mch -0.98%
    libraries_tests.run.linux.arm64.Release.mch -1.12%
    libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch -0.89%
    realworld.run.linux.arm64.checked.mch -1.25%
    smoke_tests.nativeaot.linux.arm64.checked.mch -1.39%
    FullOpts (-0.72% to -0.60%)
    Collection PDIFF
    benchmarks.run.linux.arm64.checked.mch -0.70%
    benchmarks.run_pgo.linux.arm64.checked.mch -0.71%
    benchmarks.run_tiered.linux.arm64.checked.mch -0.63%
    coreclr_tests.run.linux.arm64.checked.mch -0.71%
    libraries.crossgen2.linux.arm64.checked.mch -0.68%
    libraries.pmi.linux.arm64.checked.mch -0.67%
    libraries_tests.run.linux.arm64.Release.mch -0.70%
    libraries_tests_no_tiered_compilation.run.linux.arm64.Release.mch -0.60%
    realworld.run.linux.arm64.checked.mch -0.63%
    smoke_tests.nativeaot.linux.arm64.checked.mch -0.72%

    Local tests done:

    I added some temporary changes locally so that x64 has more than 64 registers and ran superpmi tpdiff with/without the optimization to simulate impact with more than 64 registers

    The results from local testing is below

    Overall (-0.66% to -0.47%)
    Collection PDIFF
    aspnet.run.windows.x64.checked.mch -0.66%
    benchmarks.run.windows.x64.checked.mch -0.51%
    benchmarks.run_pgo.windows.x64.checked.mch -0.64%
    benchmarks.run_pgo_optrepeat.windows.x64.checked.mch -0.51%
    benchmarks.run_tiered.windows.x64.checked.mch -0.59%
    coreclr_tests.run.windows.x64.checked.mch -0.63%
    libraries.crossgen2.windows.x64.checked.mch -0.49%
    libraries.pmi.windows.x64.checked.mch -0.57%
    libraries_tests.run.windows.x64.Release.mch -0.66%
    libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch -0.54%
    realworld.run.windows.x64.checked.mch -0.54%
    smoke_tests.nativeaot.windows.x64.checked.mch -0.47%
    MinOpts (-1.14% to -0.65%)
    Collection PDIFF
    aspnet.run.windows.x64.checked.mch -0.87%
    benchmarks.run.windows.x64.checked.mch -0.75%
    benchmarks.run_pgo.windows.x64.checked.mch -0.86%
    benchmarks.run_pgo_optrepeat.windows.x64.checked.mch -0.75%
    benchmarks.run_tiered.windows.x64.checked.mch -0.82%
    coreclr_tests.run.windows.x64.checked.mch -0.69%
    libraries.crossgen2.windows.x64.checked.mch -0.65%
    libraries.pmi.windows.x64.checked.mch -0.71%
    libraries_tests.run.windows.x64.Release.mch -0.92%
    libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch -0.75%
    realworld.run.windows.x64.checked.mch -1.14%
    smoke_tests.nativeaot.windows.x64.checked.mch -0.93%
    FullOpts (-0.62% to -0.43%)
    Collection PDIFF
    aspnet.run.windows.x64.checked.mch -0.62%
    benchmarks.run.windows.x64.checked.mch -0.51%
    benchmarks.run_pgo.windows.x64.checked.mch -0.60%
    benchmarks.run_pgo_optrepeat.windows.x64.checked.mch -0.51%
    benchmarks.run_tiered.windows.x64.checked.mch -0.43%
    coreclr_tests.run.windows.x64.checked.mch -0.59%
    libraries.crossgen2.windows.x64.checked.mch -0.49%
    libraries.pmi.windows.x64.checked.mch -0.57%
    libraries_tests.run.windows.x64.Release.mch -0.57%
    libraries_tests_no_tiered_compilation.run.windows.x64.Release.mch -0.53%
    realworld.run.windows.x64.checked.mch -0.53%
    smoke_tests.nativeaot.windows.x64.checked.mch -0.47%
  8. removed
    untriaged
    on Mar 24, 2025
  9. locked and limited conversation to collaborators on Apr 24, 2025
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-coreclr

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions