[Mlir-commits] [mlir] [mlir][Transforms] Dialect conversion: Add option to disable folding (PR #92683)
Matthias Springer
llvmlistbot at llvm.org
Tue May 21 01:22:18 PDT 2024
================
@@ -1118,6 +1119,14 @@ struct ConversionConfig {
// already been modified) and iterators into past IR state cannot be
// represented at the moment.
RewriterBase::Listener *listener = nullptr;
+
+ /// If set to "true", the dialect conversion driver attempts to fold
+ /// operations throughout the conversion. This is problematic because op
+ /// folders may assume that the IR is in a valid state at the beginning of
+ /// the folding process. However, the dialect conversion does not guarantee
+ /// that because some IR modifications are delayed until the end of the
+ /// conversion.
+ bool foldOps = true;
----------------
matthias-springer wrote:
Do mean setting this to `false` by default or adding a comment that this is deprecated (or both)? We have at least one test case in the test dialect that tests the folding.
https://github.com/llvm/llvm-project/pull/92683
More information about the Mlir-commits
mailing list