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

[CodeGen][X86] Fix lowering of tailcalls when -ms-hotpatch is used #77245

Merged
merged 4 commits into from
Jan 22, 2024

Commits on Jan 7, 2024

  1. [CodeGen][X86] Fix lowering of tailcalls when -ms-hotpatch is used

    Previously, tail jump pseudo-opcodes were skipped by the `encodeInstruction()` call inside `X86AsmPrinter::LowerPATCHABLE_OP`. This caused emission of a 2-byte NOP and dropping of the tail jump
    
    Also, the `PatchableFunction` pass didn't properly update the call site info for the existing MachineInstr, after wrapping it into a `TargetOpcode::PATCHABLE_OP`.
    aganea committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    06d10b8 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2024

  1. Change how "patchable-function"="prologue-short-redirect"works.

    Instead of `PATCHABLE_OP` wrapping the first `MachineInstr`, it now inserts itself before it, leaving the instruction unaltered. At lowering time in `X86AsmPrinter`, we now "look ahead" for the next non-pseudo `MachineInstr` and lower+encode it, to inspect its size. If the size is below what `PATCHABLE_OP` expects, it inserts NOPs; otherwise it does nothing
    aganea committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    7ef9c22 View commit details
    Browse the repository at this point in the history
  2. Documentation.

    aganea committed Jan 10, 2024
    Configuration menu
    Copy the full SHA
    f83ecee View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2024

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