Stack overflow in EarlyCSE

Hi Chris (or anyone else),

Today I ran across a stack overflow in EarlyCSE::processNode().

Basically, the issue is that EarlyCSE::processNode() is recursive and with a very large function, such as the machine generated one I have, it blows the stack.

The attached script generates a function which re-creates the problem. On my 64-bit FreeBSD 7.3 build machine I come across this issue with a function as short as 5800 lines, possibly shorter. gcc 4.3 does not display the same issue.

Is there an easy fix for this?

Thanks,
-Lenny

clang-earlycse-generator.py (506 Bytes)