[PATCH] D140790: [MachineBasicBlock] Explicit FT branching param
Daniel Hoekwater via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 20:39:14 PDT 2023
dhoekwater added a comment.
/// Return the fallthrough block if the block can implicitly
/// transfer control to the block after it by falling off the end of
/// it. If an explicit branch to the fallthrough block is not allowed,
/// set JumpToFallThrough to be false. Non-null return is a conservative
/// answer.
MachineBasicBlock *getFallThrough(bool JumpToFallThrough = false);
The documentation for this function seems at odds with the behavior.
The documentation suggests that, if `JumpToFallThrough` is false, then `getFallThrough` will return a `nullptr` if the basic block ends with an explicit branch to the fallthrough block.
However, the opposite is true. For a block that ends in an unconditional jump to the fallthrough block, if `JumpToFallThrough == true`, then the function will return `nullptr`. If `JumpToFallThrough == false`, then it will return the address of the fallthrough block.
Is this the intended behavior?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140790/new/
https://reviews.llvm.org/D140790
More information about the llvm-commits
mailing list