Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion flang/include/flang/Optimizer/Dialect/CUF/CUFOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ def cuf_KernelLaunchOp : cuf_Op<"kernel_launch", [CallOpInterface,
}

void setCalleeFromCallable(mlir::CallInterfaceCallable callee) {
(*this)->setAttr(getCalleeAttrName(), callee.get<mlir::SymbolRefAttr>());
(*this)->setAttr(getCalleeAttrName(),
llvm::cast<mlir::SymbolRefAttr>(callee));
}
mlir::FunctionType getFunctionType();

Expand Down
5 changes: 3 additions & 2 deletions flang/include/flang/Optimizer/Dialect/FIROps.td
Original file line number Diff line number Diff line change
Expand Up @@ -2488,8 +2488,9 @@ def fir_CallOp : fir_Op<"call",
void setCalleeFromCallable(mlir::CallInterfaceCallable callee) {
if (auto calling =
(*this)->getAttrOfType<mlir::SymbolRefAttr>(getCalleeAttrName()))
(*this)->setAttr(getCalleeAttrName(), callee.get<mlir::SymbolRefAttr>());
setOperand(0, callee.get<mlir::Value>());
(*this)->setAttr(getCalleeAttrName(),
llvm::cast<mlir::SymbolRefAttr>(callee));
setOperand(0, llvm::cast<mlir::Value>(callee));
}
}];
}
Expand Down
Loading