[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:

http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021209/001946.html
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20021209/001947.html

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  :)

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/




More information about the llvm-dev mailing list