Skip to content

Commit a3800ad

Browse files
committed
Revert "[llvm] Preliminary fat-lto-objects support"
There seems to be a problem on arm buildbots. Reverting until I can investigate. https://lab.llvm.org/buildbot#builders/245/builds/10184 This reverts commit a67208e and dependent commit e54a311.
1 parent 62fa708 commit a3800ad

14 files changed

+1
-300
lines changed

llvm/docs/FatLTO.rst

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

llvm/docs/ReleaseNotes.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ Changes to LLVM infrastructure
8080
* InstructionSimplify APIs now require instructions be inserted into a
8181
parent function.
8282

83-
* A new FatLTO pipeline was added to support generating object files that have
84-
both machine code and LTO compatible bitcode. See the :doc:`FatLTO`
85-
documentation and the original
86-
`RFC <https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977>`_
87-
for more details.
88-
8983
Changes to building LLVM
9084
------------------------
9185

llvm/docs/UserGuides.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ intermediate LLVM representation.
3232
DebuggingJITedCode
3333
DirectXUsage
3434
Docker
35-
FatLTO
3635
ExtendingLLVM
3736
GoldPlugin
3837
HowToBuildOnARM

llvm/include/llvm/Passes/PassBuilder.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,18 +234,6 @@ class PassBuilder {
234234
ModulePassManager buildPerModuleDefaultPipeline(OptimizationLevel Level,
235235
bool LTOPreLink = false);
236236

237-
/// Build a fat object default optimization pipeline.
238-
///
239-
/// This builds a pipeline that runs the LTO/ThinLTO pre-link pipeline, and
240-
/// emits a section containing the pre-link bitcode along side the object code
241-
/// generated by running the PerModuleDefaultPipeline, used when compiling
242-
/// without LTO. It clones the module and runs the LTO/non-LTO pipelines
243-
/// separately to avoid any inconsistencies with an ad-hoc pipeline that tries
244-
/// to approximate the PerModuleDefaultPipeline from the pre-link LTO
245-
/// pipelines.
246-
ModulePassManager buildFatLTODefaultPipeline(OptimizationLevel Level,
247-
bool ThinLTO, bool EmitSummary);
248-
249237
/// Build a pre-link, ThinLTO-targeting default optimization pipeline to
250238
/// a pass manager.
251239
///

llvm/include/llvm/Transforms/IPO/EmbedBitcodePass.h

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

llvm/lib/Object/ObjectFile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ uint32_t ObjectFile::getSymbolAlignment(DataRefImpl DRI) const { return 0; }
7979
bool ObjectFile::isSectionBitcode(DataRefImpl Sec) const {
8080
Expected<StringRef> NameOrErr = getSectionName(Sec);
8181
if (NameOrErr)
82-
return *NameOrErr == ".llvmbc" || *NameOrErr == ".llvm.lto";
82+
return *NameOrErr == ".llvmbc";
8383
consumeError(NameOrErr.takeError());
8484
return false;
8585
}

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
#include "llvm/Transforms/IPO/CrossDSOCFI.h"
103103
#include "llvm/Transforms/IPO/DeadArgumentElimination.h"
104104
#include "llvm/Transforms/IPO/ElimAvailExtern.h"
105-
#include "llvm/Transforms/IPO/EmbedBitcodePass.h"
106105
#include "llvm/Transforms/IPO/ForceFunctionAttrs.h"
107106
#include "llvm/Transforms/IPO/FunctionAttrs.h"
108107
#include "llvm/Transforms/IPO/FunctionImport.h"
@@ -739,26 +738,6 @@ Expected<HWAddressSanitizerOptions> parseHWASanPassOptions(StringRef Params) {
739738
return Result;
740739
}
741740

742-
Expected<EmbedBitcodeOptions> parseEmbedBitcodePassOptions(StringRef Params) {
743-
EmbedBitcodeOptions Result;
744-
while (!Params.empty()) {
745-
StringRef ParamName;
746-
std::tie(ParamName, Params) = Params.split(';');
747-
748-
if (ParamName == "thinlto") {
749-
Result.IsThinLTO = true;
750-
} else if (ParamName == "emit-summary") {
751-
Result.EmitLTOSummary = true;
752-
} else {
753-
return make_error<StringError>(
754-
formatv("invalid EmbedBitcode pass parameter '{0}' ", ParamName)
755-
.str(),
756-
inconvertibleErrorCode());
757-
}
758-
}
759-
return Result;
760-
}
761-
762741
Expected<MemorySanitizerOptions> parseMSanPassOptions(StringRef Params) {
763742
MemorySanitizerOptions Result;
764743
while (!Params.empty()) {

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include "llvm/Transforms/IPO/CrossDSOCFI.h"
4747
#include "llvm/Transforms/IPO/DeadArgumentElimination.h"
4848
#include "llvm/Transforms/IPO/ElimAvailExtern.h"
49-
#include "llvm/Transforms/IPO/EmbedBitcodePass.h"
5049
#include "llvm/Transforms/IPO/ForceFunctionAttrs.h"
5150
#include "llvm/Transforms/IPO/FunctionAttrs.h"
5251
#include "llvm/Transforms/IPO/GlobalDCE.h"
@@ -1465,18 +1464,7 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level,
14651464

14661465
if (LTOPreLink)
14671466
addRequiredLTOPreLinkPasses(MPM);
1468-
return MPM;
1469-
}
14701467

1471-
ModulePassManager
1472-
PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO,
1473-
bool EmitSummary) {
1474-
ModulePassManager MPM;
1475-
MPM.addPass(EmbedBitcodePass(ThinLTO, EmitSummary,
1476-
ThinLTO
1477-
? buildThinLTOPreLinkDefaultPipeline(Level)
1478-
: buildLTOPreLinkDefaultPipeline(Level)));
1479-
MPM.addPass(buildPerModuleDefaultPipeline(Level));
14801468
return MPM;
14811469
}
14821470

llvm/lib/Passes/PassRegistry.def

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,6 @@ MODULE_PASS_WITH_PARAMS("ipsccp",
170170
},
171171
parseIPSCCPOptions,
172172
"no-func-spec;func-spec")
173-
MODULE_PASS_WITH_PARAMS("embed-bitcode",
174-
"EmbedBitcodePass",
175-
[](EmbedBitcodeOptions Opts) {
176-
return EmbedBitcodePass(Opts);
177-
},
178-
parseEmbedBitcodePassOptions,
179-
"thinlto;emit-summary")
180173
#undef MODULE_PASS_WITH_PARAMS
181174

182175
#ifndef CGSCC_ANALYSIS

llvm/lib/Transforms/IPO/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ add_llvm_component_library(LLVMipo
1111
CrossDSOCFI.cpp
1212
DeadArgumentElimination.cpp
1313
ElimAvailExtern.cpp
14-
EmbedBitcodePass.cpp
1514
ExtractGV.cpp
1615
ForceFunctionAttrs.cpp
1716
FunctionAttrs.cpp

llvm/lib/Transforms/IPO/EmbedBitcodePass.cpp

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

llvm/test/Transforms/EmbedBitcode/embed-multiple.ll

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

llvm/test/Transforms/EmbedBitcode/embed-unsupported-object-format.ll

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

llvm/test/Transforms/EmbedBitcode/embed.ll

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

0 commit comments

Comments
 (0)