summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2017-05-16 09:43:21 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2017-05-16 09:43:21 +0000
commit852f6fde014b67acb35f1dc633639360f20c48c9 (patch)
tree555d061a997fde757606751701a8f46b788a3302 /llvm/lib/LTO/ThinLTOCodeGenerator.cpp
parent38d79774d06889f0028cb02c79bfc551d0b64d7a (diff)
downloadbcm5719-llvm-852f6fde014b67acb35f1dc633639360f20c48c9.tar.gz
bcm5719-llvm-852f6fde014b67acb35f1dc633639360f20c48c9.zip
[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 llvm-svn: 303152
Diffstat (limited to 'llvm/lib/LTO/ThinLTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/ThinLTOCodeGenerator.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index f3d441db98c..65a7994325b 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -1024,4 +1024,5 @@ void ThinLTOCodeGenerator::run() {
// If statistics were requested, print them out now.
if (llvm::AreStatisticsEnabled())
llvm::PrintStatistics();
+ reportAndResetTimings();
}
OpenPOWER on IntegriCloud