Skip to content

Conversation

@shanjiang98
Copy link

Introduces a new WhileStatementElimination pass to the Dead Code Elimination framework. This pass identifies 'while' loops with a constantly false condition and removes them entirely.

Introduces a new WhileStatementElimination pass to the Dead Code Elimination
framework. This pass identifies 'while' loops with a constantly false condition
and removes them entirely.

Also includes minor header reordering and adjusts pointer syntax
for consistency within 'pass.cc'.
@google-cla
Copy link

google-cla bot commented Nov 21, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@shanjiang98 shanjiang98 changed the title feat(DeadCodeElimination - While loop): Add WhileStatementElimination in DCE pass feat(DeadCodeElimination - While loop and Function wrapper): Add WhileStatementElimination and UnusedFunctionElimination in DCE pass Nov 22, 2025
@phisiart phisiart self-requested a review November 22, 2025 23:47
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add test cases? Thanks!

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