[PATCH] D22529: Inlining of empty/small variadic functions.

Sunil Srivastava via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 17:09:10 PDT 2016


Sunil_Srivastava updated this revision to Diff 72927.
Sunil_Srivastava added a comment.
Herald added a subscriber: eraman.

This is an update to inlining-of-variadic-functions change along the lines of suggestion by Chandler.

The determination to attempt or not is being made in InlineCost.cpp.

Presence of a va_start or a MustTail call in a variadic callee disqualifies it from being inlined. Other than that they can be inlined.

Changes in InlineFunction.cpp are merely for:

- to remove prohibition on inlining of variadic functions
- assertion checks that a variadic function having a va_start or MustTail do not slip through the cost analysis.

I do have one concern: Should I worry about plain 'tail' calls as well, same as 'musttail' calls ? Looking for opinions.


https://reviews.llvm.org/D22529

Files:
  lib/Analysis/InlineCost.cpp
  lib/Transforms/Utils/InlineFunction.cpp
  test/Transforms/Inline/inline-varargs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22529.72927.patch
Type: text/x-patch
Size: 18806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160929/d3c1750f/attachment.bin>


More information about the llvm-commits mailing list