[Mlir-commits] [mlir] [mlir] support dialect attribute translation to LLVM IR (PR #75309)
Tobias Gysi
llvmlistbot at llvm.org
Fri Dec 15 13:44:30 PST 2023
================
@@ -641,11 +748,15 @@ ModuleTranslation::convertOperation(Operation &op,
"dialect for op: ")
<< op.getName();
+ InstructionCapturingInserter::CollectionScope scope(
+ builder, nestedConvertOperationUsesCapturingBuilder);
+ CapturingBuilderFlagScope flagScope(*this, false);
----------------
gysit wrote:
Would it be possible to pass the isCapturingBuilder flag together with the builder into convertOperation/convertBlock? It seems the flag is only true if the convertOperation is directly called from convertOneFunction? I assume the problem is that these are public functions and adding private impl functions makes things also quite complex.
Overall the flag scope solution is fine. I was just wondering if there is a more explicit approach.
https://github.com/llvm/llvm-project/pull/75309
More information about the Mlir-commits
mailing list