[PATCH] D104827: [DebugInfo] Enforce implicit constraints on `distinct` MDNodes

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 24 11:41:44 PDT 2021


scott.linder added inline comments.


================
Comment at: llvm/include/llvm/IR/Metadata.def:21
+//   storage without any restrictions.
+// * UNIQUED: refers to nodes which must use uniqued or temporary storage.
+// * DISTINCT: refers to nodes which must use distinct or temporary storage.
----------------
t-tye wrote:
> Seems uniqued nodes now are always rendered inline and the other nodes are always rendered using IDs.
> 
> May be worth explaining that here since it is now describing these different cases.
Yes, I agree explaining that here would be helpful. I think I decided to combine the two concepts (always-uniqued, and printed-inline) early on when drafting the patch, and by the end I never actually wrote it down anywhere :^)

An alternative is to split the two up, but it seemed nice to have one consistent property that unifies printed-inline nodes. If anyone suspects this will not work out longer term I can also split up the concepts, although I would think at the very least we would want printed-inline to always imply always-uniqued.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104827



More information about the llvm-commits mailing list