[LLVMbugs] [Bug 1432] NEW: Slow compilation time and unefficient code generated

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu May 17 08:13:18 PDT 2007


http://llvm.org/bugs/show_bug.cgi?id=1432

           Summary: Slow compilation time and unefficient code generated
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: asl at math.spbu.ru


Consider attached preprocessed source (bzipped, from recent Qt 4.3).

llvm-gcc compilation took ~30 minutes here (I killed llvm-gcc on my notebook
after ~4 hours of compilation and recompiled with -O0). Almost all the time is
spent in LCSSA. Generated code for "execute" function is ugly: it uses 30k of
stack (compare with 3k stack of gcc-compiled version) and is full of useless moves.

I've tried to dig into the problem. At the LCSSA entry (well, actually
loop-unswitch) bitcode file is ~10M and contains 68k phi nodes. LCSSA transforms
it into 50M bitcode file (I haven't counted phi nodes there). After some
optimizations the bitcode size is reduced to 9M, but still is full of phi nodes.

The resulting uglyness of code is due to such huge amount of phis.

Please note, that I wasn't be able to reproduce this bad behaviour just taking
-O0 output and running "opt -std-compile-opts". Instead of this, I had to
disable "PerModulePasses" in llvm-gcc, grab the output of "PerFunctionPasses"
and run "opt -std-compile-opts" after. I can also attach/send bytecode after
"PerFunctionPasses" or just before loop-unswitch (~10M bitcode, 4M bzippped .ll).



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list