This is an archive of the discontinued LLVM Phabricator instance.

PrologEpilogInserter: Use explicit control for scavenge slot placement
ClosedPublic

Authored by arsenm on Nov 15 2021, 6:15 PM.

Details

Summary

AMDGPU is unusual in that the both stack is indexed in the same
direction as stack growth (up). We therefore always need the emergency
stack slots placed as low as possible to ensure they are in range of
load/store instruction immediate offsets. The existing logic is mostly
OK, but failed if we required stack realignment.

I don't understand what the existing control isFPCloseToIncomingSP is
supposed to mean, but can only be used to stop placing the scavenge
slots earlier. Make this explicit so that targets can opt-in rather
than opt-out only.

Diff Detail

Event Timeline

arsenm created this revision.Nov 15 2021, 6:15 PM
arsenm requested review of this revision.Nov 15 2021, 6:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2021, 6:15 PM
Herald added a subscriber: wdng. · View Herald Transcript

SystemZ changes LGTM.

LGTM for AMDGPU.

MatzeB accepted this revision.Nov 23 2021, 10:19 AM

LGTM

This revision is now accepted and ready to land.Nov 23 2021, 10:19 AM