[PATCH] D109871: [flang][docs] Document plugin limitations

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 01:51:27 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG7e7484a816a5: [flang][docs] Document plugin limitations (authored by awarzynski).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109871

Files:
  flang/docs/FlangDriver.md


Index: flang/docs/FlangDriver.md
===================================================================
--- flang/docs/FlangDriver.md
+++ flang/docs/FlangDriver.md
@@ -398,3 +398,20 @@
 `flang/example` directory and added as a `sub_directory` to the
 `flang/examples/CMakeLists.txt`, for example, the `PrintFlangFunctionNames`
 plugin. It is also possible to develop plugins out-of-tree.
+
+## Limitations
+Note that the traversal API presented here is under active development and
+might change in the future. We expect it to evolve as support for new
+language features are added. This document and the examples will be updated
+accordingly.
+
+The current `ParseTree` structure is not suitable for modifications. The
+copy constructors are not available and hence duplicating code might not be
+trivial. Please take this into consideration when designing your plugin. In
+particular, creating a transformation plugin will be noticeably harder than
+analysis plugins that just consume (rather than edit) `ParseTree`.
+
+Lastly, if `ParseTree` modifications are performed, then it might be necessary
+to re-analyze expressions and modify scope or symbols. You can check
+[Semantics.md](Semantics.md) for more details on how `ParseTree` is edited
+e.g. during the semantic checks.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109871.373806.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210921/3e0dfd7b/attachment.bin>


More information about the llvm-commits mailing list