Skip to content

Remove local optimizations #4799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 18, 2018
Merged
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
7 changes: 0 additions & 7 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ pipeline:
- cp -R . /tmp/2/ && cd /tmp/2/
- ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"

test_optimised:
group: test
image: lampepfl/dotty:2018-06-29
commands:
- cp -R . /tmp/3/ && cd /tmp/3/
- ./project/scripts/sbt dotty-optimised/test

test_sbt:
group: test
image: lampepfl/dotty:2018-06-29
Expand Down
6 changes: 0 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,29 +1,23 @@
val dotty = Build.dotty
val `dotty-bootstrapped` = Build.`dotty-bootstrapped`
val `dotty-optimised` = Build.`dotty-optimised`
val `dotty-interfaces` = Build.`dotty-interfaces`
val `dotty-doc` = Build.`dotty-doc`
val `dotty-doc-bootstrapped` = Build.`dotty-doc-bootstrapped`
val `dotty-doc-optimised` = Build.`dotty-doc-optimised`
val `dotty-compiler` = Build.`dotty-compiler`
val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped`
val `dotty-compiler-optimised` = Build.`dotty-compiler-optimised`
val `dotty-library` = Build.`dotty-library`
val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped`
val `dotty-library-optimised` = Build.`dotty-library-optimised`
val `dotty-sbt-bridge` = Build.`dotty-sbt-bridge`
val `dotty-sbt-bridge-bootstrapped` = Build.`dotty-sbt-bridge-bootstrapped`
val `dotty-language-server` = Build.`dotty-language-server`
val `dotty-bench` = Build.`dotty-bench`
val `dotty-bench-bootstrapped` = Build.`dotty-bench-bootstrapped`
val `dotty-bench-optimised` = Build.`dotty-bench-optimised`
val `scala-library` = Build.`scala-library`
val `scala-compiler` = Build.`scala-compiler`
val `scala-reflect` = Build.`scala-reflect`
val scalap = Build.scalap
val dist = Build.dist
val `dist-bootstrapped` = Build.`dist-bootstrapped`
val `dist-optimised` = Build.`dist-optimised`

val `sbt-dotty` = Build.`sbt-dotty`
val `vscode-dotty` = Build.`vscode-dotty`
Expand Down
6 changes: 2 additions & 4 deletions compiler/src/dotty/tools/dotc/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import util.FreshNameCreator
import core.DenotTransformers.DenotTransformer
import core.Denotations.SingleDenotation
import dotty.tools.backend.jvm.{CollectSuperCalls, GenBCode, LabelDefs}
import dotty.tools.dotc.transform.localopt.{Simplify, StringInterpolatorOpt}
import dotty.tools.dotc.transform.localopt.StringInterpolatorOpt

/** The central class of the dotc compiler. The job of a compiler is to create
* runs, which process given `phases` in a given `rootContext`.
Expand Down Expand Up @@ -92,7 +92,6 @@ class Compiler {
new ElimOuterSelect, // Expand outer selections
new AugmentScala2Traits, // Expand traits defined in Scala 2.x to simulate old-style rewritings
new ResolveSuper, // Implement super accessors and add forwarders to trait methods
new Simplify, // Perform local optimizations, simplified versions of what linker does.
new PrimitiveForwarders, // Add forwarders to trait methods that have a mismatch between generic and primitives
new FunctionXXLForwarders, // Add forwarders for FunctionXXL apply method
new ArrayConstructors) :: // Intercept creation of (non-generic) arrays and intrinsify.
Expand All @@ -107,8 +106,7 @@ class Compiler {
List(new Constructors, // Collect initialization code in primary constructors
// Note: constructors changes decls in transformTemplate, no InfoTransformers should be added after it
new FunctionalInterfaces, // Rewrites closures to implement @specialized types of Functions.
new GetClass, // Rewrites getClass calls on primitive types.
new Simplify) :: // Perform local optimizations, simplified versions of what linker does.
new GetClass) :: // Rewrites getClass calls on primitive types.
List(new LinkScala2Impls, // Redirect calls to trait methods defined by Scala 2.x, so that they now go to their implementations
new LambdaLift, // Lifts out nested functions to class scope, storing free variables in environments
// Note: in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here
Expand Down
3 changes: 0 additions & 3 deletions compiler/src/dotty/tools/dotc/config/ScalaSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ class ScalaSettings extends Settings.SettingGroup {
val YshowNoInline = BooleanSetting("-Yshow-no-inline", "Show inlined code without the 'inlined from' info")

/** Linker specific flags */
val optimise = BooleanSetting("-optimise", "Generates faster bytecode by applying local optimisations to the .program") withAbbreviation "-optimize"
val Xlink = BooleanSetting("-Xlink", "Recompile library code with the application.")
val YoptPhases = PhasesSetting("-Yopt-phases", "Restrict the optimisation phases to execute under -optimise.")
val YoptFuel = IntSetting("-Yopt-fuel", "Maximum number of optimisations performed under -optimise.", -1)
val YnoDecodeStacktraces = BooleanSetting("-Yno-decode-stacktraces", "Show raw StackOverflow stacktraces, instead of decoding them into triggering operations.")

/** Dottydoc specific settings */
Expand Down
10 changes: 2 additions & 8 deletions compiler/src/dotty/tools/dotc/quoted/ToolboxSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,16 @@ object ToolboxSettings {
implicit def default: ToolboxSettings = make()

/** Make toolbox settings
* @param optimise Enable optimisation when compiling the quoted code
* @param outDir Output directory for the compiled quote. If set to None the output will be in memory
* @param color Print output with colors
* @param rawTree Do not remove quote tree artifacts
* @param compilerArgs Compiler arguments. Use only if you know what you are doing.
*/
def make(
optimise: Boolean = false,
color: Boolean = false,
rawTree: Boolean = false,
outDir: Option[String] = None,
compilerArgs: List[String] = Nil
): ToolboxSettings = {
var compilerArgs1 = compilerArgs
if (optimise) compilerArgs1 = "-optimise" :: compilerArgs1
new ToolboxSettings(outDir, rawTree, compilerArgs1)
}

): ToolboxSettings =
new ToolboxSettings(outDir, rawTree, compilerArgs)
}

This file was deleted.

198 changes: 0 additions & 198 deletions compiler/src/dotty/tools/dotc/transform/localopt/ConstantFold.scala

This file was deleted.

Loading