Skip to content

Implement IR optimization: constant folding - #13

Merged
writemorecode merged 3 commits into
mainfrom
feat/ir_opt_pass_const_fold
Feb 13, 2026
Merged

Implement IR optimization: constant folding#13
writemorecode merged 3 commits into
mainfrom
feat/ir_opt_pass_const_fold

Conversation

@writemorecode

@writemorecode writemorecode commented Feb 13, 2026

Copy link
Copy Markdown
Owner

This PR implements an IR optimization pass for constant folding.

Examples:
int x = 2 + 3*4; will be folded down to int x = 14;.
int a = 3; int b = 4; int c = a + b; will be folded down to int a = 3; int b = 4; int c = 7;.

@writemorecode
writemorecode merged commit 39a6e70 into main Feb 13, 2026
1 check passed
@writemorecode
writemorecode deleted the feat/ir_opt_pass_const_fold branch February 13, 2026 17:24
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.

1 participant