[PATCH] D38018: Handle profile mismatch correctly for SamplePGO.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 10:47:54 PDT 2017


danielcdh added inline comments.


================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:760
       }
+      // If there is profile mismatch, we should not attempt to inline DI.
+      if (!isa<CallInst>(DI) && !isa<InvokeInst>(DI))
----------------
tejohnson wrote:
> Can this only happen as the result of an ICP? If so, should the check be moved up to where DI is reset after the promotion, and this turned into an assert?
Good point. Done.


https://reviews.llvm.org/D38018





More information about the llvm-commits mailing list