mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a new -assume-single-threaded option
This is a hidden option. It should be used like: -assume-single-threaded When this function is provided, the compiler assumes that the code will be executed in the single threaded mode. It then performs certain optimizations that can benefit from it, e.g. it marks as non-atomic all reference counting instructions in the user code being compiled.
This commit is contained in:
@@ -1114,6 +1114,10 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
}
|
||||
}
|
||||
|
||||
if (Args.getLastArg(OPT_AssumeSingleThreaded)) {
|
||||
Opts.AssumeSingleThreaded = true;
|
||||
}
|
||||
|
||||
// Parse the assert configuration identifier.
|
||||
if (const Arg *A = Args.getLastArg(OPT_AssertConfig)) {
|
||||
StringRef Configuration = A->getValue();
|
||||
|
||||
Reference in New Issue
Block a user