[PATCH] D32249: [PartialInl] Enhance partial inliner to handle more complex conditions

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 16:57:09 PDT 2017


eraman added inline comments.


================
Comment at: lib/Transforms/IPO/PartialInlining.cpp:160
+    // The number of blocks to be inlined is exceeding limit
+    if (OutliningInfo->Entries.size() + 1 >= MaxNumInlineBlocks)
+      break;
----------------
Some comment here will be useful. You want to keep space for 1 return block and the CurrEntry and that's why you've the above. I initially thought the condition was wrong.


================
Comment at: lib/Transforms/IPO/PartialInlining.cpp:237
+
+    if (HasNonEntryPred(Cand))
+      break;
----------------
The HasNonEntryPred lambda checks for the presence of preds in Entries (the DenseSet above), but you're not updating the Entries in this loop when you insert Cand into OutliningInfo->Entries. So this loop will return after 1 iteration right?


https://reviews.llvm.org/D32249





More information about the llvm-commits mailing list