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

Improve definition-use chain simplification for CSE #159

Closed
fennecJ opened this issue Nov 7, 2024 · 1 comment
Closed

Improve definition-use chain simplification for CSE #159

fennecJ opened this issue Nov 7, 2024 · 1 comment
Assignees

Comments

@fennecJ
Copy link
Collaborator

fennecJ commented Nov 7, 2024

The current DU-chain implementation of #156 doesn't achieve the expected level of simplification for CSE. Since the variable is in SSA form and we're only interested in the last assignment for CSE, perhaps we can focus solely on du-chain.tail which record last assignment for a var?

@fennecJ fennecJ self-assigned this Nov 7, 2024
@jserv jserv changed the title Improve DU-chain Simplification for CSE Improve definition-use chain simplification for CSE Nov 7, 2024
@fennecJ
Copy link
Collaborator Author

fennecJ commented Nov 7, 2024

I just realized that I mistakenly confused use-chain and du-chain. The use-chain tracks the series of instructions that use a particular variable, so iterating over it is appropriate. My earlier suggestion to focus solely on the tail was incorrect, as the use-chain involves multiple uses, not just the last assignment.

Additionally, the newer implementation actually simplifies the CSE flow by iterating only through the instructions that use the variable, rather than through all instructions in the basic block.

Apologies for any confusion or time wasted due to my mistake.

@fennecJ fennecJ closed this as completed Nov 7, 2024
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

No branches or pull requests

2 participants