Page MenuHomePhabricator

[AVR] Do not chain stores in call frame setup
Needs ReviewPublic

Authored by aykevl on Mar 3 2021, 6:08 AM.

Details

Summary

Previously, AVRTargetLowering::LowerCall attempted to keep stack stores in order with chains. Perhaps this worked in the past, but it does not work now: it appears that the SelectionDAG legalization phase removes these chains. Therefore, I've removed these chains entirely to match X86 (which, similar to AVR, also prefers to use push instructions over stack-relative stores to set up a call frame). With this change, all the stack stores are in a somewhat reasonable order.

See also: https://reviews.llvm.org/D78581.


I ran my batch of compiler-rt tests locally and they still pass with this patch.
This patch is really a preparation for a different patch that attempts to optimize/fix the bug I originally tried to fix in D78581 but didn't do correctly.

Diff Detail

Event Timeline

aykevl created this revision.Mar 3 2021, 6:08 AM
aykevl requested review of this revision.Mar 3 2021, 6:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2021, 6:08 AM