[LLVMdev] minimum function ir
Joe Groff
arcata at gmail.com
Mon Apr 22 08:24:06 PDT 2013
On Mon, Apr 22, 2013 at 8:09 AM, Pete Couperus <pjcoup at gmail.com> wrote:
> Hello Reed,
>
> Basic blocks need to end with a terminator instruction.
> There is an "unreachable" terminator instruction, whose documentation says:
> "the presence of this instruction indicates some higher level knowledge
> that the end of the block cannot be reached."
> (see include/llvm/IR/Instructions.h).
> I've been able to suppress the return using this. I'm not completely
> clear if this would be the right use for your scenario.
>
This is the right thing to do. If your inline assembly always transfers
code out of the block, then the end of the block is indeed unreachable. You
do need to ensure that the asm expression has the "sideeffect" attribute so
that it doesn't get optimized away.
-Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130422/3284c136/attachment.html>
More information about the llvm-dev
mailing list