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

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 13:48:16 PDT 2017


eraman added a comment.



> Yes, i was thinking adding a limit on the chain length as an option. Probably do this a a follow up -- which also needs to look at profile data.  (Note that Partialinlininer is currently not enabled in any optimization pipeline yet).

I think instruction count will be better limit than chain length.



================
Comment at: lib/Transforms/IPO/PartialInlining.cpp:193
+    }
+  } while (true);
+
----------------
This will look cleaner if this is made to while (CommonSucc) and peel the else part outside of the while loop (since you always break from there). Perhaps you can even peel the first iteration out of the loop: first find the candidate non-return block, then walk the chain in a loop as long as one successor equals non-return block and the other succesor has a single predecessor. Some more comments will also increase readability.


https://reviews.llvm.org/D32249





More information about the llvm-commits mailing list