-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes #116391
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
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
90daf9c
[clang][SME] Ignore flatten for callees mismatched streaming attributes
MacDue cbbe039
Add note to `TargetInfo.h`
MacDue fdfc161
Also handle `[[clang::always_inline]]` statement attributes
MacDue a1c59ac
Fixups
MacDue a3e10e3
Fixups
MacDue 9b439cd
Tweak enum
MacDue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -target-feature +sme %s -o - | FileCheck %s | ||
|
|
||
| // REQUIRES: aarch64-registered-target | ||
|
|
||
| extern void was_inlined(void); | ||
|
|
||
| #define __flatten __attribute__((flatten)) | ||
| void fn(void) { was_inlined(); } | ||
| void fn_streaming_compatible(void) __arm_streaming_compatible { was_inlined(); } | ||
| void fn_streaming(void) __arm_streaming { was_inlined(); } | ||
| __arm_locally_streaming void fn_locally_streaming(void) { was_inlined(); } | ||
| __arm_new("za") void fn_streaming_new_za(void) __arm_streaming { was_inlined(); } | ||
|
|
||
| __flatten | ||
| void caller(void) { | ||
| fn(); | ||
| fn_streaming_compatible(); | ||
| fn_streaming(); | ||
| fn_locally_streaming(); | ||
| fn_streaming_new_za(); | ||
| } | ||
| // CHECK-LABEL: void @caller() | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @fn_streaming | ||
| // CHECK-NEXT: call void @fn_locally_streaming | ||
| // CHECK-NEXT: call void @fn_streaming_new_za | ||
|
|
||
| __flatten void caller_streaming_compatible(void) __arm_streaming_compatible { | ||
| fn(); | ||
| fn_streaming_compatible(); | ||
| fn_streaming(); | ||
| fn_locally_streaming(); | ||
| fn_streaming_new_za(); | ||
| } | ||
| // CHECK-LABEL: void @caller_streaming_compatible() | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: call void @fn | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @fn_streaming | ||
| // CHECK-NEXT: call void @fn_locally_streaming | ||
| // CHECK-NEXT: call void @fn_streaming_new_za | ||
|
|
||
| __flatten void caller_streaming(void) __arm_streaming { | ||
| fn(); | ||
| fn_streaming_compatible(); | ||
| fn_streaming(); | ||
| fn_locally_streaming(); | ||
| fn_streaming_new_za(); | ||
| } | ||
| // CHECK-LABEL: void @caller_streaming() | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: call void @fn | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @fn_streaming_new_za | ||
|
|
||
| __flatten __arm_locally_streaming | ||
| void caller_locally_streaming(void) { | ||
| fn(); | ||
| fn_streaming_compatible(); | ||
| fn_streaming(); | ||
| fn_locally_streaming(); | ||
| fn_streaming_new_za(); | ||
| } | ||
| // CHECK-LABEL: void @caller_locally_streaming() | ||
| // CHECK-NEXT: entry: | ||
| // CHECK-NEXT: call void @fn | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @was_inlined | ||
| // CHECK-NEXT: call void @fn_streaming_new_za |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.