The kind mapper provides a portable mechanism to map Fortran type KIND values independent of the front-end to their corresponding MLIR and LLVM types.
There is an implicit size and ordering expectation for defs that seems quite subtle and deserve documentation here.
I also don't see a test which exercise this extra parameter?
somehow unrelated to this patch, but the reference here is unusual, is this needed/useful?
Seems like the constructor can fail here, should this be a factory function returning an optional then?