llvm-project
2eb733b5 - [mlir][tblgen] add concrete create methods (#147168)

Commit
148 days ago
[mlir][tblgen] add concrete create methods (#147168) Currently `builder.create<...>` does not in any meaningful way hint/show the various builders an op supports (arg names/types) because [`create` forwards the args to `build`](https://github.com/llvm/llvm-project/blob/887222e3526fbe08e748a33f740296ac22bf1ab1/mlir/include/mlir/IR/Builders.h#L503). To improve QoL, this PR adds static create methods to the ops themselves like ```c++ static arith::ConstantIntOp create(OpBuilder& builder, Location location, int64_t value, unsigned width); ``` Now if one types `arith::ConstantIntO::create(builder,...` instead of `builder.create<arith::ConstantIntO>(...` auto-complete/hints will pop up. See https://discourse.llvm.org/t/rfc-building-mlir-operation-observed-caveats-and-proposed-solution/87204/13 for more info.
Author
Parents
Loading