[llvm-dev] LLVM Pass To Remove Dead Code In A Basic Block

Aaron via llvm-dev llvm-dev at lists.llvm.org
Thu May 24 08:46:47 PDT 2018


Hi all,

LLVM optimization pass gives an error "Terminator found in the middle of a
basic block!" since basic block IR may have multiple "ret" instructions. It
seems LLVM does not accept multiple return in a basic block by default.

Is there a specific optimization or pass that I can enable to remove
unreachable codes in basic blocks?

Best,

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180524/f38cb4b4/attachment.html>


More information about the llvm-dev mailing list