Files
clang-p2996/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
Ilya Leoshkevich d79fff0abb [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.
2023-11-08 15:05:47 +01:00

12 KiB