| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|