@@ -300,7 +300,7 @@ void DebugInfoPass::EmitDebugInfo(bool finalize, DbgDecoder* decodedDbg,
300300
301301
302302// Mark privateBase aka ImplicitArg::PRIVATE_BASE as Output for debugging
303- void DebugInfoData::markOutputPrivateBase (CShader* pShader, IDebugEmitter* pDebugEmitter )
303+ void DebugInfoData::markOutputPrivateBase (CShader* pShader)
304304{
305305 IGC_ASSERT_MESSAGE (IGC_IS_FLAG_ENABLED (UseOffsetInLocation), " UseOffsetInLocation not enabled" );
306306
@@ -309,9 +309,6 @@ void DebugInfoData::markOutputPrivateBase(CShader* pShader, IDebugEmitter* pDebu
309309 CVariable* pVar = pShader->GetPrivateBase ();
310310 if (pVar)
311311 {
312- // cache privateBase as it may be destroyed if subroutine
313- // is emitted.
314- pDebugEmitter->getCurrentVISA ()->setPrivateBaseReg (pVar);
315312 pShader->GetEncoder ().GetVISAKernel ()->AddAttributeToVar (pVar->visaGenVariable [0 ], " Output" , 0 , nullptr );
316313 if (pShader->m_dispatchSize == SIMDMode::SIMD32 && pVar->visaGenVariable [1 ])
317314 {
@@ -380,14 +377,7 @@ void DebugInfoData::markOutput(llvm::Function& F, CShader* pShader, IDebugEmitte
380377 // Per Thread Offset non-debug instruction must have 'Output' attribute
381378 // added in the function to be called.
382379 markOutputVar (pShader, pDebugEmitter, &pInst, " perThreadOffset" );
383- if (F.getCallingConv () == CallingConv::SPIR_KERNEL)
384- {
385- markOutputPrivateBase (pShader, pDebugEmitter); // Mark privateBase aka ImplicitArg::PRIVATE_BASE as Output for debugging
386- }
387- else
388- {
389- // TODO: Apply privateBase of kernel to SPIR_FUNC if its a subroutine
390- }
380+ markOutputPrivateBase (pShader); // Mark privateBase aka ImplicitArg::PRIVATE_BASE as Output for debugging
391381 ScalarVisaModule* scVISAModule = (ScalarVisaModule*)visaModule;
392382 IGC_ASSERT_MESSAGE (scVISAModule->getPerThreadOffset ()==nullptr , " setPerThreadOffset was set earlier" );
393383 scVISAModule->setPerThreadOffset (&pInst);
0 commit comments