-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '26095fd01232061de9f79decb3e8222ef7b46191' into HEAD [#29]
Incorporate the original commit 26095fd "Ensure :VAR_MAP and :FUNC_MAP are output in order", and add a test case.
- Loading branch information
Showing
4 changed files
with
116 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Based on offloading-compilation artifact 'a.xnvptx-none.mkoffload.s' of <https://gcc.gnu.org/PR100059> "[OpenMP] wrong code with 'declare target link' and a scalar variable". | ||
// BEGIN PREAMBLE | ||
.version 3.1 | ||
.target sm_35 | ||
.address_size 64 | ||
// END PREAMBLE | ||
// BEGIN GLOBAL FUNCTION DECL: update | ||
.visible .func update; | ||
// BEGIN FUNCTION DECL: main$_omp_fn$0$impl | ||
.func main$_omp_fn$0$impl (.param .u64 %in_ar0); | ||
//:FUNC_MAP "main$_omp_fn$0" | ||
//:VAR_MAP "i$linkptr" | ||
// BEGIN GLOBAL VAR DEF: i$linkptr | ||
.visible .global .align 8 .u64 i$linkptr[1]; | ||
//:VAR_MAP "b$linkptr" | ||
// BEGIN GLOBAL VAR DEF: b$linkptr | ||
.visible .global .align 8 .u64 b$linkptr[1]; | ||
//:VAR_MAP "c$linkptr" | ||
// BEGIN GLOBAL VAR DEF: c$linkptr | ||
.visible .global .align 8 .u64 c$linkptr[1]; | ||
//:VAR_MAP "a$linkptr" | ||
// BEGIN GLOBAL VAR DEF: a$linkptr | ||
.visible .global .align 8 .u64 a$linkptr[1]; | ||
// BEGIN GLOBAL FUNCTION DECL: gomp_nvptx_main | ||
.extern .func gomp_nvptx_main (.param .u64 %in_ar1, .param .u64 %in_ar2); | ||
// BEGIN GLOBAL VAR DECL: __nvptx_stacks | ||
.extern .shared .u64 __nvptx_stacks[32]; | ||
// BEGIN GLOBAL VAR DECL: __nvptx_uni | ||
.extern .shared .u32 __nvptx_uni[32]; | ||
// BEGIN GLOBAL FUNCTION DEF: update | ||
.visible .func update | ||
{ | ||
// [...] | ||
} | ||
.visible .entry main$_omp_fn$0 (.param .u64 %arg, .param .u64 %stack, .param .u64 %sz) | ||
{ | ||
// [...] | ||
} | ||
// BEGIN FUNCTION DEF: main$_omp_fn$0$impl | ||
.func main$_omp_fn$0$impl (.param .u64 %in_ar0) | ||
{ | ||
// [...] | ||
} |
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,57 @@ | ||
// Based on offloading-compilation artifact 'a.xnvptx-none.mkoffload.s' of <https://gcc.gnu.org/PR100059> "[OpenMP] wrong code with 'declare target link' and a scalar variable". | ||
|
||
// BEGIN PREAMBLE | ||
.version 3.1 | ||
.target sm_35 | ||
.address_size 64 | ||
// END PREAMBLE | ||
|
||
|
||
// BEGIN GLOBAL FUNCTION DECL: update | ||
.visible .func update; | ||
|
||
// BEGIN GLOBAL FUNCTION DEF: update | ||
.visible .func update | ||
{ | ||
// [...] | ||
} | ||
.visible .entry main$_omp_fn$0 (.param.u64 %arg, .param.u64 %stack, .param.u64 %sz) | ||
{ | ||
// [...] | ||
} | ||
|
||
// BEGIN FUNCTION DECL: main$_omp_fn$0$impl | ||
.func main$_omp_fn$0$impl (.param.u64 %in_ar0); | ||
|
||
// BEGIN FUNCTION DEF: main$_omp_fn$0$impl | ||
.func main$_omp_fn$0$impl (.param.u64 %in_ar0) | ||
{ | ||
// [...] | ||
} | ||
//:FUNC_MAP "main$_omp_fn$0" | ||
//:VAR_MAP "i$linkptr" | ||
|
||
|
||
// BEGIN GLOBAL VAR DEF: i$linkptr | ||
.visible .global .align 8 .u64 i$linkptr[1]; | ||
//:VAR_MAP "b$linkptr" | ||
|
||
// BEGIN GLOBAL VAR DEF: b$linkptr | ||
.visible .global .align 8 .u64 b$linkptr[1]; | ||
//:VAR_MAP "c$linkptr" | ||
|
||
// BEGIN GLOBAL VAR DEF: c$linkptr | ||
.visible .global .align 8 .u64 c$linkptr[1]; | ||
//:VAR_MAP "a$linkptr" | ||
|
||
// BEGIN GLOBAL VAR DEF: a$linkptr | ||
.visible .global .align 8 .u64 a$linkptr[1]; | ||
|
||
// BEGIN GLOBAL FUNCTION DECL: gomp_nvptx_main | ||
.extern .func gomp_nvptx_main (.param.u64 %in_ar1, .param.u64 %in_ar2); | ||
|
||
// BEGIN GLOBAL VAR DECL: __nvptx_stacks | ||
.extern .shared .u64 __nvptx_stacks[32]; | ||
|
||
// BEGIN GLOBAL VAR DECL: __nvptx_uni | ||
.extern .shared .u32 __nvptx_uni[32]; |
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,5 @@ | ||
<https://github.com/MentorEmbedded/nvptx-tools/pull/29> "Ensure :VAR_MAP and :FUNC_MAP are output in order" | ||
<https://gcc.gnu.org/PR100059> "[OpenMP] wrong code with 'declare target link' and a scalar variable" | ||
|
||
RUN: %target_as_cmd --no-verify %S/order-1.s -o %t | ||
RUN: cmp %S/order-1.o.golden %t |