Skip to content

Commit b0ed3e0

Browse files
mmereckiigcbot
authored andcommitted
Add DriverInfo flag to disable hoisting of convergent instructions
Add a knob to force adding`GenIntrinsicsTTI` to codegen passes.
1 parent 8a46432 commit b0ed3e0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

IGC/Compiler/CISACodeGen/DriverInfo.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ namespace IGC
370370
// Informs if LSC immediate global offset for A32 is supported
371371
virtual bool supportsLSCImmediateGlobalBaseOffsetForA32() const { return true; }
372372

373+
// If enabled IGC must not hoist convergent instructions.
374+
virtual bool DisableConvergentInstructionsHoisting() const { return false; }
375+
373376
protected:
374377
bool autoGRFSelection = false;
375378
};

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,11 @@ void AddLegalizationPasses(CodeGenContext& ctx, IGCPassManager& mpm, PSSignature
397397
ctx.m_instrTypes.hasUnmaskedRegion) {
398398
IGC_SET_FLAG_VALUE(allowLICM, false);
399399
}
400-
401-
if (IGC_IS_FLAG_ENABLED(ForceAllPrivateMemoryToSLM) ||
400+
bool disableConvergentInstructionsHoisting =
401+
ctx.m_DriverInfo.DisableConvergentInstructionsHoisting() &&
402+
ctx.m_instrTypes.numWaveIntrinsics > 0;
403+
if (disableConvergentInstructionsHoisting ||
404+
IGC_IS_FLAG_ENABLED(ForceAllPrivateMemoryToSLM) ||
402405
IGC_IS_FLAG_ENABLED(ForcePrivateMemoryToSLMOnBuffers))
403406
{
404407
DummyPass* dummypass = new DummyPass();

0 commit comments

Comments
 (0)