[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 07:54:12 PDT 2024


================
@@ -3768,6 +3768,12 @@ def err_conflicting_attributes_arm_state : Error<
   "conflicting attributes for state '%0'">;
 def err_sme_streaming_cannot_be_multiversioned : Error<
   "streaming function cannot be multi-versioned">;
+def err_sme_streaming_mode_change_no_sve : Error<
+  "function requires a streaming-mode change, unwinding is not possible without 'sve'. "
+  "Consider marking this function as 'noexcept' or '__attribute__((nothrow))'">;
----------------
sdesmalen-arm wrote:

It probably makes more sense to add a routine to compiler-rt that returns the value of VG if SVE is available, rather than emitting an error here. You can implement that function using the (already existing) interfaces for function-multiversioning to check if SVE is available at runtime. In that case, I think there is little value in having these Clang changes here.

@efriedma-quic are you happy going with that approach instead?

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


More information about the llvm-commits mailing list