-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[SandboxIR] Refactor sandboxir::PHINode::removeIncomingValueIf() to delegate the removal directly to the underlying llvm::PHINode::removeIncomingValueIf
#172397
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
base: main
Are you sure you want to change the base?
Conversation
… delegate the removal directly to the underlying `llvm::PHINode::removeIncomingValueIf`.
SandboxIR::PHINode::removeIncomingValueIf() to delegate the removal directly to the underlying llvm::PHINode::removeIncomingValueIfsandboxir::PHINode::removeIncomingValueIf() to delegate the removal directly to the underlying llvm::PHINode::removeIncomingValueIf
nikic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would actually interfere with #171963, because it uses a removeIncomingValueIf() and removeIncomingValue() use different removal strategies, so I think having a single PHIRemoveIncoming wouldn't be able to cover both?
The intention behind this patch was that we don't need having But think about this a bit, this is not enough. as you pointed out, with #171963, If we don't want the What do you think? |
|
If you keep the current removeIncomingValueIf() implementation, wouldn't you only need one implementation because it uses removeIncomingValue() internally? As it already does the walk backwards, it should be compatible with the swapping approach, right? |
llvm-project/llvm/unittests/SandboxIR/SandboxIRTest.cpp Lines 5954 to 5968 in 5891921
This test expects after removal the order of incoming values remained is preserved. Current removeIncomingValueIf() implementation call |
|
Wouldn't it be fine to change the test expectation? For SandboxIR, the main thing we care about is that the change can be reliably undone. |
No description provided.