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

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 01:00:24 PDT 2021


awarzynski created this revision.
Herald added a subscriber: kristof.beyls.
awarzynski requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This was extracted from the discussion on
https://reviews.llvm.org/D108283.

Co-authored-by: Kiran Chandramohan <kiran.chandramohan at arm.com>


Repository:
  rG LLVM Github Monorepo

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.372875.patch
Type: text/x-patch
Size: 1278 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210916/42b5de79/attachment.bin>


More information about the llvm-commits mailing list