-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang]Add support for -moutline-atomics and -mno-outline-atomics (#7…
…8755) This adds the support to add the target-feature to outline atomic operations (calling the runtime library instead).
- Loading branch information
1 parent
bc6370a
commit 992d852
Showing
9 changed files
with
73 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,15 @@ | ||
! Test that flang-new forwards the -moutline-atomics and -mno-outline-atomics. | ||
! RUN: %flang -moutline-atomics --target=aarch64-none-none -### %s -o %t 2>&1 | FileCheck %s | ||
! CHECK: "-target-feature" "+outline-atomics" | ||
|
||
! RUN: %flang -mno-outline-atomics --target=aarch64-none-none -### %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-NOOUTLINE | ||
! CHECK-NOOUTLINE: "-target-feature" "-outline-atomics" | ||
|
||
! Use Fuchsia to ensure the outline atomics is enabled. | ||
! RUN: %flang --target=aarch64-none-fuchsia -### %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT | ||
! CHECK-DEFAULT: "-target-feature" "+outline-atomics" | ||
|
||
! RUN: %flang -mno-outline-atomics --target=x86-none-none -### %s -o %t 2>&1 | FileCheck %s --check-prefix=CHECK-ERRMSG | ||
! CHECK-ERRMSG: warning: 'x86' does not support '-mno-outline-atomics' | ||
|
||
|
This file contains 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 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 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,18 @@ | ||
! RUN: %flang -S -emit-llvm --target=aarch64-none-none -moutline-atomics -o - %s | FileCheck %s --check-prefixes=CHECKON,CHECKALL | ||
! RUN: %flang -S -emit-llvm --target=aarch64-none-none -mno-outline-atomics -o - %s | FileCheck %s --check-prefixes=CHECKOFF,CHECKALL | ||
! REQUIRES: aarch64-registered-target | ||
|
||
subroutine test() | ||
integer :: i | ||
|
||
do i = 1, 10 | ||
end do | ||
end subroutine | ||
|
||
! CHECKALL-LABEL: define void @test_() | ||
! CHECKALL-SAME: #[[ATTR:[0-9]*]] | ||
! CHECKALL: attributes #[[ATTR]] = | ||
! Use CHECK-SAME to allow arbitrary other attributes to be present. | ||
! CHECKALL-SAME: target-features | ||
! CHECKON-SAME: +outline-atomics | ||
! CHECKOFF-SAME: -outline-atomics |