| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Add 'exact' flag to arith.shrui/shrsi/divsi/divui operations (#165923) This MR adds support for the exact flag to the arith.shrui/shrsi/divsi/divui operations. The semantics are identical to those of the LLVM dialect and the LLVM language reference. This MR also modifies the mechanism for converting arith dialect **attributes** to corresponding **properties** in the LLVM dialect. (As a specific example, the integer overflow flags nsw/nuw are **properties** in the LLVM dialect, as opposed to attributes.) Previously, attribute converter classes were required to have a specific method to support integer overflow flags: C++ template <typename SourceOp, typename TargetOp> class AttrConvertPassThrough { public: ... LLVM::IntegerOverflowFlags getOverflowFlags() const { return LLVM::IntegerOverflowFlags::none; } }; This method was required, even for arith source operations that did not use integer overflow flags (e.g. AttrConvertFastMathToLLVM). This MR modifies the interface required by arith dialect attribute converters to instead provide a (possibly NULL) properties attribute: C++ template <typename SourceOp, typename TargetOp> class AttrConvertPassThrough { public: ... Attribute getPropAttr() const { return {}; } }; For arith operations with attributes that map to LLVM dialect **properties**, the attribute converter can create a DictionaryAttr containing target properties and return that attribute from the attribute converter's getPropAttr() method. The arith attribute conversion framework will set the propertiesAttr of an OperationState, and the target operation's setPropertiesFromAttr() method will be invoked to set the properties when the target operation is created. The AttrConvertOverflowToLLVM class in this MR uses the new approach. | 8 个月前 | |
[mlir][LLVM] Switch undef for poison for uninitialized values (#125629) LLVM itself is generally moving away from using undef and towards using poison, to the point of having a lint that caches new uses of undef in tests. In order to not trip the lint on new patterns and to conform to the evolution of LLVM - Rename valious ::undef() methods on StructBuilder subclasses to ::poison() - Audit the uses of UndefOp in the MLIR libraries and replace almost all of them with PoisonOp The remaining uses of undef are initializing uninitialized memrefs, explicit conversions to undef from SPIR-V, and a few cases in AMDGPUToROCDL where usage like %v = insertelement <M x iN> undef, iN %v, i32 0 %arg = bitcast <M x iN> %v to i(M * N) is used to handle "i32" arguments that are are really packed vectors of smaller types that won't always be fully initialized. | 1 年前 | |
[mlir][LLVM] ArithToLLVM: Add 1:N support for arith.select lowering (#153944) Add 1:N support for the arith.select lowering. Only cases where the entire true/false value is selected are supported. | 11 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 1 年前 | ||
| 11 个月前 |