-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" #100991
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
Merged
sdesmalen-arm
merged 1 commit into
main
from
revert-100740-sme-demote-always-inline-error
Jul 29, 2024
Merged
Revert "[Clang] Demote always_inline error to warning for mismatching SME attrs" #100991
sdesmalen-arm
merged 1 commit into
main
from
revert-100740-sme-demote-always-inline-error
Jul 29, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… SME att…" This reverts commit 5430f73.
@llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) ChangesReverts llvm/llvm-project#100740 Full diff: https://github.com/llvm/llvm-project/pull/100991.diff 3 Files Affected:
diff --git a/clang/include/clang/Basic/DiagnosticFrontendKinds.td b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
index 8a1462c670d68..12a4617c64d87 100644
--- a/clang/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/clang/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -288,9 +288,6 @@ def err_function_needs_feature : Error<
let CategoryName = "Codegen ABI Check" in {
def err_function_always_inline_attribute_mismatch : Error<
"always_inline function %1 and its caller %0 have mismatching %2 attributes">;
-def warn_function_always_inline_attribute_mismatch : Warning<
- "always_inline function %1 and its caller %0 have mismatching %2 attributes, "
- "inlining may change runtime behaviour">, InGroup<AArch64SMEAttributes>;
def err_function_always_inline_new_za : Error<
"always_inline function %0 has new za state">;
diff --git a/clang/lib/CodeGen/Targets/AArch64.cpp b/clang/lib/CodeGen/Targets/AArch64.cpp
index 1dec3cd40ebd2..b9df54b0c67c4 100644
--- a/clang/lib/CodeGen/Targets/AArch64.cpp
+++ b/clang/lib/CodeGen/Targets/AArch64.cpp
@@ -883,10 +883,8 @@ void AArch64TargetCodeGenInfo::checkFunctionCallABIStreaming(
if (!CalleeIsStreamingCompatible &&
(CallerIsStreaming != CalleeIsStreaming || CallerIsStreamingCompatible))
- CGM.getDiags().Report(
- CallLoc, CalleeIsStreaming
- ? diag::err_function_always_inline_attribute_mismatch
- : diag::warn_function_always_inline_attribute_mismatch)
+ CGM.getDiags().Report(CallLoc,
+ diag::err_function_always_inline_attribute_mismatch)
<< Caller->getDeclName() << Callee->getDeclName() << "streaming";
if (auto *NewAttr = Callee->getAttr<ArmNewAttr>())
if (NewAttr->isNewZA())
diff --git a/clang/test/CodeGen/aarch64-sme-inline-streaming-attrs.c b/clang/test/CodeGen/aarch64-sme-inline-streaming-attrs.c
index 98370a888ac6c..25aebeced9379 100644
--- a/clang/test/CodeGen/aarch64-sme-inline-streaming-attrs.c
+++ b/clang/test/CodeGen/aarch64-sme-inline-streaming-attrs.c
@@ -20,7 +20,7 @@ void caller(void) {
#ifdef TEST_COMPATIBLE
void caller_compatible(void) __arm_streaming_compatible {
- inlined_fn(); // expected-warning {{always_inline function 'inlined_fn' and its caller 'caller_compatible' have mismatching streaming attributes, inlining may change runtime behaviour}}
+ inlined_fn(); // expected-error {{always_inline function 'inlined_fn' and its caller 'caller_compatible' have mismatching streaming attributes}}
inlined_fn_streaming_compatible();
inlined_fn_streaming(); // expected-error {{always_inline function 'inlined_fn_streaming' and its caller 'caller_compatible' have mismatching streaming attributes}}
inlined_fn_local(); // expected-error {{always_inline function 'inlined_fn_local' and its caller 'caller_compatible' have mismatching streaming attributes}}
@@ -29,7 +29,7 @@ void caller_compatible(void) __arm_streaming_compatible {
#ifdef TEST_STREAMING
void caller_streaming(void) __arm_streaming {
- inlined_fn(); // expected-warning {{always_inline function 'inlined_fn' and its caller 'caller_streaming' have mismatching streaming attributes, inlining may change runtime behaviour}}
+ inlined_fn(); // expected-error {{always_inline function 'inlined_fn' and its caller 'caller_streaming' have mismatching streaming attributes}}
inlined_fn_streaming_compatible();
inlined_fn_streaming();
inlined_fn_local();
@@ -39,7 +39,7 @@ void caller_streaming(void) __arm_streaming {
#ifdef TEST_LOCALLY
__arm_locally_streaming
void caller_local(void) {
- inlined_fn(); // expected-warning {{always_inline function 'inlined_fn' and its caller 'caller_local' have mismatching streaming attributes, inlining may change runtime behaviour}}
+ inlined_fn(); // expected-error {{always_inline function 'inlined_fn' and its caller 'caller_local' have mismatching streaming attributes}}
inlined_fn_streaming_compatible();
inlined_fn_streaming();
inlined_fn_local();
|
sdesmalen-arm
added a commit
to sdesmalen-arm/llvm-project
that referenced
this pull request
Jul 29, 2024
…g SME attrs" (llvm#100991) Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was because we've demoted the error to a warning, which then resulted in a different error message, because Clang can't actually CodeGen the IR.
sdesmalen-arm
added a commit
that referenced
this pull request
Jul 29, 2024
…g SME attrs" (#100991) (#100996) Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was because we've demoted the error to a warning, which then resulted in a different error message, because Clang can't actually CodeGen the IR.
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jul 31, 2024
…g SME attrs" (llvm#100991) (llvm#100996) Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was because we've demoted the error to a warning, which then resulted in a different error message, because Clang can't actually CodeGen the IR. (cherry picked from commit 389679d)
tru
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Aug 4, 2024
…g SME attrs" (llvm#100991) (llvm#100996) Test `aarch64-sme-inline-streaming-attrs.c` caused some buildbot failures, because the test was missing a `REQUIRES: aarch64-registered target`. This was because we've demoted the error to a warning, which then resulted in a different error message, because Clang can't actually CodeGen the IR. (cherry picked from commit 389679d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backend:AArch64
clang:codegen
IR generation bugs: mangling, exceptions, etc.
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
clang
Clang issues not falling into any other category
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #100740