HomePhabricator

[PartialInliner] Inline vararg functions that forward varargs.

Authored by fhahn on Nov 13 2017, 2:35 AM.

Description

[PartialInliner] Inline vararg functions that forward varargs.

Summary:
This patch extends the partial inliner to support inlining parts of
vararg functions, if the vararg handling is done in the outlined part.

It adds a ForwardVarArgsTo argument to InlineFunction. If it is
non-null, all varargs passed to the inlined function will be added to
all calls to ForwardVarArgsTo.

The partial inliner takes care to only pass ForwardVarArgsTo if the
varargs handing is done in the outlined function. It checks that vastart
is not part of the function to be inlined.

test/Transforms/CodeExtractor/PartialInlineNoInline.ll (already part
of the repo) checks we do not do partial inlining if vastart is used in
a basic block that will be inlined.

Reviewers: davide, davidxl, grosser

Reviewed By: davide, davidxl, grosser

Subscribers: gyiu, grosser, eraman, llvm-commits

Differential Revision: https://reviews.llvm.org/D39607

llvm-svn: 318028

Details

Committed
fhahnNov 13 2017, 2:35 AM
Reviewer
davide
Differential Revision
D39607: [PartialInliner] Inline vararg functions that forward varargs.
Parents
rG070a7ff1adbb: Test commit
Branches
Unknown
Tags
Unknown