[llvm-commits] [cfe-commits] [PATCH][Review Request] EarlyCSE stack overflow - bugzilla 11794

Eli Friedman eli.friedman at gmail.com
Wed Jan 18 13:34:20 PST 2012


On Wed, Jan 18, 2012 at 1:25 PM, Lenny Maiorani <lenny at colorado.edu> 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



More information about the llvm-commits mailing list