[llvm-dev] Unaligned Stack Pointer

Przemyslaw Ossowski via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 17 07:42:44 PDT 2020


Hi all,

my question is maybe not directly related with LLVM but general with
compilers.



The common approach is that compilers often don't align stack pointer for
leaf functions if the function utilizes stack just for keeping variables of
small sizes.

I’m wondering what is the benefit of such behavior.



Is saving a few bytes of the stack just once worth of such approach?

Or maybe something else stands behind it? Is there any other potential
benefit of unaligned Stack Pointer in Leaf Functions?



Thanks,

Przemek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200917/3624954a/attachment.html>


More information about the llvm-dev mailing list