Skip to content

Commit 6fa9be6

Browse files
jaladreipsigcbot
authored andcommitted
Explicitly mark the lifetime start of the payload in the coalescing engine.
Explicitly mark the lifetime start of the payload in the coalescing engine.
1 parent eda6ff7 commit 6fa9be6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

IGC/Compiler/CISACodeGen/CoalescingEngine.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,10 @@ namespace IGC
12481248
outProgram->GetContext()->platform.getGRFSize() == 64 ? EALIGN_32WORD : EALIGN_HWORD,
12491249
"CEExplicitPayload");
12501250

1251+
// insert explicit lifetime start in case some of the operands are undefs
1252+
// otherwise, VISA will see the variable as not fully initialized and will extend the lifetime all the way to the beginning of the kernel
1253+
encoder->Lifetime(VISAVarLifetime::LIFETIME_START, payload);
1254+
12511255
for (uint i = 0; i < numOperands; i++)
12521256
{
12531257
Value* val = m_PayloadMapping.GetPayloadElementToValueMapping(inst, i);

0 commit comments

Comments
 (0)