[PATCH] D23339: Don't import variadic functions

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 17:43:33 PDT 2016


Prazek added a comment.

In https://reviews.llvm.org/D23339#510712, @Prazek wrote:

> In https://reviews.llvm.org/D23339#510690, @eraman wrote:
>
> > In https://reviews.llvm.org/D23339#510677, @mehdi_amini wrote:
> >
> > > What is the benefit of knowing that a function is variadic compared to just knowing that is can't be inlined?
> > >  We should just have a bit that is "can't be inlined"
> >
> >
> > InlineCost.cpp has an isInlineViable function. It doesn't check for vararg now, so that should be first fixed and then can be used to set a bit in the summary.
>
>
> You mean to use isInlineViable to set this bit? It definitely checks more things, but I actually didn't get any of the cases that the functions checks in the SPEC int.
>  My concern is that this is probably very costly to call.


I looked on this function, and it seems that inlineCost only calls it to determinate if function marked as "always_inline" should be inlined. I should add if Variadic there, but I don't think we should use this function to determinate the bit.


https://reviews.llvm.org/D23339





More information about the llvm-commits mailing list