[Mlir-commits] [mlir] [mlir][emitc] Add EmitC index types (PR #93155)
Corentin Ferry
llvmlistbot at llvm.org
Mon Jun 3 06:52:49 PDT 2024
================
@@ -37,3 +37,28 @@ void mlir::populateEmitCSizeTTypeConversions(TypeConverter &converter) {
converter.addTargetMaterialization(materializeAsUnrealizedCast);
converter.addArgumentMaterialization(materializeAsUnrealizedCast);
}
+
+/// Get an unsigned data type as wide as \p ty.
----------------
cferry-AMD wrote:
We don't need to mention the width, but the value must be preserved across casts, as they're mainly issued to adapt the signedness of a single MLIR `index`-type value in the C world. We can say the values will be preserved as long as they fit the types' ranges... but in this case we don't guarantee back and forth value-preserving casts for _any_ value that can be represented with these types. I should probably lower my expectation and be fine with this.
https://github.com/llvm/llvm-project/pull/93155
More information about the Mlir-commits
mailing list