-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Local optimisations #2513
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
Local optimisations #2513
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
098036a
Simplify: initial structure and first optimizations
DarkDimius 968f478
Simplify: add inlineOptions fixes to inlineCaseIntrinsics
DarkDimius e592460
Simplify: implement constant folding.
DarkDimius fa75463
Simplify: do not generate blocks with empty stats.
DarkDimius fc9c60d
Simplify: devalify now also performs constant propagation
DarkDimius ff0a888
Simplify: fix bug in bubbleUpNothing. Definitions should not be skipped.
DarkDimius 0e6de0a
Simplify: improve constant folding & leave breadcrumbs for contributors
DarkDimius e024e86
Add PatternFactorization
DarkDimius b44e796
Simplify: fix owner corruption when inlining LabelDefs.
DarkDimius a1c1f7f
Simplify: Start getting rid from Scala2 options and tupples in patterns
DarkDimius 5974a80
Simplify: Don't alias lazy vals
DarkDimius 626488a
Simplify: Don't create empty DefDefs if they should do nothing.
DarkDimius f66ac7f
Simplify: Fix bug with elimination of side-effects.
DarkDimius 9cdc557
Simplify: Don't partials-evaluate case-defs.
DarkDimius f521d86
Simplify: make object inlining robust against Nothing.
DarkDimius e111da9
Simplify: Fix several infinite cycles.
DarkDimius c3f518a
Simplify: Don't drop lazy val reads.
DarkDimius 315728d
Simplify: jump jump: optimise label-defs that are themselves forwarders
DarkDimius a9930f4
Simplify: start joining ifs if branches are similar.
DarkDimius e4d36ea
Simplify: String+ isn't symmetric
DarkDimius cc1b78f
Simplify: fix a bug inside isSimilar
DarkDimius 05c2afd
Simplify: don't remove by-name calls
DarkDimius 9d288e1
Simplify: don't remove infinite cycles :-)
DarkDimius 5e70a0b
Got tired of fixing Pattern*Factorization.
DarkDimius d16ad9a
simplify: Reading vals through successful casts should be allowed
DarkDimius b236b04
simplify: Playing with optimising if expressions.
DarkDimius dc75bd4
simplify: fixes to inlineLocalObjects.
DarkDimius aa854ec
Simplify: add vilify transformation
DarkDimius ae35fb7
Simplify: add dropGoodCasts that drops good casts in stat position.
DarkDimius 646f11a
Simplify: fix the fix of handling by-name arguments.
DarkDimius a1ad54c
Simplify: dropNoEffects now flattens blocks.
DarkDimius c6f0e8d
Simplify: inline case-defs that have literal in rhs.
DarkDimius 05a5382
Simplify: Somes\options can be null :-(
DarkDimius e93dd61
Make optimisation optional.
DarkDimius ae9a562
Simplify:inlineLocalObjects: don't inline mutable fields.
DarkDimius 14bc530
Simplify: DropGoodCasts: Don't accumulate cast on garbage.
DarkDimius a8c9e94
Simplify: devalify: correctly rebase New when prefix changes.
DarkDimius 6536d8f
Simplify:inlineLocalObjects: make more robust against complex labels.
DarkDimius 2b3d0d2
Simplify: NullCheck: as proposed by @jvican
DarkDimius 8fb9554
Simplify: fix and enable removeUnnecessaryNullChecks.
DarkDimius 9314e91
Add missing NamedType import
jvican 02be44b
Simplify: devalify: don't kick in on by-name params
jvican 1b6074c
Simplify: fix infinite recursion in followCases
DarkDimius d25a221
Simplify: remove duplicate null tests.
DarkDimius f79f06f
Simplify: this can be dropped inside a block.
DarkDimius 6cc53c7
Finish rebase over dotty upstream
DarkDimius 232761c
Document Simplify optimizations
OlivierBlanvillain 76af6c5
Fix Erasure of uniqueRefDenotations with different underlying type.
DarkDimius aaca2b1
Rewrite labelDefs phase
DarkDimius b7596ef
Soften Ycheck scoping rules for local jumps after LabelDefs
DarkDimius a5b688d
Fix compilation after rebase
OlivierBlanvillain 4ea9a84
Restore tests moved to disabled
OlivierBlanvillain 8f470f0
Remove PatternConstantsFactorization & PatternTypeFactorization for now
OlivierBlanvillain b4af143
Run all tests with -optimise
OlivierBlanvillain f775345
Formating / refactoring
OlivierBlanvillain c42a944
Remove usage of -optimise in ClassfileParser
OlivierBlanvillain ef2d967
Fix a few bugs in Simplify
OlivierBlanvillain d255b32
Expose tpd problem, temporary .toString hack
OlivierBlanvillain 4763a36
Work in progress
OlivierBlanvillain 2f22230
Add missing `.ensureApplied` in `constantFold`
OlivierBlanvillain cad5515
bubbleUpNothing: do we want it? It breaks the last 4 failing tests
OlivierBlanvillain 520e347
Kinda fix toString hack: testPicking w/o -optimise + tpd swtich
OlivierBlanvillain ecaa6e9
Reimplement TypeErasure#erasedLub with the documented algorithm
OlivierBlanvillain 3d4cdd7
Clean up Simplify
OlivierBlanvillain a2bead9
Partially fix pickling tests failing with smarter tpd
OlivierBlanvillain dec2766
Add byte code SimplifyTests
OlivierBlanvillain a2465b1
Refactor the temporary tpd fix
OlivierBlanvillain bb0e5b2
Import Flags._
OlivierBlanvillain 92ffff7
Add null check and evalOnce to inlineCaseIntrinsics
OlivierBlanvillain 0e8cbae
Don't run problematic optimisations AfterErasure
OlivierBlanvillain c516fb3
Move to pending t7126.scala (could also be run without -optimise)
OlivierBlanvillain 123a02d
Isolate the two failing tests in run-not-optimised
OlivierBlanvillain e92c40f
Fix ShallowFolder
OlivierBlanvillain 8a51d32
Do not inline val across class boundaries
OlivierBlanvillain f564340
Minor reformatting
OlivierBlanvillain 3cc3121
Add time travelling copies
odersky 8a66a25
Simplify: do not drop complex prefixes to case-class apply & unapply.
DarkDimius 65265e6
Simplify: fix build
DarkDimius 7740db5
tpd: handle closures with less copying + use sameTypes
DarkDimius 4d54f3d
Allow redefining tree-copier per phase.
DarkDimius ea7a578
Simplify: use a better tree copier.
DarkDimius d09dbd6
Fix SimplifyTests
OlivierBlanvillain 8220305
Simplify: drop more stuff in dropNoEffects.
DarkDimius 9c68552
Simplify: run devalify before erasure.
DarkDimius ce50cfe
Refactoring and comments
OlivierBlanvillain de4dd2c
Fix t4859
OlivierBlanvillain fba0d51
Devalify: also visitType for New nodes
OlivierBlanvillain b7149c9
Simpler class hiararchy in SimplifyTests to please JUnit
OlivierBlanvillain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need both this val and an explicitly
tpd.cpy
everywhere?