Dr. ERDI Gergo via llvm-dev
2017-May-10 05:21 UTC
[llvm-dev] MBB reordering vs. MBB fall-through
Hi, Is it valid for an MBB to not have a final unconditional jump if the jump would be to the next MBB anyway? If yes, how is that supposed to interact with MBB reordering? I'm asking because I've encountered a problem with the AVR backend where an MBB falls through to the wrong MBB due to reordering, and I'd like to know if the problem is having fall-throughs in the first place, or not communicating their presence somehow with other parts of LLVM. Thanks, Gergo
Tim Northover via llvm-dev
2017-May-10 15:13 UTC
[llvm-dev] MBB reordering vs. MBB fall-through
On 9 May 2017 at 22:21, Dr. ERDI Gergo via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Is it valid for an MBB to not have a final unconditional jump if the jump > would be to the next MBB anyway? If yes, how is that supposed to interact > with MBB reordering?That is valid. Passes that want to reorder basic blocks should only do so if the AnalyzeBranch and related target hooks (Insert/Remove) allow it. They're capable of reconstructing the branches so they point to arbitrary destinations. Cheers. Tim.