[PATCH] D20603: [Inline] Add ability to restrict inlining pass to hinted functions only

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 16 16:45:23 PDT 2016


davidxl added inline comments.

================
Comment at: lib/Transforms/IPO/InlineSimple.cpp:61
@@ -55,1 +60,3 @@
       : Inliner(ID), DefaultThreshold(Threshold) {
+    RestrictToHinted = RestrictInlineToHinted.getNumOccurrences() > 0 ?
+      RestrictInlineToHinted : OnlyHint;
----------------
eraman wrote:
> davidxl wrote:
> > 
> > RestrictedToHinted = (OnlyHint || RestrictedInlinetoHinted);
> This is not equivalent. The expected behavior when --inline-restrict-to-hint=false is to disable this even when the OnlyHint param is true. This is documented above.
maybe making the option an enum one to make it clearer?


http://reviews.llvm.org/D20603





More information about the llvm-commits mailing list