[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2019-09-20 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2019-04-15 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2019-04-15 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-14 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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">; //===

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-13 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-12 Thread Zhaomo Yang via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-11 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
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

[PATCH] D51905: Front-end of the implementation of the interleaving algorithm

2018-09-11 Thread Peter Collingbourne via Phabricator via cfe-commits
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