llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL][Clang] Fix address space for virtual table support

Open elizabethandrews opened this issue 9 months ago • 4 comments

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

elizabethandrews avatar May 01 '24 16:05 elizabethandrews

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.

elizabethandrews avatar May 01 '24 16:05 elizabethandrews

Hmm looks like we have some failing lit tests. Not sure why they didn't fail locally. Taking a look now.

elizabethandrews avatar May 07 '24 17:05 elizabethandrews

@intel/llvm-gatekeepers this is ready for merge.

elizabethandrews avatar May 20 '24 22:05 elizabethandrews

I'm confused about the authorship here. Is this a case where one of these commits is by you, Elizabeth, and one is Michael?

ldrumm avatar May 21 '24 10:05 ldrumm

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.

elizabethandrews avatar May 21 '24 17:05 elizabethandrews

ping @intel/llvm-gatekeepers do you need more clarification on authors? I think you can set either Mike or I as the author here.

elizabethandrews avatar May 22 '24 20:05 elizabethandrews

I added Co-authored-by to the commit message for Mike, that should capture everything.

sarnex avatar May 22 '24 20:05 sarnex

Thanks for the clarification. That makes sense. I wanted to avoid an issue we've been having with misattributed cherry-picks.

ldrumm avatar May 23 '24 10:05 ldrumm