Skip to content

Commit d1403be

Browse files
fftzengsys_zuul
authored andcommitted
Allow small spills for PS SIMD8 and SIMD16
Change-Id: I16062b116e9c0bb680909f6c9a59e88a73fd9cbd
1 parent 62d5afa commit d1403be

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3701,7 +3701,11 @@ namespace IGC
37013701
{
37023702
// 2 means #spill/fill is roughly 1% of #inst
37033703
// ToDo: tune the threshold
3704-
SaveOption(vISA_AbortOnSpillThreshold, 2u);
3704+
if (m_program->m_dispatchSize == SIMDMode::SIMD8)
3705+
SaveOption(vISA_AbortOnSpillThreshold, IGC_GET_FLAG_VALUE(SIMD8_SpillThreshold) * 2);
3706+
3707+
else if (m_program->m_dispatchSize == SIMDMode::SIMD16)
3708+
SaveOption(vISA_AbortOnSpillThreshold, IGC_GET_FLAG_VALUE(SIMD16_SpillThreshold) * 2);
37053709
}
37063710
}
37073711

IGC/common/igc_flags.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ DECLARE_IGC_REGKEY(bool, EnableVISAPreSched, true, "Enable VISA Pre-
3131
DECLARE_IGC_REGKEY(DWORD, VISAPreSchedCtrl, 0, "Configure Pre-RA Scheduler, default(0), logging(1), latency(2), pressure(4)")
3232
DECLARE_IGC_REGKEY(bool, ForceVISAPreSched, false, "Force enabling of VISA Pre-RA Scheduler")
3333
DECLARE_IGC_REGKEY(DWORD, VISAPreSchedRPThreshold, 0, "Configure how aggressive pre-RA Scheduler is, 0 for the default")
34+
DECLARE_IGC_REGKEY(DWORD, SIMD8_SpillThreshold, 2, "Percentage of instructions allowed for spilling")
35+
DECLARE_IGC_REGKEY(DWORD, SIMD16_SpillThreshold, 2, "Percentage of instructions allowed for spilling")
3436
DECLARE_IGC_REGKEY(bool, DisableCSEL, false, "disable csel peep-hole")
3537
DECLARE_IGC_REGKEY(bool, DisableFlagOpt, false, "Disable optimization cmp with logic op")
3638
DECLARE_IGC_REGKEY(bool, DisableIfCvt, false, "Disable ifcvt")

0 commit comments

Comments
 (0)