[Mlir-commits] [mlir] [mlir][LLVM] Add operand bundle support (PR #108933)
Sirui Mu
llvmlistbot at llvm.org
Sat Sep 21 19:47:56 PDT 2024
================
@@ -544,6 +544,12 @@ struct CallOpInterfaceLowering : public ConvertOpToLLVMPattern<CallOpType> {
callOp.getLoc(), packedResult ? TypeRange(packedResult) : TypeRange(),
promoted, callOp->getAttrs());
+ newOp->setAttr(newOp.getOperandSegmentSizesAttrName(),
+ rewriter.getDenseI32ArrayAttr(
+ {static_cast<int32_t>(promoted.size()), 0}));
----------------
Lancern wrote:
The `build` call is calling into an auto-generated overload that builds an operation all from scratch:
```cpp
static void build(
::mlir::OpBuilder &,
::mlir::OperationState &odsState,
::mlir::TypeRange resultTypes,
::mlir::ValueRange operands,
::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}
);
```
This overload does not perform any "automatic inference" of operands or attributes or something and we have to set the attribute manually.
The same for the change in `SPIRVToLLVM.cpp`.
https://github.com/llvm/llvm-project/pull/108933
More information about the Mlir-commits
mailing list