[PATCH] D11749: [X86] When optimizing for size, use POP for small post-call stack clean-up
Michael Kuperstein
michael.m.kuperstein at intel.com
Tue Aug 4 01:17:33 PDT 2015
mkuper created this revision.
mkuper added reviewers: rnk, majnemer.
mkuper added a subscriber: llvm-commits.
When optimizing for size, replace "addl $4, %esp" and "addl $8, %esp" following a call by one or two pops, respectively.
This patch doesn't try to do it in general, but only when the stack adjustment immediately follows a call - which is the most common case.
That allows taking a short-cut when trying to find a free register to pop into, instead of a full-blown liveness check. If the adjustment immediately follows a call, then every register the call clobbers but doesn't define should be dead at that point, and can be used.
http://reviews.llvm.org/D11749
Files:
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86FrameLowering.h
test/CodeGen/X86/fold-push.ll
test/CodeGen/X86/pop-stack-cleanup.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11749.31301.patch
Type: text/x-patch
Size: 6613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150804/7353b4f6/attachment.bin>
More information about the llvm-commits
mailing list