On Wed, Jan 18, 2012 at 1:25 PM, Lenny Maiorani <[email protected]> wrote:
> Hi,
>
> I found a stack overflow in EarlyCSE caused by recursion when provided a very 
> large function. More information in bugzilla - 
> http://llvm.org/bugs/show_bug.cgi?id=11794
>
> Attached is a patch. Please review and I will commit once it is approved.
>
> The patch simply changes the algorithm from being a recursive pre-order 
> depth-first traversal to the same traversal, but using a list as a stack of 
> nodes to process.

The idea looks like it's in the right direction. We generally try to avoid
std::list in LLVM; see
http://llvm.org/docs/ProgrammersManual.html#ds_sequential .

In the future, please don't send patches that don't touch
clang-specific code to cfe-commits.

-Eli
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to