[mlir][llvm] Handle invoke op branching to block with its result as an argument
In LLVM, having an invoke instruction branching to a block with a phi node receiving the invoke instruction result as an argument is perfectly legal. However, the translation of this construct to MLIR would result in an invoke with its result being used as a block argument to a successor, i.e., the operation result would be used in its definition. In order to fix this issue due to different IR structures (phi nodes vs block arguments), this construct is interpreted with an llvm.invoke operation branching to a dummy block having a single llvm.br operation passing the required block arguments (including the result of the llvm.invoke operation) to the actual successor block. Differential Revision: https://reviews.llvm.org/D148313
Loading
Please sign in to comment