-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[MachineBB] Make sure there are successors in terminatorIsComputedGoto. #151342
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
Conversation
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.
Technically, you can have a computed goto with no legal destinations... which doesn't matter in the context of taildup, but the name might trick someone into believing the check is actually reliable.
If we can't easily make the check reliable, maybe rename it?
Currently terminatorIsComputedGoto will return for blocks with a indirect branch terminator and no successor. If there are no successor, the terminator is likely not a computed goto, return false in that case. Note that this is currently NFC, as the only use checks it only if there are successors, but it will be needed in llvm#150911.
92fb44f
to
533a414
Compare
How about |
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.
LGTM
…ComputedGoto. (#151342) Currently terminatorIsComputedGoto will return for blocks with a indirect branch terminator and no successor. If there are no successor, the terminator is likely not a computed goto, return false in that case. Note that this is currently NFC, as the only use checks it only if there are successors, but it will be needed in llvm/llvm-project#150911. PR: llvm/llvm-project#151342
…o. (llvm#151342) Currently terminatorIsComputedGoto will return for blocks with a indirect branch terminator and no successor. If there are no successor, the terminator is likely not a computed goto, return false in that case. Note that this is currently NFC, as the only use checks it only if there are successors, but it will be needed in llvm#150911. PR: llvm#151342
Currently terminatorIsComputedGoto will return for blocks with a indirect branch terminator and no successor. If there are no successor, the terminator is likely not a computed goto, return false in that case.
Note that this is currently NFC, as the only use checks it only if there are successors, but it will be needed in
#150911.