[PATCH] D18234: [WebAssembly] Stackify code emitted by eliminateFrameIndex and SP writeback

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 17:28:27 PDT 2016

dschuff created this revision.
dschuff added reviewers: sunfish, jfb.
dschuff added a subscriber: llvm-commits.
Herald added subscribers: dschuff, jfb.

MRI::eliminateFrameIndex can emit several instructions to do address
calculations; these can usually be stackified. Because instructions with
FI operands can have subsequent operands which may be expression trees,
find the top of the leftmost tree and insert the code before it, to keep
the LIFO property.

Also use stackified registers when writing back the SP value to memory
in the epilog; it's unnecessary because SP will not be used after the
epilog, and it results in better code.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18234.50898.patch
Type: text/x-patch
Size: 14938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160317/63b3b7ca/attachment.bin>

More information about the llvm-commits mailing list