Skip to content

Commit f79824b

Browse files
dlei6gsys_zuul
authored andcommitted
Enabling inlining for -O0 to preserve debug info.
Change-Id: I2ee9c596180341db2810cfeaebb4c625d5d92410
1 parent f65a269 commit f79824b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

IGC/AdaptorCommon/ProcessFuncAttributes.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,11 @@ bool ProcessFuncAttributes::runOnModule(Module& M)
411411
{
412412
mustAlwaysInline = true;
413413
}
414+
// Enable inlining for -O0 in order to preserve debug info. This may be removed when debug stack call support is enabled.
415+
else if (getAnalysis<MetaDataUtilsWrapper>().getModuleMetaData()->compOpt.OptDisable)
416+
{
417+
mustAlwaysInline = true;
418+
}
414419
if (mustAlwaysInline)
415420
{
416421
F->removeFnAttr(llvm::Attribute::NoInline);

0 commit comments

Comments
 (0)