This is an archive of the discontinued LLVM Phabricator instance.

[OpaquePtr] Support changing load type in InstCombine
ClosedPublic

Authored by nikic on Jun 22 2021, 8:27 AM.

Details

Summary

When the load type is changed to ptr, we need the load pointer type to also be ptr, because it's not allowed to create a pointer to an opaque pointer. This is achieved by adjusting the getPointerTo() API to return an opaque pointer for an opaque pointer base type.

Diff Detail

Event Timeline

nikic created this revision.Jun 22 2021, 8:27 AM
nikic requested review of this revision.Jun 22 2021, 8:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2021, 8:27 AM
aeubanks added a reviewer: Restricted Project.Jun 22 2021, 9:01 AM
aeubanks accepted this revision.Jun 22 2021, 9:06 AM

lgtm with nit

llvm/lib/IR/Type.cpp
728

probably worth putting a comment in the header that this method should be removed after the opaque pointer transition

This revision is now accepted and ready to land.Jun 22 2021, 9:06 AM
This revision was landed with ongoing or failed builds.Jun 22 2021, 12:16 PM
This revision was automatically updated to reflect the committed changes.