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

Very simple revamp of dead code elimination. #28507

Open
wants to merge 1 commit into
base: mainnet
Choose a base branch
from

Conversation

mikebenfield
Copy link
Collaborator

Enable DCE by default. Eliminates useless
associated function calls.

Also threw in just a few changes to Display
implementations for some nodes.

Fixes #28504

@mikebenfield mikebenfield requested a review from d0cd February 11, 2025 21:35
@mikebenfield mikebenfield force-pushed the dead-code-class branch 3 times, most recently from 2867c59 to 460bc34 Compare February 12, 2025 18:18
@@ -16,6 +16,7 @@ closure eliminate_unused_function_call:
function foo:
input r0 as u8.private;
input r1 as u8.private;
add r0 r1 into r2;
output r2 as u8.private;
call eliminate_unused_function_call r0 r1 into r2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this call be eliminated?

Enable DCE by default. Eliminates useless
associated function calls.

Also threw in just a few changes to Display
implementations for some nodes.

Fixes #28504
@mikebenfield
Copy link
Collaborator Author

Alright see what you think of these changes. Also eliminates a couple new calls, in

non_async_after_complex_async.leo and expr_statement.leo

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.

[Bug] some dead Aleo Instructions code
2 participants