[PATCH] D110698: [fir] Update fir.call op

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 29 09:16:00 PDT 2021


clementval added inline comments.


================
Comment at: flang/include/flang/Optimizer/Dialect/FIROps.td:2657
     [{
-      build($_builder, $_state,
-            SymbolRefAttr::get($_builder.getContext(), callee), results,
-            operands);
+      build($_builder, $_state, 
+          SymbolRefAttr::get($_builder.getContext(), callee), results,
----------------
kiranchandramohan wrote:
> Is the plan to move all non-trivial builders to cpp files but retain the trivial ones in td?
Yes. 1 or 2 lines builders/parsers/printers are fine in the td file. More we move them to the .cpp file. 


================
Comment at: flang/include/flang/Optimizer/Dialect/FIROps.td:2669
     operand_range getArgOperands() {
-      if (calleeAttr())
+      if (auto calling =
+          (*this)->getAttrOfType<SymbolRefAttr>(getCalleeAttrName()))
----------------
kiranchandramohan wrote:
> Nit: wouldn't calling become an unused variable and lead to a warning?
Good catch. I'll double check that before pushing. 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110698/new/

https://reviews.llvm.org/D110698



More information about the llvm-commits mailing list