[PATCH] D97126: [WPD] Fix handling of pure virtual base class
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 23 10:51:26 PST 2021
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
> Added a new test case that asserted without removing the assert, and that requires the other fixes in this patch to get a successful devirtualization with index-only WPD.
Nit: `other` -> `updateVCallVisibilityInIndex` just to make it clearer:)
================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:1030
+ // to treat this case conservatively (in case the bitcode is old).
+ // However, we will also not have any vtable functions in the
+ // case of a pure virtual base class. In that case we do want
----------------
Ok, I understand the "However" part now. Question: does the "Previously" part imply that mixing old bitcode could be a problem?
================
Comment at: llvm/test/ThinLTO/X86/devirt_pure_virtual_base.ll:89
+; CHECK-IR-LABEL: ret i32
+; CHECK-IR-LABEL: }
+
----------------
`; CHECK-IR-NEXT: }` assuming you want to test that there is exactly one ret.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97126/new/
https://reviews.llvm.org/D97126
More information about the llvm-commits
mailing list