]> granicus.if.org Git - llvm/commit
[LTO] Print time-passes information at conclusion of LTO codegen
authorJames Henderson <jh7370@my.bristol.ac.uk>
Tue, 16 May 2017 09:43:21 +0000 (09:43 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Tue, 16 May 2017 09:43:21 +0000 (09:43 +0000)
commit97f3849c4f602e7f1174a4cd51a07e9ffab9dd4b
treeb85793af04f8f879ae28d058ae21e3dbf96a9ab3
parente413590ae24728862a4b277d67485bce7e190301
[LTO] Print time-passes information at conclusion of LTO codegen

The information collected when requested by -time-passes is only printed when
llvm_shutdown is called at the moment. This means that when linking against the LTO
library dynamically and using the C interface, it is not possible to see the timing
information, because llvm_shutdown cannot be called. This change modifies the LTO
code generation functions for both regular LTO and thin LTO to explicitly print and
reset the timing information.

I have tested that this works with our proprietary linker. However, as this relies
on a specific method of building and linking against the LTO library, I'm not sure
how or if this can be tested in the LLVM testsuite.

Reviewed by: mehdi_amini

Differential Revision: https://reviews.llvm.org/D32803

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303152 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/LegacyPassManager.h
lib/IR/LegacyPassManager.cpp
lib/LTO/LTOCodeGenerator.cpp
lib/LTO/ThinLTOCodeGenerator.cpp