Skip to content

Commit 8e942de

Browse files
committed
Address review comments
Signed-off-by: Konstantin S Bobrovsky <konstantin.s.bobrovsky@intel.com>
1 parent f154d32 commit 8e942de

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

clang/lib/Basic/Targets/SPIR.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ class LLVM_LIBRARY_VISIBILITY BaseSPIRTargetInfo : public TargetInfo {
130130
CallingConvCheckResult checkCallingConvention(CallingConv CC) const override {
131131
return (CC == CC_SpirFunction || CC == CC_OpenCLKernel ||
132132
// Permit CC_X86RegCall which is used to mark external functions
133-
// with
134-
// explicit simd or structure type arguments to pass them via
135-
// registers.
133+
// with explicit simd or structure type arguments to pass them via
134+
// registers.
136135
CC == CC_X86RegCall)
137136
? CCCR_OK
138137
: CCCR_Warning;
@@ -295,7 +294,7 @@ class LLVM_LIBRARY_VISIBILITY WindowsX86_64_SPIR64TargetInfo
295294
if (CC == CC_X86VectorCall || CC == CC_X86RegCall)
296295
// Permit CC_X86VectorCall which is used in Microsoft headers
297296
// Permit CC_X86RegCall which is used to mark external functions with
298-
// explicit simd or structure type arguments to pass them via registers.
297+
// explicit simd or structure type arguments to pass them via registers.
299298
return CCCR_OK;
300299
return (CC == CC_SpirFunction || CC == CC_OpenCLKernel) ? CCCR_OK
301300
: CCCR_Warning;

clang/test/CodeGenSYCL/regcall-cc-test.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ template SYCL_DEVICE C2 __regcall func<C2>(C2 x);
9191

9292
// === TEST CASE: multi-level nested structs with one primitive type element at
9393
// the bottom, and one - at the top. The nested struct at the top is expected to
94-
// get "unwraped" by the compiler evaporating to the single element at the
94+
// get "unwrapped" by the compiler evaporating to the single element at the
9595
// bottom.
9696

9797
struct A3 { char x; };
@@ -110,10 +110,9 @@ struct C3 { // unwrapped
110110
template SYCL_DEVICE C3 __regcall func<C3>(C3 x);
111111
// CHECK-DAG: define weak_odr x86_regcallcc i16 @_Z16__regcall3__funcI2C3ET_S1_(i16 %{{[0-9a-zA-Z_.]+}})
112112

113-
// === TEST CASE: multi-level nested structs with one primitive type element at
114-
// the bottom, and one - at the top. The nested struct at the top is expected to
115-
// get "unwraped" by the compiler evaporating to the single element at the
116-
// bottom.
113+
// === TEST CASE: multi-level nested structs with a pointer field at the top
114+
// level. 1 step-deep unwrapping for a function argument type and no unwrapping
115+
// for the return type is expected to happen.
117116

118117
struct A4 { char x; };
119118
struct B4 { A4 a; };

sycl/doc/extensions/experimental/sycl_ext_intel_esimd/sycl_ext_intel_esimd.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ For example, unwrapping `Y` defined as
542542
struct X { int x; };
543543
struct Y { X x; };
544544
```
545-
results in `i32`. Unwrapping `C4` defind as
545+
results in `i32`. Unwrapping `C4` defined as
546546
```cpp
547547
struct A4 { char x; };
548548
struct B4 { A4 a; };
@@ -564,9 +564,7 @@ the "unwrapped type set".
564564
* 1-2 bytes - short
565565
* 3-4 bytes - int
566566
* 5-8 bytes - array of 2 ints
567-
Floating point types are not merged. Structure field alignment rules can
568-
increase the calculated size compared to simple sum of `sizeof` of all the
569-
types. If the total size exceeds 8, then:
567+
If the total size exceeds 8, then:
570568
* a source parameter of this type is broken down into multiple parameters
571569
with types resulted from unwrapping
572570
* a source return value of this type keeps it (the type)

0 commit comments

Comments
 (0)