[llvm-dev] Terminators in MachineBasicBlock

Tom Chen via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 24 11:23:33 PDT 2016


So in your example there are two terminators in the basic block (`br if`
and `br else`)?

2016-03-24 14:15 GMT-04:00 Quentin Colombet <qcolombet at apple.com>:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160324/6598ec52/attachment.html>


More information about the llvm-dev mailing list