[LLVMbugs] [Bug 75] New: CFE pessimizes constant initializer of auto sbyte* array

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Thu Oct 30 11:01:00 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=75

           Summary: CFE pessimizes constant initializer of auto sbyte* array
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: sabre at nondot.org
        ReportedBy: gaeke+bugs at uiuc.edu


barf.c:
 void
 preformatted_filter(void)
 {
  char head[20000]="";
 }

% llvm-gcc -S barf.c

The above tries to explicitly initialize every single one of the 20000 bytes of
head[] using a gep/store pair. I think it should just zero the first byte. At
the very least, it should call memset(), or generate a loop, or anything other
than what it does now.

Why did I notice, you might ask? A program in xf86 4.3.0 uses a couple of huge
arrays like this, and llvm-gcc turns 345 lines of preprocessed C into a 622
kilobyte bytecode file, on which gccas proceeds to run for an extremely long
time. The slow pass in question is gcse. I let it run on the full version of the
above function for 10 minutes before giving up on it.



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