236
|
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::coff {
|
|
17
|
|
18 COFFLinkerContext::COFFLinkerContext()
|
|
19 : symtab(*this), rootTimer("Total Linking Time"),
|
|
20 inputFileTimer("Input File Reading", rootTimer),
|
|
21 ltoTimer("LTO", rootTimer), gcTimer("GC", rootTimer),
|
|
22 icfTimer("ICF", rootTimer), codeLayoutTimer("Code Layout", rootTimer),
|
|
23 outputCommitTimer("Commit Output File", rootTimer),
|
|
24 totalMapTimer("MAP Emission (Cumulative)", rootTimer),
|
|
25 symbolGatherTimer("Gather Symbols", totalMapTimer),
|
|
26 symbolStringsTimer("Build Symbol Strings", totalMapTimer),
|
|
27 writeTimer("Write to File", totalMapTimer),
|
|
28 totalPdbLinkTimer("PDB Emission (Cumulative)", rootTimer),
|
|
29 addObjectsTimer("Add Objects", totalPdbLinkTimer),
|
|
30 typeMergingTimer("Type Merging", addObjectsTimer),
|
|
31 loadGHashTimer("Global Type Hashing", addObjectsTimer),
|
|
32 mergeGHashTimer("GHash Type Merging", addObjectsTimer),
|
|
33 symbolMergingTimer("Symbol Merging", addObjectsTimer),
|
|
34 publicsLayoutTimer("Publics Stream Layout", totalPdbLinkTimer),
|
|
35 tpiStreamLayoutTimer("TPI Stream Layout", totalPdbLinkTimer),
|
|
36 diskCommitTimer("Commit to Disk", totalPdbLinkTimer) {}
|
|
37
|
|
38 } // namespace lld::coff
|