[all-commits] [llvm/llvm-project] d79fff: [SystemZ] Add backchain target-feature (#71668)

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Wed Nov 8 06:06:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d79fff0abb5a8ae6f49f5e3fd4f31d65717c7a37
      https://github.com/llvm/llvm-project/commit/d79fff0abb5a8ae6f49f5e3fd4f31d65717c7a37
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2023-11-08 (Wed, 08 Nov 2023)

  Changed paths:
    A clang/test/CodeGen/SystemZ/mbackchain-4.c
    M llvm/lib/Target/SystemZ/SystemZFeatures.td
    M llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
    M llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp

  Log Message:
  -----------
  [SystemZ] Add backchain target-feature (#71668)

GCC supports building individual functions with backchain using the
__attribute__((target("backchain"))) syntax, and Clang should too.

Clang translates this into the "target-features"="+backchain" attribute,
and the -mbackchain command-line option into the "backchain" attribute.
The backend currently checks only the latter; furthermore, the backchain
target feature is not defined.

Handle backchain like soft-float. Define a target feature, convert
function attribute into it in getSubtargetImpl(), and check for target
feature instead of function attribute everywhere. Add an end-to-end test
to the Clang testsuite.




More information about the All-commits mailing list