-
Notifications
You must be signed in to change notification settings - Fork 323
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
Store FramePointer in IR #10729
Store FramePointer in IR #10729
Conversation
...ne/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/FramePointerAnalysis.scala
Show resolved
Hide resolved
...tion-tests/src/test/scala/org/enso/compiler/test/pass/analyse/FramePointerAnalysisTest.scala
Show resolved
Hide resolved
...ne/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/FramePointerAnalysis.scala
Outdated
Show resolved
Hide resolved
...ne/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/FramePointerAnalysis.scala
Outdated
Show resolved
Hide resolved
...ne/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/FramePointerAnalysis.scala
Outdated
Show resolved
Hide resolved
...ne/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/FramePointerAnalysis.scala
Show resolved
Hide resolved
I don't see changes in |
This ensure that one can see all the metadata on the IR.
6b148dd
to
db92068
Compare
# Conflicts: # engine/runtime-compiler/src/main/java/org/enso/compiler/pass/analyse/PassPersistance.java # engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/alias/graph/Graph.scala
What does it mean?
at https://github.com/enso-org/enso/actions/runs/10373180715/job/28717694507?pr=10729
|
6ec1ba6
to
ce74f86
Compare
Also refactor NameResolutionAlgorithm to not use AliasMetadata
6cfb42d
to
af1b7e8
Compare
Test on Windows fails because of different length of new lines.
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.
The changes in IrToTruffle
are good. We no longer need AliasAnalysis
for computing FramePointer
. Let's get this in.
However, as the primary goal was to speed things up, we need a away to create LocalScope
without reading the alias graphs. Can we use Persistance.Reference
there?
--- engine/runtime-compiler/src/main/scala/org/enso/compiler/context/LocalScope.scala
+++ engine/runtime-compiler/src/main/scala/org/enso/compiler/context/LocalScope.scala
@@ -31,8 +31,8 @@ import scala.jdk.CollectionConverters._
*/
class LocalScope(
final val parentScope: Option[LocalScope],
- final val aliasingGraph: AliasGraph,
- final val scope: AliasGraph.Scope,
+ final val aliasingGraph: Persistance.Reference[AliasGraph],
+ final val scope: Persistance.Reference[AliasGraph.Scope],
final val dataflowInfo: DataflowAnalysis.Metadata,
final val flattenToParent: Boolean = false,
private val parentFrameSlotIdxs: Map[AliasGraph.Id, Int] = Map()
* analysis | ||
* @return the frame pointer for `id`, if it exists | ||
*/ | ||
def getFramePointer(id: AliasGraph.Id): Option[FramePointer] = { |
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.
We no longer need LocalScope
to compute getFramePointer
. That's good.
Follow-up task created in #10833 |
Fixes #10129
Pull Request Description
Adds a new compiler pass FramePointerAnalysis that attaches [FramePointer]
enso/engine/runtime-compiler/src/main/scala/org/enso/compiler/pass/analyse/FramePointerAnalysis.scala
Line 386 in af1b7e8
FramePointer metadata serves as a replacement for usage of
AliasMetadata.Occurence
inIrToTruffle
.There are still usages of
AliasAnalysis
metadata fromIrToTruffle
. Which means that alias metadata is still deserialized inIrToTruffle
, and therefore, we will not see any big startup time improvements. To remove all usages ofAliasAnalysis
metadata inIrToTruffle
, we need to think about how to remove all alias metadata references from LocalScope which seems like a big task for a follow-up PR.Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.