This is an archive of the discontinued LLVM Phabricator instance.

[LAA] Make getPointersDiff() API compatible with opaque pointers (NFCI)
ClosedPublic

Authored by nikic on Jun 23 2021, 7:06 AM.

Details

Summary

Make getPointersDiff() and sortPtrAccesses() compatible with opaque pointers by explicitly passing in the element type instead of determining it from the pointer element type.

Diff Detail

Event Timeline

nikic created this revision.Jun 23 2021, 7:06 AM
nikic requested review of this revision.Jun 23 2021, 7:06 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2021, 7:06 AM

Probably worth some test coverage, if possible - does this allow these transformations to be tested with opaque pointers now, or would we have to resort to unit tests to verify this new functionality?

nikic updated this revision to Diff 353966.Jun 23 2021, 7:43 AM

Add SLPVectorizer test with opaque pointers. The result is slightly suboptimal in that an unnecessary bitcast for the opaque pointer type is added, but I don't think we want to address that now.

dblaikie accepted this revision.Jun 23 2021, 7:45 AM

Sounds good, thanks!

This revision is now accepted and ready to land.Jun 23 2021, 7:45 AM
This revision was landed with ongoing or failed builds.Jun 23 2021, 9:46 AM
This revision was automatically updated to reflect the committed changes.