[PATCH] D134687: [clang] Ensure correct metadata for relative vtables

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 17:54:38 PDT 2022


leonardchan created this revision.
leonardchan added reviewers: phosek, mcgrathr, tejohnson, pcc.
leonardchan added a project: clang.
Herald added a subscriber: Prazek.
Herald added a project: All.
leonardchan requested review of this revision.

Prior to this, metadata pertaining to the size or address point offsets into a relative vtable were twice the value they should be (treating component widths as pointer width rather than 4 bytes). This prevented some vtables from being devirtualized with D134320 <https://reviews.llvm.org/D134320>. This ensures the correct metadata is written so whole program devirtualization can catch these remaining devirt targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134687

Files:
  clang/lib/CodeGen/CGVTables.cpp
  clang/lib/CodeGen/CGVTables.h
  clang/lib/CodeGen/CodeGenModule.h
  clang/test/CodeGenCXX/type-metadata.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134687.463062.patch
Type: text/x-patch
Size: 17851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220927/7ddb425b/attachment-0001.bin>


More information about the cfe-commits mailing list