[PATCH] D107645: [GlobalDCE] Handle relative pointers in VFE (for Swift vtables)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 26 02:14:54 PDT 2021
fhahn added inline comments.
================
Comment at: llvm/lib/Analysis/TypeMetadataUtils.cpp:129
-Constant *llvm::getPointerAtOffset(Constant *I, uint64_t Offset, Module &M) {
+// Processes a Constant recursively looking into elements of arrays, structs and
+// expressions to find a trivial pointer element that is located at the given
----------------
I think this comment would be helpful at the declaration in the header, so it is included in the auto-generated documentation. So it might be good to move this to the header and maybe have an inline code comment mark where the swift-specific handling starts?
================
Comment at: llvm/lib/Analysis/TypeMetadataUtils.cpp:196
+ if (Operand1TargetGlobal != TopLevelGlobal)
+ return nullptr;
+
----------------
Could you also add a test case for that?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107645/new/
https://reviews.llvm.org/D107645
More information about the llvm-commits
mailing list