aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorDawid Jurczak <dawid_jurek@vp.pl>2022-06-24 16:23:46 +0200
committerDawid Jurczak <dawid_jurek@vp.pl>2022-06-24 16:27:26 +0200
commitb7e7f4e1b6f9567562d4296b5b2a47a678ff8e8e (patch)
tree9bafdcded9c2be8e5a2aa5c8e769b701d772ebf5 /llvm/lib/Analysis/InlineCost.cpp
parent886715af962de2c92fac4bd37104450345711e4a (diff)
downloadllvm-b7e7f4e1b6f9567562d4296b5b2a47a678ff8e8e.zip
llvm-b7e7f4e1b6f9567562d4296b5b2a47a678ff8e8e.tar.gz
llvm-b7e7f4e1b6f9567562d4296b5b2a47a678ff8e8e.tar.bz2
[InlineCost] Improve debugging experience by adding print about initial inlining cost
Differential Revision: https://reviews.llvm.org/D127597
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r--llvm/lib/Analysis/InlineCost.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index b83f5cf..63fe651 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -982,6 +982,8 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
if (F.getCallingConv() == CallingConv::Cold)
Cost += InlineConstants::ColdccPenalty;
+ LLVM_DEBUG(dbgs() << " Initial cost: " << Cost << "\n");
+
// Check if we're done. This can happen due to bonuses and penalties.
if (Cost >= Threshold && !ComputeFullInlineCost)
return InlineResult::failure("high cost");