[LLVMbugs] [Bug 5260] New: llvm-ld: loading .o files from .a files very slow

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Oct 20 09:21:08 PDT 2009


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

           Summary: llvm-ld: loading .o files from .a files very slow
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


When doing LTO, and trying to link llc, it takes 1m48s (with -disable-opt).
If I link just the .a files, it takes 1m25s.
If I extract the .a files to .o files and link the .o files it takes 22s.

Extracting the .a files to .o files takes 0.3s with llvm-ar, so llvm-ld is
wasting time somewhere.

To reproduce:
tar xjvf foo.tar.bz2 && cd foo
time llvm-ld -disable-opt *.a

time for i in *.a; do llvm-ar x $i; done
time llvm-ld -disable-opt *.o

The latter is much faster than llvm-ld on the .a files!

Note: I've run the tests in /tmp, and my /tmp is in RAM (using tmpfs), so there
is no disk I/O penalty involved.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list