Page MenuHomePhabricator

[RS4GC] Support vectors of pointers with scalar base pointer
AbandonedPublic

Authored by DaniilSuchkov on Jan 23 2019, 9:54 AM.

Details

Summary

This patch enables generation of relocations for pointers extracted from vectors when vector of pointers have scalar base pointer.

Diff Detail

Event Timeline

DaniilSuchkov created this revision.Jan 23 2019, 9:54 AM
reames requested changes to this revision.Jan 23 2019, 9:27 PM

I'm uncomfortable with this patch. The placement in this helper function leaves open the possibility that other callers of findBDVorBase encounter an incorrectly typed result. I'm also concerned that we might end up with a scalar-base, vector-derived pair ending up in the stack map, and I don't think the downstream code knows how to deal with that.

A principled fix would be to integrate getelementptr into the base rewriting logic analogously to extractelement.

In the meantime, I've posted an alternate workaround in https://reviews.llvm.org/D57138. What do you think of that?

lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
1023

I think what you actually want here is:
if (Base->getType()->isVectorTy() == Input->getType()->isVectorTy())

i.e. bitcast either scalars, or between vector types.

This revision now requires changes to proceed.Jan 23 2019, 9:28 PM
DaniilSuchkov abandoned this revision.Jul 9 2019, 4:44 AM