summaryrefslogtreecommitdiff
path: root/test/junit/scala/tools/nsc/backend/jvm/opt/SimplifyJumpsTest.scala
Commit message (Collapse)AuthorAgeFilesLines
* Better abstraction for bytecode tests. Also organize some imports.Lukas Rytz2016-05-201-5/+5
|
* Rename nsc.backend.jvm.CodeGenTools to testing.BytecodeTestingLukas Rytz2016-05-201-1/+1
|
* Improve simplifyJumpsLukas Rytz2016-02-031-4/+19
| | | | | | | | | | | | | | | | | | | Improve simplifyJumps to rewrite IFEQ L4 L5 GOTO L6 to IFNE L6 L5 This rewrite is only correct if L5 is not the target of any jump instruction (otherwise, removing the GOTO would change semantics). Previously we did not do the rewrite if there was any label between the conditional jump and the goto (like L5). Now we track which labels are jump targets.
* Clean up the way compiler settings are accessed in the backend.Lukas Rytz2015-04-011-12/+12
| | | | | | | | | | | | Many backend components don't have access to the compiler instance holding the settings. Before this change, individual settings required in these parts of the backend were made available as members of trait BTypes, implemented in the subclass BTypesFromSymbols (which has access to global). This change exposes a single value of type ScalaSettings in the super trait BTypes, which gives access to all compiler settings.
* GenBCode: Command-line flags for enabling cleanup optimizationsLukas Rytz2014-11-041-12/+12
| | | | | | | | | | Add command-line flags `Yopt:...` for simplifying jumps, eliminating stale line number and label nodes. `LocalOpt.methodOptimizations` applies all enabled intra-method optimizations in the right order. Some cleanups for unreachable code elimination and its tests.
* GenBCode: Simplify branching instructionsLukas Rytz2014-11-041-0/+221
This commit implements simplifications to branching instructions, for example `CondJump l; GOTO l` is replaced by `POP; GOTO l`. The individual optimizations are explained in doc comments. A later commit will add compiler flags to allow enabling the new optimizations.