Skip to content

Commit 6a87b2a

Browse files
Dimus77igcbot
authored andcommitted
Changes in code.
1 parent f54e89d commit 6a87b2a

File tree

4 files changed

+1
-46
lines changed

4 files changed

+1
-46
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,21 +2594,7 @@ namespace IGC
25942594

25952595
void CEncoder::AddrAdd(CVariable* dst, CVariable* src0, CVariable* src1)
25962596
{
2597-
// On ICL+ platforms address register must be initialized if it is used
2598-
// in VxH indirect addressing to avoid out-of-bounds access on inactive
2599-
// lanes. VISA initializes address register at the beginning of the
2600-
// shader which is sufficient for shaders that use address register only
2601-
// for indirect addressing but is not sufficient if shader also uses
2602-
// address register in send descriptors. The latter case is handled by
2603-
// the initialization below.
2604-
// see VISA Optimizer::resetA0()
2605-
const bool mayUseA0InSendDesc =
2606-
m_program->GetContext()->m_instrTypes.mayHaveIndirectResources;
2607-
const bool needsA0Reset =
2608-
m_program->m_Platform->NeedResetA0forVxHA0();
2609-
2610-
if (((mayUseA0InSendDesc && needsA0Reset) ||
2611-
IGC_IS_FLAG_ENABLED(InitializeAddressRegistersBeforeUse)) &&
2597+
if (IGC_IS_FLAG_ENABLED(InitializeAddressRegistersBeforeUse) &&
26122598
!dst->IsUniform() &&
26132599
!m_encoderState.m_noMask)
26142600
{

IGC/Compiler/CISACodeGen/CheckInstrTypes.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ CheckInstrTypes::CheckInstrTypes(IGC::SInstrTypes* instrList) : FunctionPass(ID)
9191
instrList->hasTypedRead = false;
9292
instrList->hasTypedwrite = false;
9393
instrList->mayHaveIndirectOperands = false;
94-
instrList->mayHaveIndirectResources = false;
9594
instrList->hasUniformAssumptions = false;
9695
instrList->hasWaveIntrinsics = false;
9796
instrList->numPsInputs = 0;
@@ -293,20 +292,6 @@ void CheckInstrTypes::visitCallInst(CallInst& C)
293292
default:
294293
break;
295294
}
296-
297-
Value* resourcePtr = GetBufferOperand(CI);
298-
if (resourcePtr == nullptr)
299-
{
300-
Value* samplerPtr = nullptr;
301-
getTextureAndSamplerOperands(CI, resourcePtr, samplerPtr);
302-
}
303-
if (resourcePtr &&
304-
resourcePtr->getType()->isPointerTy() &&
305-
isStatefulAddrSpace(resourcePtr->getType()->getPointerAddressSpace()) &&
306-
!IsDirectIdx(resourcePtr->getType()->getPointerAddressSpace()))
307-
{
308-
g_InstrTypes->mayHaveIndirectResources = true;
309-
}
310295
}
311296
}
312297

@@ -389,10 +374,6 @@ void CheckInstrTypes::visitLoadInst(LoadInst& I)
389374
{
390375
g_InstrTypes->hasStorageBufferLoad = true;
391376
}
392-
if (isStatefulAddrSpace(as) && !IsDirectIdx(as))
393-
{
394-
g_InstrTypes->mayHaveIndirectResources = true;
395-
}
396377
break;
397378
}
398379
}
@@ -425,10 +406,6 @@ void CheckInstrTypes::visitStoreInst(StoreInst& I)
425406
{
426407
g_InstrTypes->hasStorageBufferStore = true;
427408
}
428-
if (isStatefulAddrSpace(as) && !IsDirectIdx(as))
429-
{
430-
g_InstrTypes->mayHaveIndirectResources = true;
431-
}
432409
break;
433410
}
434411
}

IGC/Compiler/CISACodeGen/Platform.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,6 @@ bool HSUsesHWBarriers() const
279279
return (m_platformInfo.eRenderCoreFamily >= IGFX_GEN11_CORE);
280280
}
281281

282-
bool NeedResetA0forVxHA0() const
283-
{
284-
return (m_platformInfo.eRenderCoreFamily >= IGFX_GEN11_CORE);
285-
}
286-
287282
bool enableVertexReorderingPhase2() const
288283
{
289284
return (m_platformInfo.eRenderCoreFamily >= IGFX_GEN10_CORE);

IGC/Compiler/CodeGenPublic.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,6 @@ namespace IGC
263263
bool hasTypedRead;
264264
bool hasTypedwrite;
265265
bool mayHaveIndirectOperands; //<! true if code may have indirect operands like r5[a0].
266-
// true if shader may have indirect texture or buffer.
267-
// Note: does not check for indirect sampler
268-
bool mayHaveIndirectResources;
269266
bool hasUniformAssumptions;
270267
bool hasWaveIntrinsics;
271268
bool hasPullBary;

0 commit comments

Comments
 (0)