Skip to content

Commit 9a7d7fc

Browse files
krystian-andrzejewskiigcbot
authored andcommitted
Add a compilation option to init regs
This change is to add a compilation option to init regs.
1 parent b0d8437 commit 9a7d7fc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4211,7 +4211,9 @@ void CEncoder::InitVISABuilderOptions(TARGET_PLATFORM VISAPlatform, bool canAbor
42114211
if (preserveR0) {
42124212
SaveOption(vISA_ReserveR0, true);
42134213
}
4214-
if (IGC_IS_FLAG_ENABLED(InitializeRegistersEnable)) {
4214+
bool initRegisters = context->getModuleMetaData()->compOpt.ZeroInitRegistersBeforeExecution ||
4215+
IGC_IS_FLAG_ENABLED(InitializeRegistersEnable);
4216+
if (initRegisters) {
42154217
SaveOption(vISA_InitPayload, true);
42164218
}
42174219
if (IGC_IS_FLAG_ENABLED(AvoidUsingR0R1)) {

IGC/common/MDFrameWork.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ enum class ShaderTypeMD
522522
unsigned DisableSamplerBackingByLSC = 0;
523523
bool UseLinearScanRA = false;
524524
bool DisableConvertingAtomicIAddToIncDec = false;
525+
bool ZeroInitRegistersBeforeExecution = false;
525526
};
526527

527528
enum class ThreadIDLayout

0 commit comments

Comments
 (0)