Skip to content

Commit 8b7805c

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents 6ac330c + c5f2cd0 commit 8b7805c

File tree

63 files changed

+1463
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1463
-223
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,25 @@ for more information.
2424
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
2525
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
2626
- Prepare your patch
27-
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
28-
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
29-
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
30-
integrated into your workflow to ensure formatting and stylistic
31-
compliance of your changes.
32-
- use
33-
```
34-
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
35-
```
36-
to check the format of your current changes against the `origin/sycl`
37-
branch.
38-
- `-f` to also correct unstaged changes
39-
- `--diff` to only print the diff without applying
40-
- Build the project and run all tests.
41-
- complete test suite: `python buildbot/check.py`
42-
- sycl test suite `python buildbot/check.py -t test-sycl`
43-
- run only "mytest" test `python buildbot/check.py -t test-sycl-mytest`
44-
- if necessary, use `-o $LLVM_BUILD_DIR` to specify the llvm build directory
27+
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
28+
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
29+
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
30+
integrated into your workflow to ensure formatting and stylistic
31+
compliance of your changes.
32+
- use
33+
34+
```bash
35+
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
36+
```
37+
38+
to check the format of your current changes against the `origin/sycl`
39+
branch.
40+
- `-f` to also correct unstaged changes
41+
- `--diff` to only print the diff without applying
42+
- Build the project following
43+
[Get Started Guide instructions](sycl/doc/GetStartedGuide.md#build-dpc-toolchain).
44+
- Run regression tests -
45+
[instructions](sycl/doc/GetStartedGuide.md#test-dpc-toolchain).
4546

4647
### Commit message
4748

@@ -67,6 +68,7 @@ ready for merge.
6768
### Merge
6869

6970
Project maintainers merge pull requests using one of the following options:
71+
7072
- [Rebase and merge] The preferable choice for PRs containing a single commit
7173
- [Squash and merge] Used when there are multiple commits in the PR
7274
- Squashing is done to make sure that the project is buildable on any commit

buildbot/configure.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def do_configure(args):
3838
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
3939
sycl_build_pi_cuda = 'ON'
4040

41+
# replace not append, so ARM ^ X86
42+
if args.arm:
43+
llvm_targets_to_build = 'ARM;AArch64'
44+
4145
if args.no_werror:
4246
sycl_werror = 'OFF'
4347

@@ -128,6 +132,7 @@ def main():
128132
parser.add_argument("-t", "--build-type",
129133
metavar="BUILD_TYPE", default="Release", help="build type: Debug, Release")
130134
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
135+
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
131136
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
132137
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
133138
parser.add_argument("--system-ocl", action='store_true', help="use OpenCL deps from system (no download)")

buildbot/dependency.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,16 @@ fpga_driver_win=2020.10.7.0.15
3131
# NVidia CUDA driver
3232
# TODO provide URL for CUDA driver
3333
nvidia_gpu_driver_lin=435.21
34+
35+
[DEPS ROOT]
36+
ocl_cpu_root={DEPS_ROOT}/opencl/runtime/linux/oclcpu
37+
ocl_gpu_root={DEPS_ROOT}/opencl/runtime/linux/oclgpu
38+
fpga_root={ARCHIVE_ROOT}/comp/oclfpga/linux
39+
ocl_fpga_emu_root={DEPS_ROOT}/opencl/runtime/linux/oclfpgaemu
40+
tbb_root={DEPS_ROOT}/tbb/lin
41+
42+
ocl_cpu_root_win={DEPS_ROOT}/opencl/runtime/win/oclcpu
43+
ocl_gpu_root_win=
44+
fpga_root_win={ARCHIVE_ROOT}/comp/oclfpga/win
45+
ocl_fpga_emu_root_win={DEPS_ROOT}/opencl/runtime/win/oclfpgaemu
46+
tbb_root_win={DEPS_ROOT}/tbb/win

buildbot/linux.vrd

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# For TBB
2+
:eadb LD_LIBRARY_PATH={TBBROOT}/{TBBVER}/lib/intel64/gcc4.8
3+
4+
# For CPU
5+
:eadb LD_LIBRARY_PATH={OCLCPUROOT}/{OCLCPUVER}/intel64_lin
6+
:eadb OCL_ICD_FILENAMES={OCLCPUROOT}/{OCLCPUVER}/intel64_lin/libintelocl.so
7+
8+
# For GPU
9+
:eade LD_LIBRARY_PATH={OCLGPUROOT}/{OCLGPUVER}
10+
:eade PATH={OCLGPUROOT}/{OCLGPUVER}
11+
:eade OCL_ICD_FILENAMES={OCLGPUROOT}/{OCLGPUVER}/libigdrcl.so
12+
13+
# For FPGA
14+
:eadb PATH={OCLFPGAROOT}/{OCLFPGAVER}/build/bin
15+
16+
# For FPGA EMU
17+
:eadb LD_LIBRARY_PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}
18+
:eadb LD_LIBRARY_PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intel64_lin
19+
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/bin
20+
:eadb OCL_ICD_FILENAMES={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/libintelocl_emu.so
21+
22+
# For Compiler
23+
:eadb PATH={COMP_ROOT}/bin
24+
:eadb LD_LIBRARY_PATH={COMP_ROOT}/lib
25+
:eadb PATH={COMP_ROOT}/install/bin
26+
:eadb LD_LIBRARY_PATH={COMP_ROOT}/install/lib

buildbot/windows.vrd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# For TBB
2+
:eadb PATH={TBBROOT}/{TBBVER}/redist/intel64/vc14
3+
:eadb LIB={TBBROOT}/{TBBVER}/lib/intel64/vc14
4+
:eadb INCLUDE={TBBROOT}/{TBBVER}/include
5+
:eadb CPATH={TBBROOT}/{TBBVER}/include
6+
7+
# For CPU
8+
:eadb PATH={OCLCPUROOT}/{OCLCPUVER}/intel64_win
9+
:eadb OCL_ICD_FILENAMES={OCLCPUROOT}/{OCLCPUVER}/intel64_win/intelocl64.dll
10+
11+
# For FPGA
12+
:eadb PATH={OCLFPGAROOT}/{OCLFPGAVER}/build/bin
13+
14+
# For FPGA EMU
15+
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/bin
16+
:eadb PATH={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intel64_win
17+
:eadb OCL_ICD_FILENAMES={OCLFPGAEMUROOT}/{OCLFPGAEMUVER}/intelocl64_emu.dll
18+
19+
# For Compiler
20+
:eadb PATH={COMP_ROOT}/bin
21+
:eadb PATH={COMP_ROOT}/lib
22+
:eadb PATH={COMP_ROOT}/install/bin
23+
:eadb PATH={COMP_ROOT}/install/lib

clang/include/clang/Basic/LangOptions.def

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ LANGOPT(SYCLVersion , 32, 0, "Version of the SYCL standard used")
252252
LANGOPT(DeclareSPIRVBuiltins, 1, 0, "Declare SPIR-V builtin functions")
253253
LANGOPT(SYCLExplicitSIMD , 1, 0, "SYCL compilation with explicit SIMD extension")
254254
LANGOPT(EnableDAEInSpirKernels , 1, 0, "Enable Dead Argument Elimination in SPIR kernels")
255+
LANGOPT(
256+
SYCLValueFitInMaxInt, 1, 0,
257+
"SYCL compiler assumes value fits within MAX_INT for member function of "
258+
"get/operator[], get_id/operator[] and get_global_id/get_global_linear_id "
259+
"in SYCL class id, iterm and nd_iterm")
255260

256261
LANGOPT(HIPUseNewLaunchAPI, 1, 0, "Use new kernel launching API for HIP")
257262

clang/include/clang/Driver/Options.td

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1881,6 +1881,12 @@ def fsycl_device_code_split_EQ : Joined<["-"], "fsycl-device-code-split=">,
18811881
def fsycl_device_code_split : Flag<["-"], "fsycl-device-code-split">, Alias<fsycl_device_code_split_EQ>,
18821882
AliasArgs<["per_source"]>, Flags<[CC1Option, CoreOption]>,
18831883
HelpText<"Perform SYCL device code split in the per_source mode i.e. create a device code module for each source (translation unit)">;
1884+
def fsycl_id_queries_fit_in_int : Flag<["-"], "fsycl-id-queries-fit-in-int">,
1885+
Flags<[CC1Option, CoreOption]>, HelpText<"Assume that SYCL ID queries fit "
1886+
"within MAX_INT.">;
1887+
def fno_sycl_id_queries_fit_in_int : Flag<["-"], "fno-sycl-id-queries-fit-in-int">,
1888+
Flags<[CC1Option, CoreOption]>, HelpText<"Do not assume that SYCL ID queries "
1889+
"fit within MAX_INT.">;
18841890
def fsycl_use_bitcode : Flag<["-"], "fsycl-use-bitcode">,
18851891
Flags<[CC1Option, CoreOption]>, HelpText<"Use LLVM bitcode instead of SPIR-V in fat objects">;
18861892
def fno_sycl_use_bitcode : Flag<["-"], "fno-sycl-use-bitcode">,
@@ -3544,7 +3550,7 @@ def fsycl_esimd : Flag<["-"], "fsycl-explicit-simd">, Group<sycl_Group>, Flags<[
35443550
HelpText<"Enable SYCL explicit SIMD extension">;
35453551
def fno_sycl_esimd : Flag<["-"], "fno-sycl-explicit-simd">, Group<sycl_Group>,
35463552
HelpText<"Disable SYCL explicit SIMD extension">, Flags<[NoArgumentUnused, CoreOption]>;
3547-
defm sycl_std_optimizations : OptOutFFlag<"sycl-std-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler">;
3553+
defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler">;
35483554

35493555
//===----------------------------------------------------------------------===//
35503556
// CC1 Options

clang/lib/Driver/Driver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4080,7 +4080,8 @@ class OffloadingActionBuilder final {
40804080
A->claim();
40814081
auto ParsedArg = Opts.ParseOneArg(Args, Index);
40824082
// TODO: Support --no-cuda-gpu-arch, --{,no-}cuda-gpu-arch=all.
4083-
if (ParsedArg->getOption().matches(options::OPT_offload_arch_EQ)) {
4083+
if (ParsedArg &&
4084+
ParsedArg->getOption().matches(options::OPT_offload_arch_EQ)) {
40844085
ParsedArg->claim();
40854086
GpuArchList.push_back(StringToCudaArch(ParsedArg->getValue(0)));
40864087
}

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4113,9 +4113,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
41134113
false))
41144114
CmdArgs.push_back("-fsycl-explicit-simd");
41154115

4116-
if (!Args.hasFlag(options::OPT_fsycl_std_optimizations,
4117-
options::OPT_fno_sycl_std_optimizations, true))
4118-
CmdArgs.push_back("-fno-sycl-std-optimizations");
4116+
if (!Args.hasFlag(options::OPT_fsycl_early_optimizations,
4117+
options::OPT_fno_sycl_early_optimizations, true))
4118+
CmdArgs.push_back("-fno-sycl-early-optimizations");
41194119
else if (RawTriple.isSPIR()) {
41204120
// Set `sycl-opt` option to configure LLVM passes for SPIR target
41214121
CmdArgs.push_back("-mllvm");
@@ -4157,6 +4157,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
41574157
CmdArgs.push_back("-Wno-sycl-strict");
41584158
}
41594159
}
4160+
if (IsSYCL || UseSYCLTriple) {
4161+
// Set options for both host and device
4162+
if (Arg *A = Args.getLastArg(options::OPT_fsycl_id_queries_fit_in_int,
4163+
options::OPT_fno_sycl_id_queries_fit_in_int))
4164+
A->render(Args, CmdArgs);
4165+
}
41604166

41614167
if (IsSYCL) {
41624168
if (SYCLStdArg) {

clang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
824824
Opts.DisableLLVMPasses =
825825
Args.hasArg(OPT_disable_llvm_passes) ||
826826
(Args.hasArg(OPT_fsycl_is_device) && Triple.isSPIR() &&
827-
Args.hasArg(OPT_fno_sycl_std_optimizations) && !IsSyclESIMD);
827+
Args.hasArg(OPT_fno_sycl_early_optimizations) && !IsSyclESIMD);
828828
Opts.DisableLifetimeMarkers = Args.hasArg(OPT_disable_lifetimemarkers);
829829

830830
const llvm::Triple::ArchType DebugEntryValueArchs[] = {
@@ -2597,6 +2597,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
25972597
}
25982598
Opts.SYCLExplicitSIMD = Args.hasArg(options::OPT_fsycl_esimd);
25992599
Opts.EnableDAEInSpirKernels = Args.hasArg(options::OPT_fenable_sycl_dae);
2600+
Opts.SYCLValueFitInMaxInt =
2601+
Args.hasFlag(options::OPT_fsycl_id_queries_fit_in_int,
2602+
options::OPT_fno_sycl_id_queries_fit_in_int, false);
26002603
}
26012604

26022605
Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header);

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
465465
// SYCL Version is set to a value when building SYCL applications
466466
if (LangOpts.SYCLVersion == 2017)
467467
Builder.defineMacro("CL_SYCL_LANGUAGE_VERSION", "121");
468+
if (LangOpts.SYCLValueFitInMaxInt)
469+
Builder.defineMacro("__SYCL_ID_QUERIES_FIT_IN_INT__", "1");
468470
}
469471

470472
if (LangOpts.DeclareSPIRVBuiltins) {

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 78 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,8 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
12101210
// Holds the last handled field's first parameter. This doesn't store an
12111211
// iterator as push_back invalidates iterators.
12121212
size_t LastParamIndex = 0;
1213+
// Keeps track of whether we are currently handling fields inside a struct.
1214+
int StructDepth = 0;
12131215

12141216
void addParam(const FieldDecl *FD, QualType FieldTy) {
12151217
const ConstantArrayType *CAT =
@@ -1362,6 +1364,16 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
13621364
SemaRef.addSyclDeviceDecl(KernelDecl);
13631365
}
13641366

1367+
bool enterStruct(const CXXRecordDecl *, FieldDecl *) final {
1368+
++StructDepth;
1369+
return true;
1370+
}
1371+
1372+
bool leaveStruct(const CXXRecordDecl *, FieldDecl *) final {
1373+
--StructDepth;
1374+
return true;
1375+
}
1376+
13651377
bool handleSyclAccessorType(const CXXBaseSpecifier &BS,
13661378
QualType FieldTy) final {
13671379
const auto *RecordDecl = FieldTy->getAsCXXRecordDecl();
@@ -1390,6 +1402,22 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
13901402
return handleSpecialType(FD, FieldTy);
13911403
}
13921404

1405+
RecordDecl *wrapField(FieldDecl *Field, QualType FieldTy) {
1406+
RecordDecl *WrapperClass =
1407+
SemaRef.getASTContext().buildImplicitRecord("__wrapper_class");
1408+
WrapperClass->startDefinition();
1409+
Field = FieldDecl::Create(
1410+
SemaRef.getASTContext(), WrapperClass, SourceLocation(),
1411+
SourceLocation(), /*Id=*/nullptr, FieldTy,
1412+
SemaRef.getASTContext().getTrivialTypeSourceInfo(FieldTy,
1413+
SourceLocation()),
1414+
/*BW=*/nullptr, /*Mutable=*/false, /*InitStyle=*/ICIS_NoInit);
1415+
Field->setAccess(AS_public);
1416+
WrapperClass->addDecl(Field);
1417+
WrapperClass->completeDefinition();
1418+
return WrapperClass;
1419+
};
1420+
13931421
bool handlePointerType(FieldDecl *FD, QualType FieldTy) final {
13941422
// USM allows to use raw pointers instead of buffers/accessors, but these
13951423
// pointers point to the specially allocated memory. For pointer fields we
@@ -1405,6 +1433,17 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
14051433
PointeeTy = SemaRef.getASTContext().getQualifiedType(
14061434
PointeeTy.getUnqualifiedType(), Quals);
14071435
QualType ModTy = SemaRef.getASTContext().getPointerType(PointeeTy);
1436+
// When the kernel is generated, struct type kernel arguments are
1437+
// decomposed; i.e. the parameters of the kernel are the fields of the
1438+
// struct, and not the struct itself. This causes an error in the backend
1439+
// when the struct field is a pointer, since non-USM pointers cannot be
1440+
// passed directly. To work around this issue, all pointers inside the
1441+
// struct are wrapped in a generated '__wrapper_class'.
1442+
if (StructDepth) {
1443+
RecordDecl *WrappedPointer = wrapField(FD, ModTy);
1444+
ModTy = SemaRef.getASTContext().getRecordType(WrappedPointer);
1445+
}
1446+
14081447
addParam(FD, ModTy);
14091448
return true;
14101449
}
@@ -1440,6 +1479,9 @@ class SyclKernelDeclCreator : public SyclKernelFieldHandler {
14401479
}
14411480
using SyclKernelFieldHandler::handleSyclHalfType;
14421481
using SyclKernelFieldHandler::handleSyclSamplerType;
1482+
// Required to handle pointers inside structs
1483+
using SyclKernelFieldHandler::enterStruct;
1484+
using SyclKernelFieldHandler::leaveStruct;
14431485
};
14441486

14451487
class SyclKernelBodyCreator : public SyclKernelFieldHandler {
@@ -1530,12 +1572,26 @@ class SyclKernelBodyCreator : public SyclKernelFieldHandler {
15301572
QualType ParamType = KernelParameter->getOriginalType();
15311573
Expr *DRE = SemaRef.BuildDeclRefExpr(KernelParameter, ParamType, VK_LValue,
15321574
SourceLocation());
1533-
if (FD->getType()->isPointerType() &&
1534-
FD->getType()->getPointeeType().getAddressSpace() !=
1535-
ParamType->getPointeeType().getAddressSpace())
1536-
DRE = ImplicitCastExpr::Create(SemaRef.Context, FD->getType(),
1537-
CK_AddressSpaceConversion, DRE, nullptr,
1538-
VK_RValue);
1575+
1576+
if (FD->getType()->isPointerType()) {
1577+
QualType ModifiedType = ParamType;
1578+
// Struct Type kernel arguments are decomposed. The pointer fields are
1579+
// then wrapped inside a compiler generated struct. Therefore when
1580+
// generating the initializers, we have to 'unwrap' the pointer.
1581+
if (MemberExprBases.size() > 2) {
1582+
CXXRecordDecl *WrapperStruct = ParamType->getAsCXXRecordDecl();
1583+
// Pointer field wrapped inside __wrapper_class
1584+
FieldDecl *Pointer = *(WrapperStruct->field_begin());
1585+
DRE = BuildMemberExpr(DRE, Pointer);
1586+
ModifiedType = Pointer->getType();
1587+
}
1588+
1589+
if (FD->getType()->getPointeeType().getAddressSpace() !=
1590+
ModifiedType->getPointeeType().getAddressSpace())
1591+
DRE = ImplicitCastExpr::Create(SemaRef.Context, FD->getType(),
1592+
CK_AddressSpaceConversion, DRE, nullptr,
1593+
VK_RValue);
1594+
}
15391595
return DRE;
15401596
}
15411597

@@ -1867,6 +1923,7 @@ class SyclKernelBodyCreator : public SyclKernelFieldHandler {
18671923
class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
18681924
SYCLIntegrationHeader &Header;
18691925
int64_t CurOffset = 0;
1926+
int StructDepth = 0;
18701927

18711928
void addParam(const FieldDecl *FD, QualType ArgTy,
18721929
SYCLIntegrationHeader::kernel_param_kind_t Kind) {
@@ -1944,7 +2001,9 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
19442001
}
19452002

19462003
bool handlePointerType(FieldDecl *FD, QualType FieldTy) final {
1947-
addParam(FD, FieldTy, SYCLIntegrationHeader::kind_pointer);
2004+
addParam(FD, FieldTy,
2005+
((StructDepth) ? SYCLIntegrationHeader::kind_std_layout
2006+
: SYCLIntegrationHeader::kind_pointer));
19482007
return true;
19492008
}
19502009

@@ -1970,6 +2029,16 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
19702029
return true;
19712030
}
19722031

2032+
bool enterStruct(const CXXRecordDecl *, FieldDecl *) final {
2033+
++StructDepth;
2034+
return true;
2035+
}
2036+
2037+
bool leaveStruct(const CXXRecordDecl *, FieldDecl *) final {
2038+
--StructDepth;
2039+
return true;
2040+
}
2041+
19732042
bool enterField(const CXXRecordDecl *RD, FieldDecl *FD) final {
19742043
CurOffset += SemaRef.getASTContext().getFieldOffset(FD) / 8;
19752044
return true;
@@ -2010,8 +2079,10 @@ class SyclKernelIntHeaderCreator : public SyclKernelFieldHandler {
20102079
CurOffset -= ArraySize;
20112080
return true;
20122081
}
2082+
using SyclKernelFieldHandler::enterStruct;
20132083
using SyclKernelFieldHandler::handleSyclHalfType;
20142084
using SyclKernelFieldHandler::handleSyclSamplerType;
2085+
using SyclKernelFieldHandler::leaveStruct;
20152086
};
20162087

20172088
} // namespace

0 commit comments

Comments
 (0)