Skip to content

Commit c80f561

Browse files
tmparkigcbot
authored andcommitted
Update the analysis for kernel trimming and combine boolean variables
Update the analysis for kernel trimming and combine boolean variables
1 parent 279349c commit c80f561

File tree

4 files changed

+575
-400
lines changed

4 files changed

+575
-400
lines changed

IGC/AdaptorCommon/ProcessFuncAttributes.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,12 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
581581
SetNoInline(F);
582582
}
583583

584+
if (IGC_IS_FLAG_ENABLED(PartitionUnit) && efs.isStackCallAssigned(F))
585+
{
586+
F->addFnAttr("visaStackCall");
587+
SetNoInline(F);
588+
}
589+
584590
if (!F->hasFnAttribute(llvm::Attribute::NoInline) &&
585591
IGC_IS_FLAG_DISABLED(DisableAddingAlwaysAttribute))
586592
{
@@ -600,7 +606,7 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
600606
}
601607
if (shouldAlwaysInline)
602608
{
603-
if (IGC_IS_FLAG_ENABLED(ControlKernelTotalSize) &&
609+
if ((IGC_IS_FLAG_ENABLED(ControlKernelTotalSize) || IGC_IS_FLAG_ENABLED(ControlUnitSize)) &&
604610
efs.shouldEnableSubroutine() &&
605611
efs.isTrimmedFunction(F))
606612
{

0 commit comments

Comments
 (0)