[PATCH] D57635: Add a new intrinsic and attribute to implement `__builtin_va_arg_pack{, _len}` in Clang
Erik Pilkington via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 19:31:28 PST 2019
erik.pilkington created this revision.
erik.pilkington added reviewers: jfb, rjmccall, efriedma, rengolin, chandlerc.
Herald added subscribers: dexonsmith, steven_wu, jkorous, hiraditya, eraman, mehdi_amini.
Herald added a project: LLVM.
This patch adds an attribute `inline_va_arg_pack` which applies to calls/invokes and is the result of lowering `__builtin_va_arg_pack()`, as well as the intrinsic `@llvm.va_arg_pack_len`, which is the result of lowering `__builtin_va_arg_pack_len()`. These can only appear in available_externally functions, and are themselves lowered during inlining. You can read more about them here: https://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Constructing-Calls.html, I explained the motivation for them on the clang patch.
Fixes llvm.org/PR7219 & rdar://11102669
Thanks for taking a look!
Erik
Repository:
rL LLVM
https://reviews.llvm.org/D57635
Files:
llvm/docs/LangRef.rst
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/Attributes.td
llvm/include/llvm/IR/InstrTypes.h
llvm/include/llvm/IR/Intrinsics.td
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLToken.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Utils/CodeExtractor.cpp
llvm/lib/Transforms/Utils/InlineFunction.cpp
llvm/test/Transforms/Inline/inline-va-arg-pack.ll
llvm/test/Transforms/Inline/va-arg-pack-len.ll
llvm/test/Verifier/va-arg-pack.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57635.184882.patch
Type: text/x-patch
Size: 20538 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190202/d7b19da1/attachment.bin>
More information about the llvm-commits
mailing list