https://github.com/tblah commented:

This looks good overall. Do you expect there to be a lot more wrapper 
operations in the near future? If so, they look like there is a common pattern 
that could be further abstracted. Something like

```c++
template <class OP>
static OP
genWrapperOp(..., llvm::ArrayRef<mlir::type> extraBlockArgTypes) {
  fir::FirOpBuilder &firOpBuilder = ...;

  auto op = firOpBuilder.create<OP>(loc, clauseOps);

  llvm::SmallVector<mlir::Location> blockArgLocs(extraBlockArgTypes.size(), 
loc);
  firOpBuilder.createBlock(...)
  firOpBuilder.setInsertionPoint(...)

  return op;
}
```

https://github.com/llvm/llvm-project/pull/97566
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to