<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Agreed.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif">Thanks,</font><div><font face="trebuchet ms, sans-serif">Mahesha</font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 23, 2021 at 2:56 PM Jay Foad <<a href="mailto:jay.foad@gmail.com">jay.foad@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> If there are interleaved static allocas with function call in-between, such an ir is considered broken, even though the ir is valid from correctness perspective.<br>
<br>
This is a strange use of the word "broken". Broken generally means not<br>
correct or not valid.<br>
<br>
Maybe say something like "such an ir is considered suboptimal"?<br>
<br>
Jay.<br>
<br>
On Tue, 21 Sept 2021 at 15:41, Mahesha S via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi-<br>
><br>
> Here is my understanding and assumption about the placement of static allocas:<br>
><br>
> "All static allocas should appear in the entry basic block before any function call for better optimization opportunities. If there are interleaved static allocas with function call in-between, such an ir is considered broken, even though the ir is valid from correctness perspective. And if any pass is not adhering to the requirement that all static allocas should be placed in the entry block before any function call, then such a pass is considered broken since it may lead to surprising results in general."<br>
><br>
> Let me know if my above understanding is correct or not.<br>
><br>
> Thanks,<br>
> Mahesha<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>