[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 20:55:42 PDT 2017


eraman accepted this revision.
eraman added a comment.

LGTM.

Please add a comment to explain the condition for exiting the loop for exceeding MaxNumInlineBlocks.



================
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;
----------------
davidxl wrote:
> eraman wrote:
> > 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.
> Fixed. Added a member function.
You should still add a comment in the member function about the +1 (the return block) and here (we still have a pending CurrEntry block). 


https://reviews.llvm.org/D32249





More information about the llvm-commits mailing list