[PATCH] D74651: Add IR constructs for inalloca replacement llvm.call.setup
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 15:46:03 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/docs/LangRef.rst:1069
+ The preallocated attribute requires a type argument, which must be
+ the same as the pointee type of the argument.
.. _attr_inalloca:
----------------
aeubanks wrote:
> efriedma wrote:
> > Are there any rules for what value has to be passed to a "preallocated" argument? Or is the value ignored?
> It's ignored, clarified.
For the purpose of actually generating code, saying it's ignored is fine. It might be inconvenient for IPO transforms/analysis, though: any transform that examines a preallocated argument would have to explicitly blacklist optimizations on the argument. It might make sense to require that the argument has the "correct" value, even if code generation won't use it, for the sake of optimizations.
================
Comment at: llvm/lib/IR/Verifier.cpp:1737
+ "Attributes 'byval', 'inalloca', 'preallocated', 'nest', 'sret', "
+ "'nocapture', 'nofree'"
"'returned', 'swiftself', and 'swifterror' do not apply to return "
----------------
Missing comma
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74651/new/
https://reviews.llvm.org/D74651
More information about the llvm-commits
mailing list