RRiver Riddle[mlir] Refactor SubElementInterface replace support
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[MLIR] Generic 'malloc', 'aligned_alloc' and 'free' functions When converted to the LLVM dialect, the memref.alloc and memref.free operations were generating calls to hardcoded 'malloc' and 'free' functions. This didn't leave any freedom to users to provide their custom implementation. Those operations now convert into calls to '_mlir_alloc' and '_mlir_free' functions, which have also been implemented into the runtime support library as wrappers to 'malloc' and 'free'. The same has been done for the 'aligned_alloc' function. Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D128791 | 3 年前 | |
[mlir][LLVM] Add OpBuilder for opaque pointer GEPs without struct indices An OpBuilder already exists for GEPs that does not have any struct indices for existing typed pointers, but no such builder exists for GEPs utilizing opaque pointers that has an explicit basePtrType. Differential Revision: https://reviews.llvm.org/D129376 | 3 年前 | |
Ensure newlines at the end of files (NFC) | 3 年前 | |
[mlir] (NFC) run clang-format on all files | 3 年前 | |
[mlir] Refactor SubElementInterface replace support The current support was essentially the amount necessary to support replacing SymbolRefAttrs, but suffers from various deficiencies (both ergonomic and functional): * Replace crashes if unsupported This makes it really hard to use safely, given that you don't know if you are going to crash or not when using it. * Types aren't supported This seems like a simple missed addition when the attribute replacement support was originally added. * The ergonomics are weird It currently uses an index based replacement, which makes the implementations quite clunky. This commit refactors support to be a bit more ergonomic, and also adds support for types in the process. This was also a great oppurtunity to greatly simplify how replacement is done in the symbol table. Fixes #56355 Differential Revision: https://reviews.llvm.org/D130589 | 3 年前 | |
[mlir] Use value instead of getValue (NFC) | 3 年前 | |
[mlir] Update accessors to prefixed form (NFC) Follow up from flipping dialects to both, flip accessor used to prefixed variant ahead to flipping from _Both to _Prefixed. This just flips to the accessors introduced in the preceding change which are just prefixed forms of the existing accessor changed from. Mechanical change using helper script https://github.com/jpienaar/llvm-project/blob/main/clang-tools-extra/clang-tidy/misc/AddGetterCheck.cpp and clang-format. | 3 年前 | |
[mlir] initial support for opaque pointers in the LLVM dialect LLVM IR has introduced and is moving forward with the concept of opaque pointers, i.e. pointer types that are not carrying around the pointee type. Instead, memory-related operations indicate the type of the data being accessed through the opaque pointer. Introduce the initial support for opaque pointers in the LLVM dialect: - LLVMPointerType to support omitting the element type; - alloca/load/store/gep to support opaque pointers in their operands and results; this requires alloca and gep to store the element type as an attribute; - memory-related intrinsics to support opaque pointers in their operands; - translation to LLVM IR for the ops above is no longer using methods deprecated in LLVM API due to the introduction of opaque pointers. Unlike LLVM IR, MLIR can afford to support both opaque and non-opaque pointers at the same time and simplify the transition. Translation to LLVM IR of MLIR that involves opaque pointers requires the LLVMContext to be configured to always use opaque pointers. Reviewed By: wsmoses Differential Revision: https://reviews.llvm.org/D123310 | 4 年前 |