[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 23:17:12 PDT 2020


rsmith added inline comments.


================
Comment at: clang/include/clang/Basic/LangOptions.def:371-374
+LANGOPT(PassByValueNoAlias, 1, 0, "Allows assuming no references to passed by "
+                                  "value escape before transferring execution "
+                                  "to the called function. Note that this does "
+                                  "not hold for C++")
----------------
Per the comment at the top of the file, the description should be a single noun phrase; we use this in diagnostics such as "AST file was built with %0 enabled but it is currently disabled". Something like "assumption that by-value parameters do not alias any other values" maybe?


================
Comment at: clang/include/clang/Driver/Options.td:4287-4290
+def fpass_by_value_noalias: Flag<["-"], "fpass-by-value-noalias">,
+  HelpText<"Allows assuming no references to passed by value escape before "
+           "transferring execution to the called function. Note that this "
+           "does not hold for C++">;
----------------
This should be in `Group<f_Group>`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85473/new/

https://reviews.llvm.org/D85473



More information about the cfe-commits mailing list