Skip to content

Commit 976a1d7

Browse files
authored
Merge pull request #30474 from atrick/add-inlining-diagnostics
Emit inlining diagnostics as debug messages.
2 parents d28ab08 + ab14c43 commit 976a1d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILOptimizer/Transforms/PerformanceInliner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ bool SILPerformanceInliner::isProfitableToInline(
499499

500500
// This is the final inlining decision.
501501
if (CalleeCost > Benefit) {
502-
ORE.emit([&]() {
502+
OptRemark::Emitter::emitOrDebug(DEBUG_TYPE, &ORE, [&]() {
503503
using namespace OptRemark;
504504
return RemarkMissed("NoInlinedCost", *AI.getInstruction())
505505
<< "Not profitable to inline function " << NV("Callee", Callee)
@@ -519,7 +519,7 @@ bool SILPerformanceInliner::isProfitableToInline(
519519
<< ", bb=" << Callee->size()
520520
<< ", c-bb=" << NumCallerBlocks
521521
<< "} " << Callee->getName() << '\n');
522-
ORE.emit([&]() {
522+
OptRemark::Emitter::emitOrDebug(DEBUG_TYPE, &ORE, [&]() {
523523
using namespace OptRemark;
524524
return RemarkPassed("Inlined", *AI.getInstruction())
525525
<< NV("Callee", Callee) << " inlined into "

0 commit comments

Comments
 (0)