Skip to content

Commit febe87f

Browse files
jgu222gfxbot
authored andcommitted
Make sure that builtin with noinline (if any) is not affected
by this change at all. This is meant for user functions Change-Id: Idd366a68c9dd69c6823a1f691a950259a75bc11c
1 parent 2385cad commit febe87f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

IGC/Compiler/CISACodeGen/EstimateFunctionSize.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ void EstimateFunctionSize::checkSubroutine() {
309309
{
310310
for (Function& F : *M)
311311
{
312-
if (F.hasFnAttribute(llvm::Attribute::NoInline)) {
312+
if (F.hasFnAttribute(llvm::Attribute::NoInline) &&
313+
!F.hasFnAttribute(llvm::Attribute::Builtin)) {
313314
EnableSubroutine = true;
314315
break;
315316
}

IGC/common/igc_flags.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ DECLARE_IGC_REGKEY(bool, ForceDisableSrc0Alpha, false, "Force the compile
266266
DECLARE_IGC_REGKEY(bool, EnableLTO, true, "Enable link time optimization")
267267
DECLARE_IGC_REGKEY(bool, EnableLTODebug, false, "Enable debug information for LTO")
268268
DECLARE_IGC_REGKEY(DWORD, FunctionControl, 0, "Control function inlining/subroutine/stackcall. See value defs in igc_flags.hpp.")
269-
DECLARE_IGC_REGKEY(bool, EnableOCLNoInlineAttr, false, "If set, OCL kernel with noinline attribute is honored. Thus, subroutine call is enabled.")
269+
DECLARE_IGC_REGKEY(bool, EnableOCLNoInlineAttr, false, "If set, OCL kernel with noinline attribute is honored (only for user function). Thus, subroutine call is enabled.")
270270
DECLARE_IGC_REGKEY(DWORD, OCLInlineThreshold, 512, "Setting OCL inline thershold")
271271
DECLARE_IGC_REGKEY(bool, EnableForceGroupSize, false, "Enable forcing thread Group Size ForceGroupSizeX and ForceGroupSizeY")
272272
DECLARE_IGC_REGKEY(DWORD, ForceGroupSizeX, 8, "force group size along X")

0 commit comments

Comments
 (0)