[PATCH] D74651: Add IR constructs for inalloca replacement llvm.call.setup

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 17:22:48 PDT 2020


aeubanks marked an inline comment as done.
aeubanks 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:
----------------
efriedma wrote:
> 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.
Done, PTAL at new wording.


================
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 "
----------------
efriedma wrote:
> Missing comma
Done.


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