[PATCH] D84737: [AArch64][SVE] Preserve SVE regs when callee may throw an exception.

Richard Sandiford via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 04:41:33 PDT 2020


rsandifo-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4710
+    if (const CallBase *CB = CLI.CB)
+      CallNeedsUnwinding = isa<InvokeInst>(CB) && !CB->doesNotThrow();
+    if (!CallNeedsUnwinding && (CalleeInSVE || CalleeOutSVE))
----------------
Like we talked about off-list:
  - it might be better to drop the `doesNotThrow` check.  We should only have an `InvokedInst` if the call can “return” to a known landing pad.
  - It might be better to do this by adding clobbers at the start of the landing pad instead, a bit like the existing `getBeginClobberMask`.  That would also handle the corresponding problem for `aarch64_vector_pcs` functions and would mean that normal returns weren't penalised by the exceptional case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84737/new/

https://reviews.llvm.org/D84737



More information about the llvm-commits mailing list