[all-commits] [llvm/llvm-project] f13bea: [AArch64][SVE] Preserve full vector regs over EH e...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Wed Sep 2 02:55:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f13beac51be02cae21bce465206a920ecdca7566
      https://github.com/llvm/llvm-project/commit/f13beac51be02cae21bce465206a920ecdca7566
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2020-09-02 (Wed, 02 Sep 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetRegisterInfo.h
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/LiveIntervals.cpp
    M llvm/lib/CodeGen/MIRParser/MIRParser.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
    M llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
    M llvm/lib/Target/AArch64/AArch64RegisterInfo.h
    A llvm/test/CodeGen/AArch64/unwind-preserved-from-mir.mir
    A llvm/test/CodeGen/AArch64/unwind-preserved.ll

  Log Message:
  -----------
  [AArch64][SVE] Preserve full vector regs over EH edge.

Unwinders may only preserve the lower 64bits of Neon and SVE registers,
as only the registers in the base ABI are guaranteed to be preserved
over the exception edge. The caller will need to preserve additional
registers for when the call throws an exception and the unwinder has
tried to recover state.

For  e.g.

    svint32_t bar(svint32_t);
    svint32_t foo(svint32_t x, bool *err) {
      try { bar(x); } catch (...) { *err = true; }
      return x;
    }

`z0` needs to be spilled before the call to `bar(x)` and reloaded before
returning from foo, as the exception handler may have clobbered z0.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D84737




More information about the All-commits mailing list