[llvm] Do not use R12 for indirect tail calls with PACBTI (PR #82661)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 02:12:22 PDT 2024


================
@@ -228,6 +228,10 @@ def DontGenExecuteOnly : Predicate<"!Subtarget->genExecuteOnly()">;
 def GenT1ExecuteOnly : Predicate<"Subtarget->genExecuteOnly() && "
                                  "Subtarget->isThumb1Only() && "
                                  "!Subtarget->hasV8MBaselineOps()">;
+let RecomputePerFunction = 1 in {
+  def TailCallNotR12 : Predicate<[{ MF->getInfo<ARMFunctionInfo>()->shouldSignReturnAddress(true) }]>;
+  def TailCall : Predicate<[{ !MF->getInfo<ARMFunctionInfo>()->shouldSignReturnAddress(true) }]>;
----------------
ostannard wrote:

This name isn't very descriptive, it doesn't affect the presence of tail-calls, just one detail of them. How about `TailCallAnyReg`, or describe the condition instead of the effect, like `SignRetAddr` and `NoSignRetAddr`?

https://github.com/llvm/llvm-project/pull/82661


More information about the llvm-commits mailing list