[LLVMdev] really long time to compile

Chris Lattner sabre at nondot.org
Sat Dec 14 21:58:01 PST 2002

> Can anyone suggest any reasons why this seemingly-innocuous (though
> stupid-looking) excerpt from gnu fileutils 4.1 would make llvm-gcc
> go so incredibly slowly? It doesn't seem to be a question of the
> size of the output.

As it turns out, it was (suprisingly) the reassociate pass that was taking
the huge amounts of time.  This is fixed by applying these two patches:


The first patch is just a cleanup patch which simplifies moving an
instruction, the second fixes the problem by introducing a cache to avoid
some pretty incredible recomputation for this testcase.

Thanks for finding this, in my debug build, reassociate went from taking
> 27 seconds on this testcase to .35  :)



More information about the llvm-dev mailing list