Prior to this patch, WPD was not acting on relative-vtables in C++. This involves teaching WPD about two things:
- llvm.load.relative which is how relative-vtables are indexed (instead of GEP)
- dso_local_equivalent which is used in the vtable itself when taking the offset between a virtual function and vtable
- Update llvm/test/ThinLTO/X86/devirt.ll to use opaque pointers and add equivalent tests for RV
Do we also need to look through DSOLocalEquivalent in this function, as is done in getPointerAtOffset, or why not?