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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 15:48:14 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:
----------------
Are there any rules for what value has to be passed to a "preallocated" argument?  Or is the value ignored?


================
Comment at: llvm/docs/LangRef.rst:11939
+corresponding argument. The token must be the parameter to a
+``"preallocated"`` operand bundle for the corresponding call.
+
----------------
Probably worth mentioning the rules for nested llvm.call.preallocated.setup .


================
Comment at: llvm/docs/LangRef.rst:11963
+the call associated with the ``%setup_token``, which must be from
+'``llvm.call.preallocated.setup``'.
+
----------------
Maybe worth mentioning what happens if you call llvm.call.preallocated.arg after the memory is deallocated?


================
Comment at: llvm/lib/IR/Verifier.cpp:4510
+        }
+        auto PrelalocatedBundle =
+            UseCall->getOperandBundle(LLVMContext::OB_preallocated);
----------------
"Prelalocated"?


================
Comment at: llvm/lib/IR/Verifier.cpp:4522
+  }
   case Intrinsic::gcroot:
   case Intrinsic::gcwrite:
----------------
Do you need to check that there aren't any calls to llvm.call.preallocated.arg with the wrong token?


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