Skip to content

Commit 8eff7e4

Browse files
Revert all experimental cross module opt related code (#3340)
* Revert all experimental cross module opt related code * Remove `cross_module_opt_main.cpp` from `CMakeLists.txt` * Remove swiftStandaloneRuntime target and related lines * Remove swift-module-summary-test from lit.cfg and restore the accidentally deleted line * Remove LTO test runner from ci script * Revert "[WASM] Use swift-autolink-extract for wasm target LLVM LTO" This reverts commit 69174f1. * Remove remained parts of LTO changes Co-authored-by: Max Desiatov <[email protected]>
1 parent 90b5195 commit 8eff7e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+63
-3473
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,6 @@ class IRGenOptions {
274274
/// Frameworks that we should not autolink against.
275275
SmallVector<std::string, 1> DisableAutolinkFrameworks;
276276

277-
/// Disable autolinking swiftCore for stdlib thin CMO
278-
unsigned DisableAutolinkStdlib : 1;
279-
280277
/// Print the LLVM inline tree at the end of the LLVM pass pipeline.
281278
unsigned PrintInlineTree : 1;
282279

@@ -392,7 +389,6 @@ class IRGenOptions {
392389
DisableLLVMOptzns(false), DisableSwiftSpecificLLVMOptzns(false),
393390
DisableLLVMSLPVectorizer(false), Playground(false),
394391
EmitStackPromotionChecks(false), FunctionSections(false),
395-
DisableAutolinkStdlib(false),
396392
PrintInlineTree(false), EmbedMode(IRGenEmbedMode::None),
397393
LLVMLTOKind(IRGenLLVMLTOKind::None), HasValueNamesSetting(false),
398394
ValueNames(false), EnableReflectionMetadata(true),

include/swift/AST/SILOptions.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,6 @@ class SILOptions {
185185
/// }
186186
bool EnableDynamicReplacementCanCallPreviousImplementation = true;
187187

188-
/// Enable large loadable types IRGen pass.
189-
bool EnableLargeLoadableTypes = true;
190-
191-
/// The path to combined module summary file
192-
std::string ModuleSummaryPath;
193-
194188
/// The name of the file to which the backend should save optimization
195189
/// records.
196190
std::string OptRecordFile;

include/swift/Frontend/FrontendOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ class FrontendOptions {
7474
/// The path to which we should store indexing data, if any.
7575
std::string IndexStorePath;
7676

77-
/// The path to which we should emit combined module summary file
78-
std::string ModuleSummaryOutputPath;
79-
8077
/// The path to load access notes from.
8178
std::string AccessNotesPath;
8279

include/swift/Option/Options.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ namespace options {
4040
SwiftAPIExtractOption = (1 << 15),
4141
SwiftSymbolGraphExtractOption = (1 << 16),
4242
SwiftAPIDigesterOption = (1 << 17),
43-
SwiftMergeModuleSummaryOption = (1 << 18),
4443
};
4544

4645
enum ID {

include/swift/Option/Options.td

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ def SwiftSymbolGraphExtractOption : OptionFlag;
6464
// The option should be accepted by swift-api-digester.
6565
def SwiftAPIDigesterOption : OptionFlag;
6666

67-
def SwiftMergeModuleSummaryOption : OptionFlag;
68-
6967
/////////
7068
// Options
7169

@@ -182,7 +180,6 @@ def driver_mode : Joined<["--"], "driver-mode=">, Flags<[HelpHidden]>,
182180
def help : Flag<["-", "--"], "help">,
183181
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
184182
SwiftIndentOption, SwiftAPIExtractOption,
185-
SwiftMergeModuleSummaryOption,
186183
SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>,
187184
HelpText<"Display available options">;
188185
def h : Flag<["-"], "h">, Alias<help>;
@@ -207,7 +204,6 @@ def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
207204
def o : JoinedOrSeparate<["-"], "o">,
208205
Flags<[FrontendOption, AutolinkExtractOption, ModuleWrapOption,
209206
NoInteractiveOption, SwiftIndentOption, ArgumentIsPath,
210-
SwiftMergeModuleSummaryOption,
211207
SwiftAPIExtractOption, SwiftAPIDigesterOption]>,
212208
HelpText<"Write output to <file>">, MetaVarName<"<file>">;
213209

@@ -455,9 +451,6 @@ def emit_module_summary_path :
455451
Flags<[FrontendOption, NoInteractiveOption, ArgumentIsPath,
456452
SupplementaryOutput]>,
457453
MetaVarName<"<path>">, HelpText<"Output module summary file to <path>">;
458-
def module_summary_path : Separate<["-"], "module-summary-path">,
459-
Flags<[FrontendOption, ArgumentIsPath]>, MetaVarName<"<path>">,
460-
HelpText<"Combined module summary file <path>">;
461454

462455
def emit_module_interface :
463456
Flag<["-"], "emit-module-interface">,
@@ -725,10 +718,6 @@ def no_stdlib_rpath: Flag<["-"], "no-stdlib-rpath">,
725718
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
726719
HelpText<"Don't add any rpath entries.">;
727720

728-
def no_stdlib_link: Flag<["-"], "no-stdlib-link">,
729-
Flags<[FrontendOption, DoesNotAffectIncrementalBuild]>,
730-
HelpText<"Don't link stdlib.">;
731-
732721
def static_executable : Flag<["-"], "static-executable">,
733722
HelpText<"Statically link the executable">;
734723
def no_static_executable : Flag<["-"], "no-static-executable">,
@@ -1059,7 +1048,7 @@ def Xclang_linker : Separate<["-"], "Xclang-linker">, Flags<[HelpHidden]>,
10591048
MetaVarName<"<arg>">, HelpText<"Pass <arg> to Clang when it is use for linking.">;
10601049

10611050
def Xllvm : Separate<["-"], "Xllvm">,
1062-
Flags<[FrontendOption, HelpHidden, SwiftMergeModuleSummaryOption]>,
1051+
Flags<[FrontendOption, HelpHidden]>,
10631052
MetaVarName<"<arg>">, HelpText<"Pass <arg> to LLVM.">;
10641053

10651054
def resource_dir : Separate<["-"], "resource-dir">,

include/swift/SIL/ModuleSummary.h

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

include/swift/SIL/SILInstruction.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3297,10 +3297,7 @@ class KeyPathPatternComponent {
32973297
void visitReferencedFunctionsAndMethods(
32983298
std::function<void (SILFunction *)> functionCallBack,
32993299
std::function<void (SILDeclRef)> methodCallBack) const;
3300-
3301-
void clearReferencedFunctions_if(
3302-
llvm::function_ref<bool(SILFunction *)> predicate);
3303-
3300+
33043301
void incrementRefCounts() const;
33053302
void decrementRefCounts() const;
33063303

include/swift/SIL/SILProperty.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,7 @@ class SILProperty : public llvm::ilist_node<SILProperty>,
6767
const Optional<KeyPathPatternComponent> &getComponent() const {
6868
return Component;
6969
}
70-
71-
void clearReferencedFunctions_if(
72-
llvm::function_ref<bool(SILFunction *)> predicate) {
73-
if (Component) {
74-
Component->clearReferencedFunctions_if(predicate);
75-
}
76-
}
77-
70+
7871
void print(SILPrintContext &Ctx) const;
7972
void dump() const;
8073

include/swift/SILOptimizer/PassManager/PassPipeline.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
PASSPIPELINE(Diagnostic, "Guaranteed Passes")
2626
PASSPIPELINE(LowerHopToActor, "Lower Hop to Actor")
2727
PASSPIPELINE(OwnershipEliminator, "Utility pass to just run the ownership eliminator pass")
28-
PASSPIPELINE(CrossModuleEliminator, "Passes run at -module-summary-path")
2928
PASSPIPELINE(Performance, "Passes run at -O")
3029
PASSPIPELINE(Onone, "Passes run at -Onone")
3130
PASSPIPELINE(InstCount, "Utility pipeline to just run the inst count pass")

0 commit comments

Comments
 (0)