[PATCH] D51905: Front-end of the implementation of the interleaving algorithm
Zhaomo Yang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 20 17:02:22 PDT 2019
zhaomo updated this revision to Diff 221140.
zhaomo added a comment.
In this new patch, I added a "level" field to type metadata when vtable interleaving is enabled.
Currently type metadata is a (byte offset, type) pair. However, suppose T1 and T2 are compatible with the same offset of a vtable, the interleaving pass cannot always determine which type is the less derived one because T1 and T2 may have the same number of compatible vtables. An observation is that types that are compatible with the same address point like T1 and T2 form a linear inheritance hierarchy. Based on this, I added a third field to the type metadata representing the level of the type in the linear type hierarchy. all-vtables' level value is 1 and any other type's level is greater than 1. The more derived a type is, the higher the level is.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51905/new/
https://reviews.llvm.org/D51905
Files:
clang/include/clang/AST/VTableBuilder.h
clang/include/clang/Basic/ABI.h
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/CC1Options.td
clang/lib/AST/VTableBuilder.cpp
clang/lib/CodeGen/CGCXXABI.h
clang/lib/CodeGen/CGClass.cpp
clang/lib/CodeGen/CGVTables.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/tbaa-for-vptr.cpp
clang/test/CodeGenCXX/alignment.cpp
clang/test/CodeGenCXX/arm.cpp
clang/test/CodeGenCXX/cfi-cross-dso.cpp
clang/test/CodeGenCXX/constructor-destructor-return-this.cpp
clang/test/CodeGenCXX/constructor-init.cpp
clang/test/CodeGenCXX/delete.cpp
clang/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp
clang/test/CodeGenCXX/interleaving-member-function-pointers.cpp
clang/test/CodeGenCXX/interleaving-virtual-base.cpp
clang/test/CodeGenCXX/interleaving-virtual-calls.cpp
clang/test/CodeGenCXX/type-metadata.cpp
clang/test/CodeGenCXX/ubsan-vtable-checks.cpp
clang/test/CodeGenCXX/virtual-base-cast.cpp
compiler-rt/test/cfi/CMakeLists.txt
compiler-rt/test/cfi/anon-namespace.cpp
compiler-rt/test/cfi/create-derivers.test
compiler-rt/test/cfi/cross-dso/icall/lit.local.cfg.py
compiler-rt/test/cfi/cross-dso/lit.local.cfg.py
compiler-rt/test/cfi/lit.cfg.py
compiler-rt/test/cfi/lit.site.cfg.py.in
compiler-rt/test/cfi/mfcall.cpp
compiler-rt/test/cfi/multiple-inheritance.cpp
compiler-rt/test/cfi/simple-fail.cpp
compiler-rt/test/cfi/vdtor.cpp
compiler-rt/test/lit.common.configured.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51905.221140.patch
Type: text/x-patch
Size: 96844 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190921/10953ebf/attachment-0001.bin>
More information about the cfe-commits
mailing list