[PATCH] D49412: Enrich inline messages
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 08:11:05 PDT 2018
tejohnson added a comment.
This would be useful for my own analysis of missed inlines. A few nits.
================
Comment at: include/llvm/Transforms/Utils/Cloning.h:218
+/// describes a reason why it is decided to not inline.
+struct InlineResult {
+ const char* message = nullptr;
----------------
I think this would make more sense in InlineCost.h
================
Comment at: lib/Transforms/IPO/Inliner.cpp:431
<< NV("Caller", Caller)
- << " because it should never be inlined (cost=never)";
+ << " because it should never be inlined " << IC;
});
----------------
nit: suggest making this:
<< " because it should never be inlined (" << IC << ")";
so that there is still a "(" delimiter before the "cost=never".
================
Comment at: lib/Transforms/IPO/Inliner.cpp:442
<< NV("Callee", Callee) << " not inlined into "
- << NV("Caller", Caller) << " because too costly to inline (cost="
- << NV("Cost", IC.getCost())
- << ", threshold=" << NV("Threshold", IC.getThreshold()) << ")";
+ << NV("Caller", Caller) << " because too costly to inline ("
+ << IC << ")";
----------------
nit: suggest changing to:
<< NV("Caller", Caller) << " because too costly to inline with " << IC;
so that you don't end up with 2 levels of nested parentheses in messages.
https://reviews.llvm.org/D49412
More information about the llvm-commits
mailing list