[PATCH] D113295: [flang] Transform `fir.end` to an empty statement

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 8 10:07:25 PST 2021


mehdi_amini added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:89
+                  mlir::ConversionPatternRewriter &rewriter) const override {
+    rewriter.replaceOp(op, {});
+    return success();
----------------
Nit: I think you can spell this `rewriter.eraseOp` for the same effect, but it expressed the intent a bit more clearly.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:92
+  }
+};
+
----------------
I was wondering if we need a pattern of its own for this op or if this should be handled by the parent operation?

The test shows it in isolation, but that does not exist, does it?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113295



More information about the llvm-commits mailing list