llvm
llvm copied to clipboard
[SYCL][Clang] Fix address space for virtual table support
For SPIR, virtual table elements should be emitted in the default address space while global variables should be emitted in address space 1.
Also, only emit virtual functions marked with [[intel::device_indirectly_callable]]. This attribute will be replaced by compile time properties (for this check) once the spec for virtual function extension is finalized.
Patch by: Michael Rice ([email protected]) and Elizabeth Andrews
FYI - This is upstreaming downstream code (in a simpler way) and tests. Downstream will need to be refactored after this change to remove a bunch of isSPIR checks and use RuntimeGlobalsInt8PtrTy instead.
Hmm looks like we have some failing lit tests. Not sure why they didn't fail locally. Taking a look now.
@intel/llvm-gatekeepers this is ready for merge.
I'm confused about the authorship here. Is this a case where one of these commits is by you, Elizabeth, and one is Michael?
No it isn't. We both accidently worked on the same issue and both fixed it. However my version of the patch had unnecessary code and I worked with Mike to keep the relevant portion and added tests (which actually is copies of tests which exist downstream written by Alexey Sachkov).
The code both Mike and I worked on is based on downstream code written by Jennifer Yu. This is a refactored version of downstream code. Once this is checked in, I will cherry-pick it and replace downstream code as well.
ping @intel/llvm-gatekeepers do you need more clarification on authors? I think you can set either Mike or I as the author here.
I added Co-authored-by to the commit message for Mike, that should capture everything.
Thanks for the clarification. That makes sense. I wanted to avoid an issue we've been having with misattributed cherry-picks.