[all-commits] [llvm/llvm-project] 3f3438: [CodeGen][X86] Crash fixes for "patchable-function...

sylvain-audi via All-commits all-commits at lists.llvm.org
Wed Nov 30 04:30:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f3438a596d4883ecd934fc725a9d5f620082c3b
      https://github.com/llvm/llvm-project/commit/3f3438a596d4883ecd934fc725a9d5f620082c3b
  Author: Sylvain Audi <sylvain.audi at ubisoft.com>
  Date:   2022-11-30 (Wed, 30 Nov 2022)

  Changed paths:
    M clang/lib/CodeGen/CodeGenFunction.cpp
    M llvm/include/llvm/Support/TargetOpcodes.def
    M llvm/lib/CodeGen/PatchableFunction.cpp
    M llvm/lib/Target/X86/X86MCInstLower.cpp
    A llvm/test/CodeGen/X86/patchable-prologue-debuginfo.ll
    M llvm/test/CodeGen/X86/patchable-prologue.ll

  Log Message:
  -----------
  [CodeGen][X86] Crash fixes for "patchable-function" pass

This patch fixes crashes related with how PatchableFunction selects the instruction to make patchable:
- Ensure PatchableFunction skips all instructions that don't generate actual machine instructions.
- Handle the case where the first MachineBasicBlock is empty
- Removed support for 16 bit x86 architectures.

Note: another issue remains related with PatchableFunction, in the lowering part.
See https://github.com/llvm/llvm-project/issues/59039

Differential Revision: https://reviews.llvm.org/D137642




More information about the All-commits mailing list