Skip to content

Commit 6085eb3

Browse files
committed
Revert "Reland [llvm] Preliminary fat-lto-objects support"
This reverts commit 44265dc.
1 parent d9688b4 commit 6085eb3

File tree

15 files changed

+1
-287
lines changed

15 files changed

+1
-287
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"
@@ -743,26 +742,6 @@ Expected<HWAddressSanitizerOptions> parseHWASanPassOptions(StringRef Params) {
743742
return Result;
744743
}
745744

746-
Expected<EmbedBitcodeOptions> parseEmbedBitcodePassOptions(StringRef Params) {
747-
EmbedBitcodeOptions Result;
748-
while (!Params.empty()) {
749-
StringRef ParamName;
750-
std::tie(ParamName, Params) = Params.split(';');
751-
752-
if (ParamName == "thinlto") {
753-
Result.IsThinLTO = true;
754-
} else if (ParamName == "emit-summary") {
755-
Result.EmitLTOSummary = true;
756-
} else {
757-
return make_error<StringError>(
758-
formatv("invalid EmbedBitcode pass parameter '{0}' ", ParamName)
759-
.str(),
760-
inconvertibleErrorCode());
761-
}
762-
}
763-
return Result;
764-
}
765-
766745
Expected<MemorySanitizerOptions> parseMSanPassOptions(StringRef Params) {
767746
MemorySanitizerOptions Result;
768747
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
@@ -176,13 +176,6 @@ MODULE_PASS_WITH_PARAMS("ipsccp",
176176
},
177177
parseIPSCCPOptions,
178178
"no-func-spec;func-spec")
179-
MODULE_PASS_WITH_PARAMS("embed-bitcode",
180-
"EmbedBitcodePass",
181-
[](EmbedBitcodeOptions Opts) {
182-
return EmbedBitcodePass(Opts);
183-
},
184-
parseEmbedBitcodePassOptions,
185-
"thinlto;emit-summary")
186179
#undef MODULE_PASS_WITH_PARAMS
187180

188181
#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

0 commit comments

Comments
 (0)