[PATCH] D96293: [flang][fir] Add OpaqueAttr.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 14:50:38 PST 2021


mehdi_amini added inline comments.


================
Comment at: flang/include/flang/Optimizer/Dialect/FIRAttr.h:139
+/// underlying type of the pointee object is left up to the client. Opaque
+/// attributes are always constructed as null pointers when parsing.
+class OpaqueAttr
----------------
It seems critical to me that these are documented as only appropriate for non-semantic bearing content (debug help?) to preserve round-tripping of the IR and reproducibility. The use of such attribute should be exceptional I think.

Another aspect to document very clearly is that the pointer used to create such attribute must outlive any IR that would refer to this attribute.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96293



More information about the llvm-commits mailing list