Skip to content

meta-evaluate now runs to a fixed point#32

Open
tycho-bear wants to merge 4 commits intos-expressionists:mainfrom
tycho-bear:compiler-improvements
Open

meta-evaluate now runs to a fixed point#32
tycho-bear wants to merge 4 commits intos-expressionists:mainfrom
tycho-bear:compiler-improvements

Conversation

@tycho-bear
Copy link
Copy Markdown

Updated meta-evaluate.lisp to run to a fixed point instead of making a constant number of passes.

@karlosz
Copy link
Copy Markdown
Collaborator

karlosz commented Jun 13, 2024

Meta-evaluate does more than derive types, so this would completely break other stuff like if-simplification.

@karlosz
Copy link
Copy Markdown
Collaborator

karlosz commented Jun 13, 2024

An actual implementation would keep track of all changes to the flow graph (expensive). So a proper implementation would add a flag to all BIR structures and carefully define a protocol for flagging when things change to prevent infinite regress.

@Bike
Copy link
Copy Markdown
Member

Bike commented Jun 14, 2024

Why do we need a flag on each structure, as opposed to just flipping a boolean variable during meta-evaluate to indicate we made a change? Is it just so that we only reprocess the stuff that has actually changed rather than the whole graph?

@karlosz
Copy link
Copy Markdown
Collaborator

karlosz commented Jun 14, 2024

Yes.

Tycho Bear added 3 commits July 15, 2024 18:13
…ype derivation. Additionally, updated its meta-evaluate-iblock function to only process flagged instructions.
…hat arise from evaluating meta-evaluate-instruction.
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.

3 participants