FuncOp funcOp, LLVM::LLVMFuncOp newFuncOp) {
auto type = funcOp.getType();
SmallVector<NamedAttribute, 4> attributes;
- filterFuncAttributes(funcOp.getAttrs(), /*filterArgAttrs=*/false, attributes);
+ filterFuncAttributes(funcOp->getAttrs(), /*filterArgAttrs=*/false,
+ attributes);
auto wrapperFuncOp = rewriter.create<LLVM::LLVMFuncOp>(
loc, llvm::formatv("_mlir_ciface_{0}", funcOp.getName()).str(),
typeConverter.convertFunctionTypeCWrapper(type), LLVM::Linkage::External,
assert(wrapperType && "unexpected type conversion failure");
SmallVector<NamedAttribute, 4> attributes;
- filterFuncAttributes(funcOp.getAttrs(), /*filterArgAttrs=*/false, attributes);
+ filterFuncAttributes(funcOp->getAttrs(), /*filterArgAttrs=*/false,
+ attributes);
// Create the auxiliary function.
auto wrapperFunc = builder.create<LLVM::LLVMFuncOp>(
// Propagate argument attributes to all converted arguments obtained after
// converting a given original argument.
SmallVector<NamedAttribute, 4> attributes;
- filterFuncAttributes(funcOp.getAttrs(), /*filterArgAttrs=*/true,
+ filterFuncAttributes(funcOp->getAttrs(), /*filterArgAttrs=*/true,
attributes);
for (unsigned i = 0, e = funcOp.getNumArguments(); i < e; ++i) {
auto attr = impl::getArgAttrDict(funcOp, i);
rewriter);
auto newOp = rewriter.create<LLVM::CallOp>(
callOp.getLoc(), packedResult ? TypeRange(packedResult) : TypeRange(),
- promoted, callOp.getAttrs());
+ promoted, callOp->getAttrs());
SmallVector<Value, 4> results;
if (numResults < 2) {
matchAndRewrite(SourceOp op, ArrayRef<Value> operands,
ConversionPatternRewriter &rewriter) const override {
rewriter.replaceOpWithNewOp<TargetOp>(op, operands, op->getSuccessors(),
- op.getAttrs());
+ op->getAttrs());
return success();
}
};
// If ReturnOp has 0 or 1 operand, create it and return immediately.
if (numArguments == 0) {
rewriter.replaceOpWithNewOp<LLVM::ReturnOp>(op, TypeRange(), ValueRange(),
- op.getAttrs());
+ op->getAttrs());
return success();
}
if (numArguments == 1) {
rewriter.replaceOpWithNewOp<LLVM::ReturnOp>(
- op, TypeRange(), updatedOperands, op.getAttrs());
+ op, TypeRange(), updatedOperands, op->getAttrs());
return success();
}
rewriter.getI64ArrayAttr(i));
}
rewriter.replaceOpWithNewOp<LLVM::ReturnOp>(op, TypeRange(), packed,
- op.getAttrs());
+ op->getAttrs());
return success();
}
};