[PATCH] D110407: [fir] Add fir.save_result op
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 25 11:04:39 PDT 2021
mehdi_amini added inline comments.
================
Comment at: flang/lib/Optimizer/Dialect/FIROps.cpp:1305
+static mlir::LogicalResult verify(fir::SaveResultOp op) {
+ auto resultType = op.value().getType();
+ if (resultType != fir::dyn_cast_ptrEleTy(op.memref().getType()))
----------------
clementval wrote:
> mehdi_amini wrote:
> > Nit: The naming `resultType` confused me, because this is the input value to the operation and not its result (there aren't any results for this op)
> >
> It the resultType of the function as mentioned in the description. I'm not sure we can have a better name for that maybe `valueType`?
I guess the op being named "SaveResult" it is doomed to such collision with the usual "result" in the context of operation. Don't sweat it, that's fine as is.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110407/new/
https://reviews.llvm.org/D110407
More information about the llvm-commits
mailing list