[PATCH] D39607: [PartialInliner] Inline vararg functions that forward varargs.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 10:42:55 PDT 2017
fhahn created this revision.
Herald added a subscriber: eraman.
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.
https://reviews.llvm.org/D39607
Files:
include/llvm/Transforms/Utils/Cloning.h
include/llvm/Transforms/Utils/CodeExtractor.h
lib/Transforms/IPO/PartialInlining.cpp
lib/Transforms/Utils/CodeExtractor.cpp
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/CodeExtractor/PartialInlineVarArg.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39607.121510.patch
Type: text/x-patch
Size: 12917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171103/721e1a6b/attachment.bin>
More information about the llvm-commits
mailing list