Skip to content

Commit 150a471

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 4097156: disable RemoveUnusedIdImplicitArguments by default
Disable RemoveUnusedIdImplicitArguments implicit args optimization by default on all platforms.
1 parent 086e79f commit 150a471

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

IGC/Compiler/CISACodeGen/helper.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3584,7 +3584,17 @@ bool AllowRemovingUnusedImplicitArguments(const CodeGenContext* ctx)
35843584
if (value != TriboolFlag::Default)
35853585
return value == TriboolFlag::Enabled;
35863586

3587-
return false;
3587+
if (!ctx->platform.supportsZEBin())
3588+
return false;
3589+
3590+
if (ctx->type == ShaderType::OPENCL_SHADER)
3591+
{
3592+
auto* OCLCtx = static_cast<const OpenCLProgramContext*>(ctx);
3593+
if (OCLCtx->m_InternalOptions.PromoteStatelessToBindless && OCLCtx->m_InternalOptions.UseBindlessLegacyMode)
3594+
return false;
3595+
}
3596+
3597+
return ctx->platform.isCoreChildOf(IGFX_XE_HP_CORE);
35883598
}
35893599

35903600
} // namespace IGC

IGC/ocloc_tests/features/constant_buffer/noinline.cl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT
1111
// Verify that implicit kernel arguments are not removed for kernels with subroutines.
1212
// Arguments can be removed for stackcalls.
1313

14-
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=0, ShortImplicitPayloadHeader=1, RemoveUnusedIdImplicitArguments=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-SUBROUTINE
15-
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=1, ShortImplicitPayloadHeader=1, RemoveUnusedIdImplicitArguments=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-STACKCALL
14+
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=0, ShortImplicitPayloadHeader=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-SUBROUTINE
15+
// RUN: ocloc compile -file %s -device pvc -options "-cl-std=CL2.0 -igc_opts 'EnableStackCallFuncCall=1, ShortImplicitPayloadHeader=1, DumpZEInfoToConsole=1'" 2>&1 | FileCheck %s --check-prefix=CHECK-STACKCALL
1616

1717
// CHECK-SUBROUTINE: name: kernel_that_must_have_args
1818
// CHECK-SUBROUTINE: payload_arguments:

0 commit comments

Comments
 (0)