mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: store IRGenOptions in SILModule
SIL optimization passes can use the IRGen options to do target specific optimizations.
This commit is contained in:
@@ -766,7 +766,9 @@ bool swift::performCompileStepsPostSema(CompilerInstance &Instance,
|
||||
const PrimarySpecificPaths PSPs =
|
||||
Instance.getPrimarySpecificPathsForWholeModuleOptimizationMode();
|
||||
SILOptions SILOpts = getSILOptions(PSPs);
|
||||
auto SM = performASTLowering(mod, Instance.getSILTypes(), SILOpts);
|
||||
IRGenOptions irgenOpts = Invocation.getIRGenOptions();
|
||||
auto SM = performASTLowering(mod, Instance.getSILTypes(), SILOpts,
|
||||
&irgenOpts);
|
||||
return performCompileStepsPostSILGen(Instance, std::move(SM), mod, PSPs,
|
||||
ReturnValue, observer);
|
||||
}
|
||||
@@ -779,8 +781,9 @@ bool swift::performCompileStepsPostSema(CompilerInstance &Instance,
|
||||
const PrimarySpecificPaths PSPs =
|
||||
Instance.getPrimarySpecificPathsForSourceFile(*PrimaryFile);
|
||||
SILOptions SILOpts = getSILOptions(PSPs);
|
||||
IRGenOptions irgenOpts = Invocation.getIRGenOptions();
|
||||
auto SM = performASTLowering(*PrimaryFile, Instance.getSILTypes(),
|
||||
SILOpts);
|
||||
SILOpts, &irgenOpts);
|
||||
result |= performCompileStepsPostSILGen(Instance, std::move(SM),
|
||||
PrimaryFile, PSPs, ReturnValue,
|
||||
observer);
|
||||
|
||||
Reference in New Issue
Block a user