================
@@ -100,4 +100,18 @@ mlir::Type convertTypeForLoadStore(const
mlir::TypeConverter &converter,
mlir::Attribute getBitIntStorageAttr(mlir::ConversionPatternRewriter &rewriter,
cir::IntAttr attr,
const mlir::DataLayout &dataLayout);
+
+// Transient attribute holding a symbol's CIR type before lowering. Lookups
+// mid-conversion can find the already-lowered LLVM symbol instead of the
+// CIR op. Its type may have been adjusted during lowering (split rows,
+// flexible array), so readers that need the unadjusted CIR view use this
+// stash. The pass strips it at the end, so it never reaches the output.
+inline constexpr const char *kPreConversionSymType =
----------------
xlauko wrote:
Instead of storing the type on the LLVM op and stripping it on exit, could we
build a symbol → CIR type map before conversion and pass it to the patterns
like `symbolTables`? That's order-independent by construction and needs no
strip step.
https://github.com/llvm/llvm-project/pull/238698
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits