[PATCH] D89890: [Docs] Clarify that FunctionPasses can't add/remove declarations

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 08:57:25 PDT 2020


aeubanks created this revision.
aeubanks added reviewers: ychen, asbirlea, rnk.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
aeubanks requested review of this revision.

In preparation for potential future concurrency, a FunctionPass
shouldn't modify anything at the module level that other FunctionPasses
can also modify.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89890

Files:
  llvm/docs/WritingAnLLVMPass.rst


Index: llvm/docs/WritingAnLLVMPass.rst
===================================================================
--- llvm/docs/WritingAnLLVMPass.rst
+++ llvm/docs/WritingAnLLVMPass.rst
@@ -474,7 +474,8 @@
 To be explicit, ``FunctionPass`` subclasses are not allowed to:
 
 #. Inspect or modify a ``Function`` other than the one currently being processed.
-#. Add or remove ``Function``\ s from the current ``Module``.
+#. Add or remove ``Function``\ s from the current ``Module``, including
+   declarations.
 #. Add or remove global variables from the current ``Module``.
 #. Maintain state across invocations of :ref:`runOnFunction
    <writing-an-llvm-pass-runOnFunction>` (including global data).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89890.299710.patch
Type: text/x-patch
Size: 695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201021/40324d1a/attachment-0001.bin>


More information about the llvm-commits mailing list