Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable fake hot/cold splitting on ARM64 #70708

Merged
merged 13 commits into from
Jun 22, 2022

Commits on May 27, 2022

  1. Configuration menu
    Copy the full SHA
    671c81a View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2022

  1. Implement branching between hot/cold sections on ARM64.

    - Remove NYIs/control flow preventing code splitting on ARM64.
    - Update emitter::emitIns_J() to keep jumps between hot/cold sections
    long.
    - Update emitter::emitOutputLJ() to emit long jumps for both
    conditional and unconditional branches between hot/cold sections, and
    report relocations to the runtime.
    - Update long ldr pseudoinstruction to instead use ld1 instruction
    when loading 16-byte constants into vector registers; ldr
    implementation temporarily loads the constant into a general integer
    register, which does not support 16-byte values.
    Aman Khalid committed Jun 2, 2022
    Configuration menu
    Copy the full SHA
    60ad816 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2022

  1. Implement branching between hot/cold sections on ARM64

    - Remove NYIs/control flow preventing code splitting on ARM64.
    - Update emitter::emitIns_J() to keep jumps between hot/cold sections
    long.
    - Update emitter::emitOutputLJ() to emit long jumps for both
    conditional and unconditional branches between hot/cold sections, and
    report relocations to the runtime.
    - Update long ldr pseudoinstruction to instead use ld1 instruction
    when loading 16-byte constants into vector registers; ldr
    implementation temporarily loads the constant into a general integer
    register, which does not support 16-byte values.
    Aman Khalid committed Jun 8, 2022
    Configuration menu
    Copy the full SHA
    7989a93 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Enable fake hot/cold splitting on ARM64

    This commit contains fixes for various bugs exposed by enabling fake
    hot/cold splitting on ARM64:
    - Branches between hot/cold sections are now always long.
    - The pseudoinstruction for loading a constant from the cold section
    did not support loading 16-byte data into vector registers, as it
    temporarily loaded the constant into an 8-byte integer register. Now,
    16-byte constants are loaded directly into vector registers via an
    `ld1` instruction.
    - Tests involving loading 16-byte constants exposed the data section
    is not always aligned to its largest constant. Now, the data section
    is always aligned to `emitConsDsc.alignment` when calling `eeAllocMem`.
    - Asserts/NYIs blocking hot/cold splitting on ARM64 have been removed.
    
    Fake hot/cold splitting requires we fake unwind info by treating each
    split function as one hot section. A more architecture-agnostic
    approach for this has been applied.
    Aman Khalid authored and amanasifkhalid committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    d2bbed8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    17b8c48 View commit details
    Browse the repository at this point in the history
  3. Enable fake hot/cold splitting on ARM64

    This commit contains fixes for various bugs exposed by enabling fake
    hot/cold splitting on ARM64:
    - Branches between hot/cold sections are now always long.
    - The pseudoinstruction for loading a constant from the cold section
    did not support loading 16-byte data into vector registers, as it
    temporarily loaded the constant into an 8-byte integer register. Now,
    16-byte constants are loaded directly into vector registers via an
    `ld1` instruction.
    - Tests involving loading 16-byte constants exposed the data section
    is not always aligned to its largest constant. Now, the data section
    is always aligned to `emitConsDsc.alignment` when calling `eeAllocMem`.
    - Asserts/NYIs blocking hot/cold splitting on ARM64 have been removed.
    
    Fake hot/cold splitting requires we fake unwind info by treating each
    split function as one hot section. A more architecture-agnostic
    approach for this has been applied.
    Aman Khalid committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    fb5b078 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'code-splitting-arm' of https://github.com/amanasifkhali…

    …d/runtime into code-splitting-arm
    Aman Khalid committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    0e7018e View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2022

  1. Fix regression in runtime-jit-experimental

    The newly-introduced `emitRemoveJumpToNextInst` optimization caused
    a regression when hot/cold-splitting, where jumps from the last hot
    instruction to the first cold instruction were erroneously removed.
    This is fixed by disabling the `isRemovableJmpCandidate` flag for
    branches between hot/cold sections.
    
    On an unrelated note, a JIT dump message has been added to indicate
    stress-splitting is occurring.
    Aman Khalid committed Jun 15, 2022
    Configuration menu
    Copy the full SHA
    b61a94a View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Merge branch 'hot-cold-splitting' of https://github.com/amanasifkhali…

    …d/runtime into code-splitting-arm
    Aman Khalid committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    d208b3a View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Update fake-splitting implementation on ARM64

    To facilitate generating unwind info, fake-splitting now places the
    read-only data section after the cold section. This allows the
    hot/cold code sections to be truly contiguous.
    Aman Khalid committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    8ed9046 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0493057 View commit details
    Browse the repository at this point in the history
  3. merge

    Aman Khalid committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    59dc5ed View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2022

  1. Disable hot/cold splitting on LoongArch64

    Aman Khalid committed Jun 22, 2022
    Configuration menu
    Copy the full SHA
    548b9a5 View commit details
    Browse the repository at this point in the history