[PATCH] D104950: [OpaquePtr] Support forward references in textual IR

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 15:42:36 PDT 2021


dexonsmith added inline comments.


================
Comment at: llvm/lib/IR/AsmWriter.cpp:188
 
-  bool GetsReversed =
-      !isa<GlobalVariable>(V) && !isa<Function>(V) && !isa<BasicBlock>(V);
+  bool GetsReversed = !isa<BasicBlock>(V);
   if (auto *BA = dyn_cast<BlockAddress>(V))
----------------
aeubanks wrote:
> could you explain this change?
I can at least explain what `GetsReversed` means (maybe this should have a better comment / name?). This flag indicates that the use-list gets reversed when value is defined. This should be `true` if the reader will call RAUW on a forward-declared value, `false` if the value itself is created on first use and modified in place (or not at all) when it's defined.



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

https://reviews.llvm.org/D104950



More information about the llvm-commits mailing list