Page MenuHomePhabricator

OpaquePtr: Don't check pointee type for byval/preallocated
ClosedPublic

Authored by arsenm on Jun 26 2020, 12:30 PM.

Details

Summary

Since none of these users really care about the actual type, hide the
type under a new size-getting attribute to go along with
hasPassPointeeByValueAttr. This will work better for the future byref
attribute, which may end up only tracking the byte size and not the IR
type.

We currently have 3 parameter attributes that should carry the type
(technically inalloca does not yet). The APIs are somewhat awkward
since preallocated/inalloca piggyback on byval in some places, but in
others are treated as distinct attributes. Since these are all
mutually exclusive, we should probably just merge all the attribute
infrastructure treating these as totally distinct attributes.

Diff Detail

Event Timeline

arsenm created this revision.Jun 26 2020, 12:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 26 2020, 12:30 PM
arsenm updated this revision to Diff 274190.Jun 29 2020, 11:43 AM

Rename function. The future patch to add byref will need to distinguish the case where there's an associated stack copy or not

jdoerfert accepted this revision.Jul 8 2020, 2:23 PM

LGTM.

This revision is now accepted and ready to land.Jul 8 2020, 2:23 PM