[PATCH] D47108: [CodeGenCXX] Add -fforce-emit-vtables

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 20:48:23 PDT 2018


rjmccall added a comment.

I thought we already had places in Sema that marked inline virtual methods as used, instantiated templates, etc. for devirtualization purposes when optimization was enabled.  Did we rip that out?

The problem we've had over and over with devirtualization is that we have to emit a perfect v-table because LLVM lacks a lot of the key vocabulary for talking about incomplete information.  For example, if something weird happens and we don't have a definition for an inline virtual method, ideally we'd just say "well, you can't devirtualize this slot", then try to fix that as incremental progress; but instead we have to get everything just right or else disable the whole optimization.  Note that vague-linkage v-tables mean that we'd also need to be able to say things like "there is an object with a definition that looks like this, but its symbol is not available and you can't emit it yourself".


Repository:
  rL LLVM

https://reviews.llvm.org/D47108





More information about the llvm-commits mailing list