[PATCH] D29570: Fix the samplepgo indirect call promotion bug: we should not promote a direct call.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 10:51:48 PST 2017


davidxl added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:639
+      if (!CalledFunction && !PromotedInsns.count(I) && CS.getCalledValue() &&
+          !isa<Constant>(CS.getCalledValue())) {
         auto CalleeFunctionName = findCalleeFunctionSamples(*I)->getName();
----------------
Refactor the code in llvm/Analysis/IndirectCallSiteVisitor.h and reuse the indirect call site query routine.


https://reviews.llvm.org/D29570





More information about the llvm-commits mailing list