[PATCH] Enable inlining of recursive functions.

Pablo Barrio pablo.barrio at arm.com
Thu Jan 15 09:58:24 PST 2015


James, thank you for the review,

I uploaded the required changes to the patch with some verbose inlined comments. I could not find more succinct explanations, sorry about that. Also, forcing me to find an explanation about the inline levels made me realize that I was inlining one more time than expected (3 times for a maximum level of 2). Code and regression test fixed.

About treating recursion inlining as loop unrolling, it makes sense. Here I deliberately stayed away from the InlineCost analysis, so the heuristics have not been changed at all. However, it is certainly something that we want to model in the cost analysis.


http://reviews.llvm.org/D6996

Files:
  lib/Analysis/IPA/InlineCost.cpp
  lib/Transforms/IPO/Inliner.cpp
  test/Transforms/Inline/inline-recursive-fn.ll
  test/Transforms/Inline/noinline-recursive-fn.ll
  test/Transforms/Inline/recursive.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6996.18235.patch
Type: text/x-patch
Size: 10032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150115/70bcb120/attachment.bin>


More information about the llvm-commits mailing list