forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/sycl' into postcommit_abi
* upstream/sycl: [SYCL] Fix broken build after introduction USM to ocl headers (intel#1852) [SYCL][ESIMD] Implement "private globals" (file scope private vars) in FE (intel#1756) [SYCL] Introduce interop handle for host task (intel#1747)
- Loading branch information
Showing
19 changed files
with
324 additions
and
199 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
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,14 @@ | ||
// RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice \ | ||
// RUN: -fsycl -fsycl-is-device -fsycl-explicit-simd -emit-llvm %s -o - | \ | ||
// RUN: FileCheck %s | ||
|
||
// This test checks that FE allows globals with register_num attribute in ESIMD mode. | ||
|
||
__attribute__((opencl_private)) __attribute__((register_num(17))) int vc; | ||
// CHECK: @vc = {{.+}} i32 0, align 4 #0 | ||
|
||
SYCL_EXTERNAL void init_vc(int x) { | ||
vc = x; | ||
// CHECK: store i32 %0, i32* @vc | ||
} | ||
// CHECK: attributes #0 = { "genx_byte_offset"="17" "genx_volatile" } |
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: %clang_cc1 -fsycl -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -verify -pedantic %s | ||
|
||
// no error expected | ||
__attribute__((opencl_private)) __attribute__((register_num(17))) int privGlob; | ||
|
||
// expected-error@+1{{'register_num' attribute takes one argument}} | ||
__attribute__((opencl_private)) __attribute__((register_num())) int privGlob1; | ||
|
||
// expected-error@+1{{'register_num' attribute takes one argument}} | ||
__attribute__((opencl_private)) __attribute__((register_num(10, 11))) int privGlob2; | ||
|
||
// expected-error@+1{{SYCL explicit SIMD does not permit private global variable to have an initializer}} | ||
__attribute__((opencl_private)) int privGlob3 = 10; | ||
|
||
void foo() { | ||
// expected-warning@+1{{'register_num' attribute only applies to global variables}} | ||
__attribute__((register_num(17))) int privLoc; | ||
} |
Oops, something went wrong.