[LLVMbugs] [Bug 1498] NEW: Extremely slow optimization for large arrays

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 4 19:10:10 PDT 2007


           Summary: Extremely slow optimization for large arrays
           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: maarten at treewalker.org

I compile this test program:

class Storage {
	unsigned data[0x2000];

void f(Storage);

void g() {
	Storage storage;

With this command line:

$ time llvm-g++ -O1 --emit-llvm -o slowopt.o -c slowopt.cc

It takes about 20 seconds to compile on my machine (2GHz P4). However, 
with -O0, it compiles in less than a tenth of a second.

The size of the array is crucial in this: doubling the size makes compilation 
take four times as long. So it seems part of the optimization algorithm has a 
running time quadratic in the array size.

I'm using LLVM 2.0, with the fix for bug 1491 applied, and its g++ front-end, 
compiled from source with GCC 4.1.3.

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