[PATCH] D29040: Explicitly promote indirect calls before sample profile annotation.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 10:07:01 PST 2017


davidxl added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:619
+/// callee into the caller. If the call is an indirect call, first promote
+/// it to direct call. Each indirect call should only be promoted once.
 ///
----------------
should only be --> is limited with a single target.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1283
 
-  Changed |= inlineHotFunctions(F);
+  DenseSet<Instruction *> PromotedInsns;
+  Changed |= inlineHotFunctions(F, PromotedInsns);
----------------
PromotedInsns is not used outside, is there a reason it can not be put into inlineHotFunctions as a local var?


https://reviews.llvm.org/D29040





More information about the llvm-commits mailing list