[llvm-bugs] [Bug 25245] New: clang takes a long time to compile an empty file including ExecutionEngine/Interpreter.h

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 18 15:44:14 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=25245

            Bug ID: 25245
           Summary: clang takes a long time to compile an empty file
                    including ExecutionEngine/Interpreter.h
           Product: clang
           Version: trunk
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

While experimenting with the JIT, I noticed that clang takes *a lot* of time to
compile a file that includes ExecutionEngine/Interpreter.h.

$ cat factorial.cpp 
#include "llvm/ExecutionEngine/Interpreter.h"

int main(void) {}

$ time  clang++ -v -c -std=c++11 -g -fno-rtti factorial.cpp `llvm-config
--cppflags interpreter support core mcjit native nativecodegen` -o factorial

[...]
real    0m12.204s
user    0m12.064s
sys     0m0.126s

Time shows up all the CPU time is spent in userland, and some additional
profiling shows that we spend large part of our cycles in the parser (the
output is (unfortunately) a little bit messy but you can click on the
rectangles to zoom in)
https://people.freebsd.org/~davide/pics/clang_takes_forever.svg 

Is this something that can be worked around/improved?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151018/a88056b9/attachment-0001.html>


More information about the llvm-bugs mailing list