[llvm-dev] Terminators in MachineBasicBlock

Quentin Colombet via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 24 11:15:35 PDT 2016


Hi,

> On Mar 24, 2016, at 10:58 AM, Tom Chen via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Hi,
> Why does a MachineBasicBlock have multiple terminator instructions (unlike BasicBlock, which can only have one) ?

Think of it as predicated instructions.
E.g.,
bool = icmp
if bool : br if
br else

As for why, we could indeed have split those terminators into several basic blocks, but it would have required more MachineBasicBlock objects.

Cheers,
-Quentin
> Thanks,
> Tom
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev



More information about the llvm-dev mailing list