[llvm-dev] alloca and frame pointer changes (regression?)
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Mon Jun 7 09:42:58 PDT 2021
Can you elaborate on what you mean by a "nested alloca"? Are you saying
that this alloca has a known, fixed size, but that it is not in the entry
block? If so, it is a dynamic alloca, and yes, it is expected that it will
force the use of a frame pointer. If you do not want this behavior, make
sure your frontend always places allocas in the entry block.
I can't say what changed, but the new behavior is expected. Perhaps there
used to be some optimization that would hoist these allocas to the entry
block, and it got removed or stopped firing for some reason.
I went looking for documentation to explain the concept of a static and
dynamic alloca, but it doesn't exist. o_o
On Sat, Jun 5, 2021 at 12:26 PM Bagel via llvm-dev <llvm-dev at lists.llvm.org>
wrote:
> In the process of moving my backend from release/9.x to release/12.x (not
> an
> easy task), I noticed some changes in generated code.
>
> Consider a nested (i.e. not at the out level of a function) alloca of an
> object
> (larger than register size). In release/9.x, this did not call for a
> frame
> pointer. In release/12.x it does -- but really doesn't need it. This
> change
> happens for other architectures as well.
>
> When did this change happen and why?
>
> Thanks,
> Brian
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210607/475fe053/attachment.html>
More information about the llvm-dev
mailing list