Skip to content

Commit c88749e

Browse files
Dimus77igcbot
authored andcommitted
Changes in code.
1 parent 386d517 commit c88749e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

IGC/AdaptorCommon/ProcessFuncAttributes.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,13 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
447447
{
448448
mustAlwaysInline = true;
449449
}
450+
// Enable inlining for -O0 in order to preserve debug info. This may be removed when debug stack call support is enabled.
451+
else if (isOptDisable &&
452+
FCtrl == FLAG_FCALL_DEFAULT &&
453+
IGC_IS_FLAG_DISABLED(ForceInlineStackCallWithImplArg))
454+
{
455+
mustAlwaysInline = true;
456+
}
450457
else
451458
{
452459
// Add always attribute if function has an argument with opaque type

IGC/common/igc_flags.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ DECLARE_IGC_REGKEY(bool, EnableLTO, true, "Enable link time
340340
DECLARE_IGC_REGKEY(bool, EnableLTODebug, false, "Enable debug information for LTO", true)
341341
DECLARE_IGC_REGKEY(DWORD, FunctionControl, 0, "Control function inlining/subroutine/stackcall. See value defs in igc_flags.hpp.", true)
342342
DECLARE_IGC_REGKEY(bool, EnableStackCallFuncCall, false, "If enabled, the default function call mode will be set to stack call. Otherwise, subroutine call is used.", false)
343-
DECLARE_IGC_REGKEY(bool, ForceInlineStackCallWithImplArg, true, "If enabled, stack calls that uses implicit args will be force inlined.", false)
343+
DECLARE_IGC_REGKEY(bool, ForceInlineStackCallWithImplArg, false, "If enabled, stack calls that uses implicit args will be force inlined.", false)
344344
DECLARE_IGC_REGKEY(DWORD, OCLInlineThreshold, 512, "Setting OCL inline thershold", false)
345345
DECLARE_IGC_REGKEY(bool, DisableAddingAlwaysAttribute, false, "Disable adding always attribute", true)
346346
DECLARE_IGC_REGKEY(bool, EnableForceGroupSize, false, "Enable forcing thread Group Size ForceGroupSizeX and ForceGroupSizeY", false)

0 commit comments

Comments
 (0)