[PATCH] D110645: [fir][NFC] Rename operand of ArrayCoorOp

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 28 11:38:29 PDT 2021


clementval created this revision.
clementval added reviewers: jeanPerier, svedanayagam, sscalpone, kiranchandramohan, jdoerfert, schweitz.
Herald added a subscriber: mehdi_amini.
Herald added a project: Flang.
clementval requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Rename `lenParams` to `typeparams` to be in sync with fir-dev.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Jean Perier <jperier at nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz at nvidia.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110645

Files:
  flang/include/flang/Optimizer/Dialect/FIROps.td
  flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp


Index: flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
===================================================================
--- flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
+++ flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
@@ -222,7 +222,7 @@
       }
     auto xArrCoor = rewriter.create<cg::XArrayCoorOp>(
         loc, arrCoor.getType(), arrCoor.memref(), shapeOpers, shiftOpers,
-        sliceOpers, subcompOpers, arrCoor.indices(), arrCoor.lenParams());
+        sliceOpers, subcompOpers, arrCoor.indices(), arrCoor.typeparams());
     LLVM_DEBUG(llvm::dbgs()
                << "rewriting " << arrCoor << " to " << xArrCoor << '\n');
     rewriter.replaceOp(arrCoor, xArrCoor.getOperation()->getResults());
Index: flang/include/flang/Optimizer/Dialect/FIROps.td
===================================================================
--- flang/include/flang/Optimizer/Dialect/FIROps.td
+++ flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -1849,16 +1849,17 @@
     Optional<AnyShapeOrShiftType>:$shape,
     Optional<fir_SliceType>:$slice,
     Variadic<AnyCoordinateType>:$indices,
-    Variadic<AnyIntegerType>:$lenParams
+    Variadic<AnyIntegerType>:$typeparams
   );
 
   let results = (outs fir_ReferenceType);
 
   let assemblyFormat = [{
-    $memref (`(`$shape^`)`)? (`[`$slice^`]`)? $indices (`typeparams` $lenParams^)? attr-dict `:` functional-type(operands, results)
+    $memref (`(`$shape^`)`)? (`[`$slice^`]`)? $indices (`typeparams`
+      $typeparams^)? attr-dict `:` functional-type(operands, results)
   }];
 
-  let verifier = [{ return ::verify(*this); }];
+  let verifier = "return ::verify(*this);";
 }
 
 def fir_CoordinateOp : fir_Op<"coordinate_of", [NoSideEffect]> {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110645.375656.patch
Type: text/x-patch
Size: 1693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210928/764d2154/attachment.bin>


More information about the llvm-commits mailing list