[all-commits] [llvm/llvm-project] 1ec608: [mlir] Avoid cloning ops in SCF parallel conversio...
ftynse via All-commits
all-commits at lists.llvm.org
Mon Nov 23 05:06:28 PST 2020
Branch: refs/heads/temp-test-main
Home: https://github.com/llvm/llvm-project
Commit: 1ec60862d7024118b2db5bcbb280eafcd9193ac5
https://github.com/llvm/llvm-project/commit/1ec60862d7024118b2db5bcbb280eafcd9193ac5
Author: Alex Zinenko <zinenko at google.com>
Date: 2020-11-23 (Mon, 23 Nov 2020)
Changed paths:
M mlir/lib/Conversion/SCFToStandard/SCFToStandard.cpp
M mlir/test/Conversion/SCFToStandard/convert-to-cfg.mlir
Log Message:
-----------
[mlir] Avoid cloning ops in SCF parallel conversion to CFG
The existing implementation of the conversion from SCF Parallel operation to
SCF "for" loops in order to further convert those loops to branch-based CFG has
been cloning the loop and reduction body operations into the new loop because
ConversionPatternRewriter was missing support for moving blocks while replacing
their arguments. This functionality now available, use it to implement the
conversion and avoid cloning operations, which may lead to doubling of the IR
size during the conversion.
In addition, this fixes an issue with converting nested SCF "if" conditionals
present in "parallel" operations that would cause the conversion infrastructure
to stop because of the repeated application of the pattern converting "newly"
created "if"s (which were in fact just moved). Arguably, this should be fixed
at the infrastructure level and this fix is a workaround.
Reviewed By: herhut
Differential Revision: https://reviews.llvm.org/D91955
More information about the All-commits
mailing list