[all-commits] [llvm/llvm-project] ed8ef6: [stackmaps] Start legalizing live variable operands

Edd Barrett via All-commits all-commits at lists.llvm.org
Wed Jul 6 09:02:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed8ef65f3d9337aeb62366b9832f02f2fb3c9542
      https://github.com/llvm/llvm-project/commit/ed8ef65f3d9337aeb62366b9832f02f2fb3c9542
  Author: Edd Barrett <vext01 at gmail.com>
  Date:   2022-07-06 (Wed, 06 Jul 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/ISDOpcodes.h
    M llvm/include/llvm/CodeGen/SelectionDAGISel.h
    M llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    A llvm/test/CodeGen/X86/selectiondag-stackmap-legalize.ll

  Log Message:
  -----------
  [stackmaps] Start legalizing live variable operands

Prior to this change, live variable operands passed to
`llvm.experimental.stackmap` would be emitted directly to target nodes,
meaning that they don't get legalised. The upshot of this is that LLVM
may crash when encountering illegally typed target nodes.

e.g. https://github.com/llvm/llvm-project/issues/21657

This change introduces a platform independent stackmap DAG node whose
operands are legalised as per usual, thus avoiding aforementioned
crashes.

Note that some kinds of argument are still not handled properly, namely
vectors, structs, and large integers, like i128s. These will need to be
addressed in follow-up changes.

Note also that this does not change the behaviour of
`llvm.experimental.patchpoint`. A follow up change will do the same for
this intrinsic.

Differential review:
https://reviews.llvm.org/D125680




More information about the All-commits mailing list