Skip to content

Commit 9de2603

Browse files
author
Kyungwoo Lee
committed
Revert "[CGData] LLD for MachO (#90166)"
This reverts commit 00c0b1a.
1 parent 00c0b1a commit 9de2603

File tree

7 files changed

+0
-135
lines changed

7 files changed

+0
-135
lines changed

lld/MachO/Config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ struct Configuration {
210210
std::vector<SectionAlign> sectionAlignments;
211211
std::vector<SegmentProtection> segmentProtections;
212212
bool ltoDebugPassManager = false;
213-
llvm::StringRef codegenDataGeneratePath;
214213
bool csProfileGenerate = false;
215214
llvm::StringRef csProfilePath;
216215
bool pgoWarnMismatch;

lld/MachO/Driver.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "llvm/ADT/StringRef.h"
3737
#include "llvm/BinaryFormat/MachO.h"
3838
#include "llvm/BinaryFormat/Magic.h"
39-
#include "llvm/CGData/CodeGenDataWriter.h"
4039
#include "llvm/Config/llvm-config.h"
4140
#include "llvm/LTO/LTO.h"
4241
#include "llvm/Object/Archive.h"
@@ -1323,37 +1322,6 @@ static void gatherInputSections() {
13231322
}
13241323
}
13251324

1326-
static void codegenDataGenerate() {
1327-
TimeTraceScope timeScope("Generating codegen data");
1328-
1329-
OutlinedHashTreeRecord globalOutlineRecord;
1330-
for (ConcatInputSection *isec : inputSections)
1331-
if (isec->getSegName() == segment_names::data &&
1332-
isec->getName() == section_names::outlinedHashTree) {
1333-
// Read outlined hash tree from each section.
1334-
OutlinedHashTreeRecord localOutlineRecord;
1335-
auto *data = isec->data.data();
1336-
localOutlineRecord.deserialize(data);
1337-
1338-
// Merge it to the global hash tree.
1339-
globalOutlineRecord.merge(localOutlineRecord);
1340-
}
1341-
1342-
CodeGenDataWriter Writer;
1343-
if (!globalOutlineRecord.empty())
1344-
Writer.addRecord(globalOutlineRecord);
1345-
1346-
std::error_code EC;
1347-
auto fileName = config->codegenDataGeneratePath;
1348-
assert(!fileName.empty());
1349-
raw_fd_ostream Output(fileName, EC, sys::fs::OF_None);
1350-
if (EC)
1351-
error("fail to create " + fileName + ": " + EC.message());
1352-
1353-
if (auto E = Writer.write(Output))
1354-
error("fail to write CGData: " + toString(std::move(E)));
1355-
}
1356-
13571325
static void foldIdenticalLiterals() {
13581326
TimeTraceScope timeScope("Fold identical literals");
13591327
// We always create a cStringSection, regardless of whether dedupLiterals is
@@ -1791,8 +1759,6 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
17911759
config->ignoreAutoLinkOptions.insert(arg->getValue());
17921760
config->strictAutoLink = args.hasArg(OPT_strict_auto_link);
17931761
config->ltoDebugPassManager = args.hasArg(OPT_lto_debug_pass_manager);
1794-
config->codegenDataGeneratePath =
1795-
args.getLastArgValue(OPT_codegen_data_generate_path);
17961762
config->csProfileGenerate = args.hasArg(OPT_cs_profile_generate);
17971763
config->csProfilePath = args.getLastArgValue(OPT_cs_profile_path);
17981764
config->pgoWarnMismatch =
@@ -2137,10 +2103,6 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
21372103
}
21382104

21392105
gatherInputSections();
2140-
2141-
if (!config->codegenDataGeneratePath.empty())
2142-
codegenDataGenerate();
2143-
21442106
if (config->callGraphProfileSort)
21452107
priorityBuilder.extractCallGraphProfile();
21462108

lld/MachO/InputSection.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ constexpr const char objcMethname[] = "__objc_methname";
354354
constexpr const char objcNonLazyCatList[] = "__objc_nlcatlist";
355355
constexpr const char objcNonLazyClassList[] = "__objc_nlclslist";
356356
constexpr const char objcProtoList[] = "__objc_protolist";
357-
constexpr const char outlinedHashTree[] = "__llvm_outline";
358357
constexpr const char pageZero[] = "__pagezero";
359358
constexpr const char pointers[] = "__pointers";
360359
constexpr const char rebase[] = "__rebase";

lld/MachO/Options.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ def no_objc_category_merging : Flag<["-"], "no_objc_category_merging">,
162162
Group<grp_lld>;
163163
def lto_debug_pass_manager: Flag<["--"], "lto-debug-pass-manager">,
164164
HelpText<"Debug new pass manager">, Group<grp_lld>;
165-
def codegen_data_generate_path : Separate<["--"], "codegen-data-generate-path">, Group<grp_lld>;
166-
def codegen_data_generate_path_eq : Joined<["--"], "codegen-data-generate-path=">,
167-
Alias<!cast<Separate>(codegen_data_generate_path)>, MetaVarName<"<cgdata>">,
168-
HelpText<"Write the CG data to the specified path <cgdata>.">, Group<grp_lld>;
169165
def cs_profile_generate: Flag<["--"], "cs-profile-generate">,
170166
HelpText<"Perform context sensitive PGO instrumentation">, Group<grp_lld>;
171167
def cs_profile_path: Joined<["--"], "cs-profile-path=">,

lld/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ if (NOT LLD_BUILT_STANDALONE)
4848
llvm-ar
4949
llvm-as
5050
llvm-bcanalyzer
51-
llvm-cgdata
5251
llvm-config
5352
llvm-cvtres
5453
llvm-dis

lld/test/MachO/cgdata-generate.s

Lines changed: 0 additions & 89 deletions
This file was deleted.

lld/test/lit.cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
tool_patterns = [
4141
"llc",
4242
"llvm-as",
43-
"llvm-cgdata",
4443
"llvm-mc",
4544
"llvm-nm",
4645
"llvm-objdump",

0 commit comments

Comments
 (0)