-
Notifications
You must be signed in to change notification settings - Fork 15.1k
RuntimeLibcalls: Make sure _Unwind_Resume entries are mutually exclusive #164195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeLibcalls: Make sure _Unwind_Resume entries are mutually exclusive #164195
Conversation
|
@llvm/pr-subscribers-llvm-ir Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/164195.diff 1 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index e853f427d532a..243b864ccf033 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -59,6 +59,11 @@ def ExceptionModelIsNotNone : RuntimeLibcallPredicate<
[{ExceptionModel != ExceptionHandling::None}]
>;
+def ExceptionModelHasUnwindResume : RuntimeLibcallPredicate<
+ [{ExceptionModel != ExceptionHandling::None &&
+ ExceptionModel != ExceptionHandling::SjLj}]
+>;
+
def ExceptionModelIsSjLj : RuntimeLibcallPredicate<
[{ExceptionModel == ExceptionHandling::SjLj}]
>;
@@ -1153,8 +1158,10 @@ def __ssp_canary_word : RuntimeLibcallImpl<STACK_CHECK_GUARD>;
//===----------------------------------------------------------------------===//
defvar ExceptionModelCalls = (add
- LibcallImpls<(add DefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add __cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add _Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add SjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
@@ -1396,8 +1403,10 @@ defset list<RuntimeLibcallImpl> WinArm64ECSjLjExceptionHandlingLibcalls = {
}
defvar ExceptionModelCallsArm64EC = (add
- LibcallImpls<(add WinArm64ECDefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add arm64ec___cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add arm64ec__Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
|
|
@llvm/pr-subscribers-backend-aarch64 Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/164195.diff 1 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index e853f427d532a..243b864ccf033 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -59,6 +59,11 @@ def ExceptionModelIsNotNone : RuntimeLibcallPredicate<
[{ExceptionModel != ExceptionHandling::None}]
>;
+def ExceptionModelHasUnwindResume : RuntimeLibcallPredicate<
+ [{ExceptionModel != ExceptionHandling::None &&
+ ExceptionModel != ExceptionHandling::SjLj}]
+>;
+
def ExceptionModelIsSjLj : RuntimeLibcallPredicate<
[{ExceptionModel == ExceptionHandling::SjLj}]
>;
@@ -1153,8 +1158,10 @@ def __ssp_canary_word : RuntimeLibcallImpl<STACK_CHECK_GUARD>;
//===----------------------------------------------------------------------===//
defvar ExceptionModelCalls = (add
- LibcallImpls<(add DefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add __cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add _Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add SjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
@@ -1396,8 +1403,10 @@ defset list<RuntimeLibcallImpl> WinArm64ECSjLjExceptionHandlingLibcalls = {
}
defvar ExceptionModelCallsArm64EC = (add
- LibcallImpls<(add WinArm64ECDefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add arm64ec___cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add arm64ec__Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
|
|
@llvm/pr-subscribers-backend-arm Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/164195.diff 1 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index e853f427d532a..243b864ccf033 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -59,6 +59,11 @@ def ExceptionModelIsNotNone : RuntimeLibcallPredicate<
[{ExceptionModel != ExceptionHandling::None}]
>;
+def ExceptionModelHasUnwindResume : RuntimeLibcallPredicate<
+ [{ExceptionModel != ExceptionHandling::None &&
+ ExceptionModel != ExceptionHandling::SjLj}]
+>;
+
def ExceptionModelIsSjLj : RuntimeLibcallPredicate<
[{ExceptionModel == ExceptionHandling::SjLj}]
>;
@@ -1153,8 +1158,10 @@ def __ssp_canary_word : RuntimeLibcallImpl<STACK_CHECK_GUARD>;
//===----------------------------------------------------------------------===//
defvar ExceptionModelCalls = (add
- LibcallImpls<(add DefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add __cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add _Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add SjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
@@ -1396,8 +1403,10 @@ defset list<RuntimeLibcallImpl> WinArm64ECSjLjExceptionHandlingLibcalls = {
}
defvar ExceptionModelCallsArm64EC = (add
- LibcallImpls<(add WinArm64ECDefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add arm64ec___cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add arm64ec__Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
|
|
@llvm/pr-subscribers-backend-x86 Author: Matt Arsenault (arsenm) ChangesFull diff: https://github.com/llvm/llvm-project/pull/164195.diff 1 Files Affected:
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td
index e853f427d532a..243b864ccf033 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.td
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.td
@@ -59,6 +59,11 @@ def ExceptionModelIsNotNone : RuntimeLibcallPredicate<
[{ExceptionModel != ExceptionHandling::None}]
>;
+def ExceptionModelHasUnwindResume : RuntimeLibcallPredicate<
+ [{ExceptionModel != ExceptionHandling::None &&
+ ExceptionModel != ExceptionHandling::SjLj}]
+>;
+
def ExceptionModelIsSjLj : RuntimeLibcallPredicate<
[{ExceptionModel == ExceptionHandling::SjLj}]
>;
@@ -1153,8 +1158,10 @@ def __ssp_canary_word : RuntimeLibcallImpl<STACK_CHECK_GUARD>;
//===----------------------------------------------------------------------===//
defvar ExceptionModelCalls = (add
- LibcallImpls<(add DefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add __cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add _Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add SjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
@@ -1396,8 +1403,10 @@ defset list<RuntimeLibcallImpl> WinArm64ECSjLjExceptionHandlingLibcalls = {
}
defvar ExceptionModelCallsArm64EC = (add
- LibcallImpls<(add WinArm64ECDefaultExceptionHandlingLibcalls),
+ LibcallImpls<(add arm64ec___cxa_end_cleanup),
ExceptionModelIsNotNone>,
+ LibcallImpls<(add arm64ec__Unwind_Resume),
+ ExceptionModelHasUnwindResume>,
LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls),
ExceptionModelIsSjLj>
);
|
69a5b22 to
71b7a3e
Compare
8876a86 to
5c5fa40
Compare
|
ping |
|
The git diff here shows things that I believe belong to earlier merged patches it seems, can you update it so that it shows the relevant bits only? As for the change in the last commit - it looks trivial, but I'm not really familiar enough with tablegen at all to be able to confidently say what it does, unfortunately. So I can either give a "if you say so, it's probably right" review, or just defer to someone else. |
71b7a3e to
66d3765
Compare
|
Should |
|
Also, |
No, it's still being used for the duplication for the arm64ec case |
I don't particularly like NFC tags, this is a minor functionality change it's just not easily observable |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/24552 Here is the relevant piece of the build log for the reference |

No description provided.