[PATCH] D102888: [PDB] Enable parallel ghash type merging by default
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 27 14:19:54 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG109aac92128c: [PDB] Enable parallel ghash type merging by default (authored by rnk).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102888/new/
https://reviews.llvm.org/D102888
Files:
lld/COFF/Driver.cpp
lld/test/COFF/pdb-type-server-simple.test
Index: lld/test/COFF/pdb-type-server-simple.test
===================================================================
--- lld/test/COFF/pdb-type-server-simple.test
+++ lld/test/COFF/pdb-type-server-simple.test
@@ -20,7 +20,7 @@
RUN: yaml2obj %S/Inputs/pdb-type-server-simple-a.yaml -o a.obj
RUN: yaml2obj %S/Inputs/pdb-type-server-simple-b.yaml -o b.obj
RUN: llvm-pdbutil yaml2pdb %S/Inputs/pdb-type-server-simple-ts.yaml -pdb ts.pdb
-RUN: lld-link a.obj b.obj -entry:main -debug -out:t.exe -pdb:t.pdb -nodefaultlib -summary | FileCheck %s -check-prefix SUMMARY
+RUN: lld-link a.obj b.obj -entry:main -debug:noghash -out:t.exe -pdb:t.pdb -nodefaultlib -summary | FileCheck %s -check-prefix SUMMARY
RUN: llvm-pdbutil dump -symbols -types -ids -globals %t/t.pdb | FileCheck %s
Re-run with /DEBUG:GHASH
Index: lld/COFF/Driver.cpp
===================================================================
--- lld/COFF/Driver.cpp
+++ lld/COFF/Driver.cpp
@@ -693,7 +693,16 @@
return std::string(data.str());
}
-enum class DebugKind { Unknown, None, Full, FastLink, GHash, Dwarf, Symtab };
+enum class DebugKind {
+ Unknown,
+ None,
+ Full,
+ FastLink,
+ GHash,
+ NoGHash,
+ Dwarf,
+ Symtab
+};
static DebugKind parseDebugKind(const opt::InputArgList &args) {
auto *a = args.getLastArg(OPT_debug, OPT_debug_opt);
@@ -703,14 +712,15 @@
return DebugKind::Full;
DebugKind debug = StringSwitch<DebugKind>(a->getValue())
- .CaseLower("none", DebugKind::None)
- .CaseLower("full", DebugKind::Full)
- .CaseLower("fastlink", DebugKind::FastLink)
- // LLD extensions
- .CaseLower("ghash", DebugKind::GHash)
- .CaseLower("dwarf", DebugKind::Dwarf)
- .CaseLower("symtab", DebugKind::Symtab)
- .Default(DebugKind::Unknown);
+ .CaseLower("none", DebugKind::None)
+ .CaseLower("full", DebugKind::Full)
+ .CaseLower("fastlink", DebugKind::FastLink)
+ // LLD extensions
+ .CaseLower("ghash", DebugKind::GHash)
+ .CaseLower("noghash", DebugKind::NoGHash)
+ .CaseLower("dwarf", DebugKind::Dwarf)
+ .CaseLower("symtab", DebugKind::Symtab)
+ .Default(DebugKind::Unknown);
if (debug == DebugKind::FastLink) {
warn("/debug:fastlink unsupported; using /debug:full");
@@ -1393,7 +1403,7 @@
// Handle /debug
DebugKind debug = parseDebugKind(args);
if (debug == DebugKind::Full || debug == DebugKind::Dwarf ||
- debug == DebugKind::GHash) {
+ debug == DebugKind::GHash || debug == DebugKind::NoGHash) {
config->debug = true;
config->incremental = true;
}
@@ -1416,7 +1426,8 @@
// Handle /pdb
bool shouldCreatePDB =
- (debug == DebugKind::Full || debug == DebugKind::GHash);
+ (debug == DebugKind::Full || debug == DebugKind::GHash ||
+ debug == DebugKind::NoGHash);
if (shouldCreatePDB) {
if (auto *arg = args.getLastArg(OPT_pdb))
config->pdbPath = arg->getValue();
@@ -1749,7 +1760,7 @@
config->terminalServerAware =
!config->dll && args.hasFlag(OPT_tsaware, OPT_tsaware_no, true);
config->debugDwarf = debug == DebugKind::Dwarf;
- config->debugGHashes = debug == DebugKind::GHash;
+ config->debugGHashes = debug == DebugKind::GHash || debug == DebugKind::Full;
config->debugSymtab = debug == DebugKind::Symtab;
config->autoImport =
args.hasFlag(OPT_auto_import, OPT_auto_import_no, config->mingw);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102888.348388.patch
Type: text/x-patch
Size: 3673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/fa2a8381/attachment.bin>
More information about the llvm-commits
mailing list