Hi Eli,<div><br></div><div>I know the pass that fails, it is MachineCSE. It stack overflows because there are too many recursive calls to processBlock (line 362 of lib/CodeGen/MachineCSE.cpp). But the recursion is here on purpose, and I am sure there are other places where LLVM makes recursive calls. Or is recursion forbidden in LLVM, and explicitly stated to be so?</div>
<div><br></div><div>Cheers,</div><div>Nicolas</div><div><br></div><div><br><div class="gmail_quote">On Tue, Apr 13, 2010 at 5:56 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Tue, Apr 13, 2010 at 2:29 AM, Konrad Hinsen<br>
<<a href="mailto:konrad.hinsen@fastmail.net">konrad.hinsen@fastmail.net</a>> wrote:<br>
> On 11.04.2010, at 19:14, nicolas geoffray wrote:<br>
><br>
>> On Sun, Apr 11, 2010 at 7:12 PM, Konrad Hinsen <<a href="mailto:konrad.hinsen@fastmail.net">konrad.hinsen@fastmail.net</a>> wrote<br>
>>> I am rather surprised that the size of a method should have an impact on stack usage, but then I haven't looked at all at how VMKit works yet. That's my next project :-)<br>
>>><br>
>> It has no impact on VMKit. The impact is on LLVM optimization passes that do recursive calls.<br>
><br>
> I see... Could those passes simply be skipped for code blocks that are too large? Ideally in LLVM, since it's LLVM that imposes the restriction? I don't know much about LLVM yet, but my first thought would be that a code handling system should be able to deal with code of any size. It may decide not to optimize unusual cases, but it certainly shouldn't crash.<br>

<br>
</div></div>You're right, it shouldn't crash.  Can you track down which pass is<br>
crashing and file a<br>
bug?<br>
<font color="#888888"><br>
-Eli<br>
</font></blockquote></div><br></div>