Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/9.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
### Changed
* Change compiler default setting realsig+ when building assemblies ([Issue #17384](https://github.com/dotnet/fsharp/issues/17384), [PR #17378](https://github.com/dotnet/fsharp/pull/17385))
* Change compiler default setting for compressedMetadata ([Issue #17379](https://github.com/dotnet/fsharp/issues/17379), [PR #17383](https://github.com/dotnet/fsharp/pull/17383))
* Enabled by default GraphBasedChecking, ParallelOptimization and ParallelIlxGen optimizations. [PR #17400](https://github.com/dotnet/fsharp/pull/17400)

### Breaking Changes
14 changes: 8 additions & 6 deletions src/Compiler/Driver/CompilerConfig.fs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ type TcConfigBuilder =
mutable emitTailcalls: bool
mutable deterministic: bool
mutable concurrentBuild: bool
mutable graphBasedChecking: bool
mutable parallelOptimization: bool
mutable parallelIlxGen: bool
mutable emitMetadataAssembly: MetadataAssemblyGeneration
mutable preferredUiLang: string option
Expand Down Expand Up @@ -768,7 +770,9 @@ type TcConfigBuilder =
emitTailcalls = true
deterministic = false
concurrentBuild = true
parallelIlxGen = FSharpExperimentalFeaturesEnabledAutomatically
graphBasedChecking = true
parallelOptimization = true
parallelIlxGen = true
emitMetadataAssembly = MetadataAssemblyGeneration.None
preferredUiLang = None
lcid = None
Expand Down Expand Up @@ -814,11 +818,7 @@ type TcConfigBuilder =
captureIdentifiersWhenParsing = false
typeCheckingConfig =
{
TypeCheckingConfig.Mode =
if FSharpExperimentalFeaturesEnabledAutomatically then
TypeCheckingMode.Graph
else
TypeCheckingMode.Sequential
TypeCheckingConfig.Mode = TypeCheckingMode.Graph
DumpGraph = false
}
dumpSignatureData = false
Expand Down Expand Up @@ -1329,6 +1329,8 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
member _.emitTailcalls = data.emitTailcalls
member _.deterministic = data.deterministic
member _.concurrentBuild = data.concurrentBuild
member _.graphBasedChecking = data.graphBasedChecking
member _.parallelOptimization = data.parallelOptimization
member _.parallelIlxGen = data.parallelIlxGen
member _.emitMetadataAssembly = data.emitMetadataAssembly
member _.pathMap = data.pathMap
Expand Down
8 changes: 8 additions & 0 deletions src/Compiler/Driver/CompilerConfig.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ type TcConfigBuilder =

mutable concurrentBuild: bool

mutable graphBasedChecking: bool

mutable parallelOptimization: bool

mutable parallelIlxGen: bool

mutable emitMetadataAssembly: MetadataAssemblyGeneration
Expand Down Expand Up @@ -764,6 +768,10 @@ type TcConfig =

member concurrentBuild: bool

member graphBasedChecking: bool

member parallelOptimization: bool

member parallelIlxGen: bool

member emitMetadataAssembly: MetadataAssemblyGeneration
Expand Down
32 changes: 32 additions & 0 deletions src/Compiler/Driver/CompilerOptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,15 @@ let SetDeterministicSwitch (tcConfigB: TcConfigBuilder) switch =
let SetRealsig (tcConfigB: TcConfigBuilder) switch =
tcConfigB.realsig <- (switch = OptionSwitch.On)

let SetGraphTypeCheck (tcConfigB: TcConfigBuilder) switch =
tcConfigB.graphBasedChecking <- (switch = OptionSwitch.On)

let SetParallelOptimization (tcConfigB: TcConfigBuilder) switch =
tcConfigB.parallelOptimization <- (switch = OptionSwitch.On)

let SetParallelIlxGen (tcConfigB: TcConfigBuilder) switch =
tcConfigB.parallelIlxGen <- (switch = OptionSwitch.On)

let SetReferenceAssemblyOnlySwitch (tcConfigB: TcConfigBuilder) switch =
match tcConfigB.emitMetadataAssembly with
| MetadataAssemblyGeneration.None when (not tcConfigB.standalone) && tcConfigB.extraStaticLinkRoots.IsEmpty ->
Expand Down Expand Up @@ -1048,6 +1057,29 @@ let codeGenerationFlags isFsi (tcConfigB: TcConfigBuilder) =
None,
Some(FSComp.SR.optsReflectionFree ())
)

CompilerOption(
"graphbasedchecking",
tagNone,
OptionSwitch(SetGraphTypeCheck tcConfigB),
None,
Some(FSComp.SR.optsGraphBasedChecking ())
)

CompilerOption(
"paralleloptimization",
tagNone,
OptionSwitch(SetParallelOptimization tcConfigB),
None,
Some(FSComp.SR.optsParallelOptimization ())
)
CompilerOption(
"parallelilxgen",
tagNone,
OptionSwitch(SetParallelIlxGen tcConfigB),
None,
Some(FSComp.SR.optsParallelILXGen ())
)
]

if isFsi then debug @ codegen else debug @ embed @ codegen
Expand Down
3 changes: 3 additions & 0 deletions src/Compiler/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,9 @@ optsEmitDebugInfoInQuotations,"Emit debug information in quotations"
optsPreferredUiLang,"Specify the preferred output language culture name (e.g. es-ES, ja-JP)"
optsNoCopyFsharpCore,"Don't copy FSharp.Core.dll along the produced binaries"
optsSignatureData,"Include F# interface information, the default is file. Essential for distributing libraries."
optsGraphBasedChecking,"Use graph-based checking for type inference"
optsParallelOptimization,"Enable parallel optimization."
optsParallelILXGen,"Enable parallel ILXGen."
1046,optsUnknownSignatureData,"Invalid value '%s' for --interfacedata, valid value are: none, file, compress."
optsOptimizationData,"Specify included optimization information, the default is file. Important for distributed libraries."
1047,optsUnknownOptimizationData,"Invalid value '%s' for --optimizationdata, valid value are: none, file, compress."
Expand Down
15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions src/Compiler/xlf/FSComp.txt.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading