[Mlir-commits] [mlir] [MLIR][LLVM] Support Recursive DITypes (PR #80251)
Billy Zhu
llvmlistbot at llvm.org
Tue Mar 5 17:46:50 PST 2024
zyx-billy wrote:
As I was writing recursive support for DICompositeTypeAttr, I realized it's not too difficult to just abstract out the recursive implementation (just in case we missed another DINode that needs recursive support). So with this latest refactor, instead of making DICompositeTypeAttr special, I pulled out the API needed to support recursion into an attr interface: DIRecursiveTypeAttrInterface. This means the importer & exporter can have generic code (targeting any attr that implements this interface), and we won't need to do a major rewrite if we find out about another DINode that needs recursion support.
Let me know what you think of this new design 🙏 . My hope is it removes the worst part about the previous design (which is a new DITypeAttr type that messed up the expected types everywhere and required manual casting), while also keeping the door open in case more types need to be supported.
https://github.com/llvm/llvm-project/pull/80251
More information about the Mlir-commits
mailing list