[PATCH] D96987: [flang][fir][NFC] Move remaining types to TableGen type definition

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 14:45:48 PST 2021


rriddle accepted this revision.
rriddle added a comment.

(sorry, didn't get a notification for this)

LGTM given that this is mostly moving around existing code.



================
Comment at: flang/lib/Optimizer/Dialect/FIRType.cpp:238
 
-LenType fir::LenType::get(mlir::MLIRContext *ctxt) {
-  return Base::get(ctxt, 0);
-}
+llvm::SmallPtrSet<detail::RecordTypeStorage const *, 4> recordTypeVisited;
+
----------------
static ?


================
Comment at: flang/lib/Optimizer/Dialect/FIRType.cpp:773
+  // DIMENSION attribute can only be applied to an intrinsic or record type
+  if (eleTy.isa<BoxType>() || eleTy.isa<BoxCharType>() ||
+      eleTy.isa<BoxProcType>() || eleTy.isa<ShapeType>() ||
----------------
Can you use a merged isa here?


================
Comment at: flang/lib/Optimizer/Dialect/FIRType.cpp:856
+                                                mlir::Type eleTy) {
+  if (eleTy.isa<BoxType>() || eleTy.isa<BoxCharType>() ||
+      eleTy.isa<BoxProcType>() || eleTy.isa<ShapeType>() ||
----------------
Same here and in the rest of the CL.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96987



More information about the llvm-commits mailing list