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
zhaomo added a comment.
Addressed @rsmith's comments.
Comment at: clang/include/clang/Driver/CC1Options.td:356-357
+HelpText<"Enable VTable interleaving">;
+def disable_vtable_interleaving : Flag<["-"], "disable-vtable-interleaving">,
+HelpText<"Disable VTable interleav
zhaomo updated this revision to Diff 195148.
zhaomo marked 7 inline comments as done.
zhaomo added a comment.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fixed bugs in the previous patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D51905/new/
https://reviews
vlad.tsyrklevich added a comment.
In https://reviews.llvm.org/D51905#1234308, @zhaomo wrote:
> In https://reviews.llvm.org/D51905#1231383, @vlad.tsyrklevich wrote:
>
> > This change causes all compiler-rt cfi tests to be UNSUPPORTED for me
> > locally, do you have any idea why that might be? The
zhaomo updated this revision to Diff 165415.
zhaomo added a comment.
Fixed issues pointed out by Peter and Vlad.
Richard:
I just saw comments but I will travel tomorrow and this weekend so I will reply
to your comments when I get a chance.
https://reviews.llvm.org/D51905
Files:
clang/inclu
zhaomo added a comment.
In https://reviews.llvm.org/D51905#1231383, @vlad.tsyrklevich wrote:
> This change causes all compiler-rt cfi tests to be UNSUPPORTED for me
> locally, do you have any idea why that might be? The lit changes don't make
> it immediately clear.
Not sure why that happened
rsmith added inline comments.
Comment at: clang/include/clang/Driver/CC1Options.td:356-357
+HelpText<"Enable VTable interleaving">;
+def disable_vtable_interleaving : Flag<["-"], "disable-vtable-interleaving">,
+HelpText<"Disable VTable interleaving">;
//===
zhaomo added inline comments.
Comment at: compiler-rt/test/cfi/lit.cfg:33
dso = '-fsanitize-cfi-cross-dso -fvisibility=default '
+ interleave = '-Xclang -enable-vtable-interleaving
-Wl,-plugin-opt,-enable-vtable-interleaving -Wl,-plugin-opt=save-temps
-fno-sanitize=cfi-mfca
zhaomo added inline comments.
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:939
+/// We should only interleave vtables when the module has the hidden
+/// LTO visibility, cfi-vcall is enabled and EnableVTableInterleaving
vlad.tsyrklevich wrote:
> doxygen comm
zhaomo added inline comments.
Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:1767
+ bool InBounds = shouldInterleaveVTables(VTableClass) ? false : true;
return llvm::ConstantExpr::getGetElementPtr(VTable->getValueType(), VTable,
pcc wrote:
> Remind me why
vlad.tsyrklevich added a comment.
This change causes all compiler-rt cfi tests to be UNSUPPORTED for me locally,
do you have any idea why that might be? The lit changes don't make it
immediately clear.
Comment at: clang/lib/CodeGen/CGVTables.cpp:1055
+// When vtable inter
pcc added a subscriber: cfe-commits.
pcc added a reviewer: rsmith.
pcc added inline comments.
Comment at: clang/lib/CodeGen/CGCXXABI.h:53
+ // interleaved layout is decided.
+ bool EnableVTableInterleaving;
+
Why does this need to be stored separately on the CG
12 matches
Mail list logo