Add support for -Oplayground and add some sanity tests for it.

Right now this is just like -Onone. We will add further optimizations as
needed.

<rdar://problem/19328293>

Swift SVN r25377
This commit is contained in:
Michael Gottesman
2015-02-18 22:30:26 +00:00
parent 4cf775f37a
commit a598b46fc1
4 changed files with 65 additions and 0 deletions

View File

@@ -785,6 +785,9 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
// Removal of cond_fail (overflow on binary operations).
Opts.RemoveRuntimeAsserts = true;
Opts.AssertConfig = SILOptions::Fast;
} else if (A->getOption().matches(OPT_Oplayground)) {
// For now -Oplayground is equivalent to -Onone.
IRGenOpts.Optimize = false;
} else {
assert(A->getOption().matches(OPT_O));
IRGenOpts.Optimize = true;