| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][emitc] Add div, mul and rem operators This adds operations for binary multiplicative arithmetic operators to EmitC. The input and output arguments for the remainder operator are restricted to index (emitted as size_t), integers and the EmitC opaque types (as the operator can be overloaded for a custom type). The multiplication and division operator further support floating point numbers. Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D154846 | 2 年前 | |
[mlir][llvm] Fix export of 64-bit integer function attributes The allocsize attribute is weird because it packs two 32-bit values into a 64-bit value. It also turns out that the passthrough attribute exporter was using int, which is incorrectly handling 64-bit integers. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D156574 | 2 年前 | |
[mlir][spirv] Change numeric constant's bit-extension decision to be based on type Integer constants with bit width less than a word (e.g., i8, i16) should be bit extended based on its type to be SPIR-V spec-compliant. Previously, the decision was based on the most significant bit of the value which ignores the signless semantics and causes problems when interfacing with SPIR-V tools. Dealing with numeric literals: the SPIR-V spec says, "If a numeric type’s bit width is less than 32-bits, the value appears in the low-order bits of the word, and the high-order bits must be 0 for a floating-point type or integer type with Signedness of 0, or sign extended for an integer type with a Signedness of 1 (similarly for the remaining bits of widths larger than 32 bits but not a multiple of 32 bits)." Therefore, signless integers (e.g., i8, i16) and unsigned integers should be 0-extended, and signed integers (e.g., si8, si16) should be sign-extended. Patch By: mshahneo Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D151767 | 3 年前 | |
[mlir] Add Cpp emitter This upstreams the Cpp emitter, initially presented with [1], from [2] to MLIR core. Together with the previously upstreamed EmitC dialect [3], the target allows to translate MLIR to C/C++. [1] https://reviews.llvm.org/D76571 [2] https://github.com/iml130/mlir-emitc [3] https://reviews.llvm.org/D103969 Co-authored-by: Jacques Pienaar <jpienaar@google.com> Co-authored-by: Simon Camphausen <simon.camphausen@iml.fraunhofer.de> Co-authored-by: Oliver Scherf <oliver.scherf@iml.fraunhofer.de> Reviewed By: jpienaar Differential Revision: https://reviews.llvm.org/D104632 | 4 年前 |