[flang][CodeGen] Transform `fir.unreachable` to `llvm.unreachable`
authorAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 2 Nov 2021 10:13:49 +0000 (10:13 +0000)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 2 Nov 2021 18:22:51 +0000 (18:22 +0000)
commit32e08248aa113bf3a5008d580753876fe3bcf021
tree4affdb2433323960ef2923390b1a88aaf4935943
parentf75d986fa5309ba1af25e7b5e7f04ee10a500b1f
[flang][CodeGen] Transform `fir.unreachable` to `llvm.unreachable`

This patch extends the `FIRToLLVMLowering` pass in Flang by adding a
hook to transform `fir.unreachable` to `llvm.unreachable`.

This is part of the upstreaming effort from the `fir-dev` branch in [1].

[1] https://github.com/flang-compiler/f18-llvm-project

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Differential Revision: https://reviews.llvm.org/D113023
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/test/Fir/convert-to-llvm.fir