Skip to content

Smarter helper rules#682

Closed
yihozhang wants to merge 7 commits intomainfrom
yihozhang-smaller-egraph
Closed

Smarter helper rules#682
yihozhang wants to merge 7 commits intomainfrom
yihozhang-smaller-egraph

Conversation

@yihozhang
Copy link
Collaborator

@yihozhang yihozhang commented Nov 23, 2024

Eggcc has been constantly blowing up with the giant analyses our helpers generate. But do our helpers really need to generate that many facts? We explore the question in this PR.

  • Get and TypeList-ith are quadratic


(function TypeList-length (TypeList) i64 :unextractable)
(function TypeList-ith (TypeList i64) BaseType :unextractable)
(function TypeList-suffix (TypeList i64) TypeList :unextractable)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The old TypeList-suffix based implementation is quadratic in the size of the list (which easily goes to 20+)

(rule ((Get expr i))
((union (Single (Get expr i))
(SubTuple expr i 1)))
; ;; This rule makes sure every tuple can be
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is actually unnecessary because we are already generating gets for every "important" tuple. Removed in my new PRs.

@oflatt
Copy link
Member

oflatt commented Nov 7, 2025

closing due to being out of date

@oflatt oflatt closed this Nov 7, 2025
@yihozhang yihozhang deleted the yihozhang-smaller-egraph branch January 19, 2026 00:13
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

Comments