Skip to content

Commit 8de48a1

Browse files
ViacheslavRbsys_zuul
authored andcommitted
Support for -ze L0 options:
-ze-opt-disable -ze-opt-greater-than-4GB-buffer-required -ze-opt-has-buffer-offset-arg Change-Id: I66f23f71aa28147776dee9f02b0d05a94fbd2d00
1 parent 3c718c0 commit 8de48a1

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

IGC/Compiler/CodeGenPublic.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,11 +1183,13 @@ namespace IGC
11831183
Use32BitPtrArith = true;
11841184
}
11851185

1186-
if (strstr(options, "-intel-greater-than-4GB-buffer-required"))
1186+
if (strstr(options, "-intel-greater-than-4GB-buffer-required") ||
1187+
strstr(options, "-opt-greater-than-4GB-buffer-required"))
11871188
{
11881189
IntelGreaterThan4GBBufferRequired = true;
11891190
}
1190-
else if (strstr(options, "-intel-has-buffer-offset-arg"))
1191+
else if (strstr(options, "-intel-has-buffer-offset-arg") ||
1192+
strstr(options, "-opt-has-buffer-offset-arg"))
11911193
{
11921194
IntelHasBufferOffsetArg = true;
11931195
}

IGC/Compiler/SPIRMetaDataTranslation.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,9 @@ bool SPIRMetaDataTranslation::runOnModule(Module& M)
343343
for (; coi != coe; ++coi)
344344
{
345345
std::string co = *coi;
346-
// Compiler options that originate from OpenCL are represented by the same name, without the "-cl" prefix.
347-
if (co.find("-cl") == 0)
346+
// Compiler options that originate from OpenCL/L0 are represented by the same name, without the "-cl"/"-ze" prefixes.
347+
// L0 supports only "-opt-disable" from the options below
348+
if (co.find("-cl") == 0 || co.find("-ze") == 0)
348349
{
349350
co.erase(0, 3);
350351
}

IGC/OCLFE/igd_fcl_mcl/source/clang_tb.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,7 @@ namespace TC
13311331
(strcmp(pParam, "-cl-denorms-are-zero") == 0) ||
13321332
(strcmp(pParam, "-cl-fp32-correctly-rounded-divide-sqrt") == 0) ||
13331333
(strcmp(pParam, "-cl-opt-disable") == 0) ||
1334+
(strcmp(pParam, "-ze-opt-disable") == 0) ||
13341335
(strcmp(pParam, "-cl-strict-aliasing") == 0) ||
13351336
(strcmp(pParam, "-cl-mad-enable") == 0) ||
13361337
(strcmp(pParam, "-cl-no-signed-zeros") == 0) ||
@@ -1356,6 +1357,10 @@ namespace TC
13561357
(strcmp(pParam, "-dwarf-column-info") == 0) ||
13571358
(strcmp(pParam, "-cl-intel-no-prera-scheduling") == 0) || //temporary options
13581359
(strcmp(pParam, "-igc_opts") == 0) || //temporary options
1360+
(strcmp(pParam, "-cl-intel-greater-than-4GB-buffer-required") == 0) || //temporary options
1361+
(strcmp(pParam, "-ze-opt-greater-than-4GB-buffer-required") == 0) || //temporary options
1362+
(strcmp(pParam, "-cl-intel-has-buffer-offset-arg") == 0) || //temporary options
1363+
(strcmp(pParam, "-ze-opt-has-buffer-offset-arg") == 0) || //temporary options
13591364
(strcmp(pParam, "-cl-intel-debug-info") == 0) ||
13601365
(strncmp(pParam, "-dump-opt-llvm", 14) == 0) ||
13611366
(strcmp(pParam, "-cl-no-subgroup-ifp") == 0) ||

0 commit comments

Comments
 (0)