[PATCH] D97853: [AVR] Do not chain stores in call frame setup

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 3 06:08:25 PST 2021


aykevl created this revision.
aykevl added reviewers: dylanmckay, benshi001.
Herald added subscribers: pengfei, Jim, hiraditya.
aykevl requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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 <https://reviews.llvm.org/D78581> but didn't do correctly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97853

Files:
  llvm/lib/Target/AVR/AVRISelLowering.cpp
  llvm/test/CodeGen/AVR/call.ll
  llvm/test/CodeGen/AVR/dynalloca.ll
  llvm/test/CodeGen/AVR/varargs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97853.327762.patch
Type: text/x-patch
Size: 5147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210303/d1cb91dd/attachment.bin>


More information about the llvm-commits mailing list