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

SSACFGBuilder: clean up tryRemoveTrivialPhi #15441

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

Conversation

clonker
Copy link
Member

@clonker clonker commented Sep 19, 2024

depends on #15429

@clonker clonker added the has dependencies The PR depends on other PRs that must be merged first label Sep 19, 2024
Comment on lines -125 to -130
// TODO: double check when phiVar occurs in outputs here and what to do about it.
if (op.outputs.size() == 1 && op.outputs.front() == _phi)
continue;
// TODO: check if this always hold - and if so if the assertion is really valuable.
for (auto& output: op.outputs)
yulAssert(output != _phi);
Copy link
Member Author

Choose a reason for hiding this comment

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

From a conceptual point of view: A phi function value can never be the output of an operation that isn't the phi function itself, as that would violate the SSA form.
From an implementation point of view: Operation outputs are always emplaced as m_graph.newVariable(m_currentBlock) and beyond that not mutated.

Base automatically changed from ssaCfg-fix-trivial-phi-fct-removal to develop September 19, 2024 23:17
@clonker clonker marked this pull request as ready for review September 20, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has dependencies The PR depends on other PRs that must be merged first
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant