ojhunt wrote: I'm not sure it is providing more information, this bug has everything we know currently:
* The Itanium ABI seems to say that it is incorrect to do this with vtables * This optimization assumes that this is the case * We are marking vtables as linkonce odr *and* unnamed_addr * In various parts of llvm, and the linkers, etc consider unnamed_addr as (functionally) permitting duplication of those symbols by making hidden copies of the object The path forward depends on what the *correct* behavior is. If the interpretation is that itanium does not permit duplicating the vtables then it is an error for them to be labeled as unnamed_addr. If it is valid for vtables to be duplicated then this optimization is invalid, we _could_ try to move the optimization pass onto the RTTI field. Alternatively, @jaredwy (I think?) mentioned unnamed_local and after reading the semantics, that seems like it is much likely to be the correct annotation for vtables, and would be more consistent with the behavior specified in the itanium abi. I think that this alone would have avoided the issues in https://github.com/llvm/llvm-project/issues/120129 , but I don't know the performance trade offs. And lastly - I have no linker experience: I have been reading the documentation and specs, but there's a world of difference between what is written and what is practically necessary so I'm happy to defer to experts :D https://github.com/llvm/llvm-project/pull/197855 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
