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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 10:12:37 PDT 2017


tejohnson 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))
----------------
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?


https://reviews.llvm.org/D38018





More information about the llvm-commits mailing list