This is an archive of the discontinued LLVM Phabricator instance.

[SME] Don't scavenge a spillslot in callee-save area in presence of streaming-mode changes.
ClosedPublic

Authored by sdesmalen on Aug 30 2023, 6:22 AM.

Details

Summary

If no frame-pointer is available and the compiler has scavenged a
spill-slot in the callee-save area, the compiler may be forced to emit an
'addvl' inside the streaming-mode-changing call sequence when it needs to
fill (reload) an FP register being passed to the call.

We can avoid this entirely by disabling stack-slot scavenging when there
are streaming-mode-changing call-sequences in the function.

Diff Detail

Event Timeline

sdesmalen created this revision.Aug 30 2023, 6:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 6:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
sdesmalen requested review of this revision.Aug 30 2023, 6:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 6:22 AM

The motivating test-case here is sme-streaming-mode-changing-call-disable-stackslot-scavenging.ll (which I've moved to a precursory patch so its easier to see the fix)

david-arm accepted this revision.Aug 31 2023, 2:57 AM

LGTM!

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
430

nit: whitespace

This revision is now accepted and ready to land.Aug 31 2023, 2:57 AM
This revision was landed with ongoing or failed builds.Sep 4 2023, 3:15 AM
This revision was automatically updated to reflect the committed changes.