[llvm-bugs] [Bug 44293] New: weird InstantiateFunction timings with PCH

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Dec 13 04:35:29 PST 2019


            Bug ID: 44293
           Summary: weird InstantiateFunction timings with PCH
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Keywords: slow-compile
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: trass3r at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

I tested -ftime-trace on a minimal Catch2 setup on Windows (VS2019 Preview):

set CC=clang
set CXX=clang++
cmake -G Ninja ..

When using PCH it mostly spends time instantiating functions in test.cpp of
Oddly it reports most time (over 60ms) is spent on
std::_Hash_representation<float> which simply forwards to _Fnv1a_append_value
which only takes less than 1 ms:


Without PCH it needs 400 us:


Maybe the timings are skewed by some PCH reading?
At least it is misleading when you are looking for optimization opportunities
and it points you at the wrong location.

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/20191213/556df8ee/attachment.html>

More information about the llvm-bugs mailing list