tejohnson added a comment.

I think I understand the motivation, but not sure I agree this is the right 
approach - can you simply not pass -flto-unit and -fwhole-program-vtables for 
these files?

Also, isn't this hiding possibly necessary info from WPD that might be needed 
for correct class hierarchy analysis affecting other IR modules? I.e. in the 
type-metadata-skip-vtable-filepaths.cpp test, what if A was derived from a 
struct B, which was also defined/used in another module without this skipping 
option. We would lose information about the override of f in A, and possibly do 
an incorrect devirtualization elsewhere. It seems like a dangerous option to 
provide.

It might be better to provide an option that can somehow mark vtables in a 
given module as unsafe for devirt, and propagate that info to WPD.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152741/new/

https://reviews.llvm.org/D152741

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to