[all-commits] [llvm/llvm-project] 23fbe5: [flang] do not merge block after lowering
jeanPerier via All-commits
all-commits at lists.llvm.org
Tue Jun 27 23:30:37 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 23fbe525ce0645341610b751184882fea264c99e
https://github.com/llvm/llvm-project/commit/23fbe525ce0645341610b751184882fea264c99e
Author: Jean Perier <jperier at nvidia.com>
Date: 2023-06-28 (Wed, 28 Jun 2023)
Changed paths:
M flang/lib/Lower/Bridge.cpp
A flang/test/Lower/HLFIR/no-block-merging.f90
M flang/test/Lower/block.f90
M flang/test/Lower/entry-statement.f90
Log Message:
-----------
[flang] do not merge block after lowering
Lowering relies on dead code generation / unreachable block deletion
to delete some code that is potentially invalid.
However, calling mlir::simplifyRegion also merges block, which may
promote SSA values to block arguments. Not all FIR types are intended
to be block arguments.
The added test shows an example where block merging led to
fir.shape<> being block arguments (and a failure later in codegen).
Reviewed By: tblah, clementval, vdonaldson
Differential Revision: https://reviews.llvm.org/D153858
More information about the All-commits
mailing list