Skip to content
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

Optimizing IR copying #10718

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Merge branch 'develop' into wip/hubert/copying-opt
hubertp committed Aug 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 8ef9aebc0f8a04b06eb87967e911ab370b2d0c53
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ case object AliasAnalysis extends IRPass {
topLevelGraph.rootScope
)
val members1 = t.members.map(d => {
val graph = new alias.Graph
val graph = new Graph
val arguments1 = analyseArgumentDefs(
d.arguments,
graph,
@@ -306,14 +306,14 @@ case object AliasAnalysis extends IRPass {
.updateMetadata(
new MetadataPair(
this,
alias.Info.Scope.Root(topLevelGraph)
alias.AliasMetadata.RootScope(topLevelGraph)
)
)
}
(if (arguments1 != d.arguments || annotations1 != d.annotations)
d.copy(arguments = arguments1, annotations = annotations1)
else d).updateMetadata(
new MetadataPair(this, alias.Info.Scope.Root(graph))
new MetadataPair(this, alias.AliasMetadata.RootScope(graph))
)
})
(if (params1 != t.params || members1 != t.members)
@@ -322,7 +322,7 @@ case object AliasAnalysis extends IRPass {
members = members1
)
else t).updateMetadata(
new MetadataPair(this, alias.Info.Scope.Root(topLevelGraph))
new MetadataPair(this, alias.AliasMetadata.RootScope(topLevelGraph))
)
case _: Definition.SugaredType =>
throw new CompilerError(
@@ -351,7 +351,7 @@ case object AliasAnalysis extends IRPass {
)
(if (expression1 != ann.expression) ann.copy(expression = expression1)
else ann).updateMetadata(
new MetadataPair(this, alias.Info.Scope.Root(topLevelGraph))
new MetadataPair(this, alias.AliasMetadata.RootScope(topLevelGraph))
)
case err: Error => err
}
You are viewing a condensed version of this merge commit. You can view the full changes here.