Skip to content

[query] Cache Alpha-Equivalent Compiled Functions#15262

Open
ehigham wants to merge 1 commit intohail-is:mainfrom
ehigham:ehigham/compile-compilable-ir
Open

[query] Cache Alpha-Equivalent Compiled Functions#15262
ehigham wants to merge 1 commit intohail-is:mainfrom
ehigham:ehigham/compile-compilable-ir

Conversation

@ehigham
Copy link
Member

@ehigham ehigham commented Feb 5, 2026

Avoid using names in the compiled function cache so that alpha-equivalent IRs share a cache entry.
Compile requires the ir argument is Compilable. This is already enforced by the compileLowerer.

This change has no impact on the broad-managed batch service in gcp.

@ehigham ehigham force-pushed the ehigham/compile-compilable-ir branch from 9f8296a to 70904b0 Compare February 5, 2026 19:19
Comment on lines -111 to -115
/* { def visit(x: IR): Unit = { println(f"${ System.identityHashCode(x) }%08x ${
* x.getClass.getSimpleName } ${ x.pType }") Children(x).foreach { case c: IR => visit(c)
* } }
*
* visit(ir) } */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code was broken

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@ehigham ehigham changed the title [query] require body is CompilableIR in Compile [query] Cache Alpha-Equivalent Compiled Functions Feb 5, 2026
@ehigham ehigham force-pushed the ehigham/compile-compilable-ir branch from 86bbd37 to 21a7443 Compare February 5, 2026 20:14
@ehigham ehigham force-pushed the ehigham/compile-compilable-ir branch from 21a7443 to 86dce50 Compare February 5, 2026 20:18
Comment on lines -111 to -115
/* { def visit(x: IR): Unit = { println(f"${ System.identityHashCode(x) }%08x ${
* x.getClass.getSimpleName } ${ x.pType }") Children(x).foreach { case c: IR => visit(c)
* } }
*
* visit(ir) } */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants