xref: /freebsd/contrib/llvm-project/lld/COFF/COFFLinkerContext.cpp (revision 6a05f1438145c2d8c3d0e29e1d5e24a05d394453)
1 //===- COFFContext.cpp ----------------------------------------------------===//
2 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3 // See https://llvm.org/LICENSE.txt for license information.
4 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // Description
9 //
10 //===----------------------------------------------------------------------===//
11 
12 #include "COFFLinkerContext.h"
13 #include "lld/Common/Memory.h"
14 #include "llvm/DebugInfo/CodeView/TypeHashing.h"
15 
16 namespace lld {
17 namespace coff {
18 
19 COFFLinkerContext::COFFLinkerContext()
20     : symtab(*this), rootTimer("Total Linking Time"),
21       inputFileTimer("Input File Reading", rootTimer),
22       ltoTimer("LTO", rootTimer), gcTimer("GC", rootTimer),
23       icfTimer("ICF", rootTimer), codeLayoutTimer("Code Layout", rootTimer),
24       outputCommitTimer("Commit Output File", rootTimer),
25       totalMapTimer("MAP Emission (Cumulative)", rootTimer),
26       symbolGatherTimer("Gather Symbols", totalMapTimer),
27       symbolStringsTimer("Build Symbol Strings", totalMapTimer),
28       writeTimer("Write to File", totalMapTimer),
29       totalPdbLinkTimer("PDB Emission (Cumulative)", rootTimer),
30       addObjectsTimer("Add Objects", totalPdbLinkTimer),
31       typeMergingTimer("Type Merging", addObjectsTimer),
32       loadGHashTimer("Global Type Hashing", addObjectsTimer),
33       mergeGHashTimer("GHash Type Merging", addObjectsTimer),
34       symbolMergingTimer("Symbol Merging", addObjectsTimer),
35       publicsLayoutTimer("Publics Stream Layout", totalPdbLinkTimer),
36       tpiStreamLayoutTimer("TPI Stream Layout", totalPdbLinkTimer),
37       diskCommitTimer("Commit to Disk", totalPdbLinkTimer) {}
38 
39 } // namespace coff
40 } // namespace lld
41