This is an archive of the discontinued LLVM Phabricator instance.

[SVE] Return StackOffset for TargetFrameLowering::getFrameIndexReference.

Authored by sdesmalen on Oct 23 2020, 2:57 AM.



To accommodate frame layouts that have both fixed and scalable objects
on the stack, describing a stack location or offset using a pointer + uint64_t
is not sufficient. For this reason, we've introduced the StackOffset class,
which models both the fixed- and scalable sized offsets.

The TargetFrameLowering::getFrameIndexReference is made to return a StackOffset,
so that this can be used in other interfaces, such as to eliminate frame indices
in PEI or to emit Debug locations for variables on the stack.

This patch is purely mechanical and doesn't change the behaviour of how
the result of this function is used for fixed-sized offsets. The patch adds
various checks to assert that the offset has no scalable component, as frame
offsets with a scalable component are not yet supported in various places.

Diff Detail

Event Timeline

sdesmalen created this revision.Oct 23 2020, 2:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2020, 2:57 AM
sdesmalen requested review of this revision.Oct 23 2020, 2:57 AM
arsenm accepted this revision.Oct 30 2020, 9:00 AM
This revision is now accepted and ready to land.Oct 30 2020, 9:00 AM
This revision was landed with ongoing or failed builds.Nov 5 2020, 3:03 AM
This revision was automatically updated to reflect the committed changes.