[PATCH] D78835: [flang] Upstream recent work on FIR to llvm-project.

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 17:48:48 PDT 2020


schweitz marked 4 inline comments as done.
schweitz added inline comments.


================
Comment at: flang/lib/Optimizer/Dialect/FIROps.cpp:617
+  bodyRegion->front().addArgument(iterate.getType());
+  for (auto v : iterArgs)
+    bodyRegion->front().addArgument(v.getType());
----------------
schweitz wrote:
> rriddle wrote:
> > `bodyRegion->front().addArguments(iterArgs.getTypes());`?
> This one caused a test to fail. Have to debug it.
I don't get it. Deferring for now.


================
Comment at: flang/lib/Optimizer/Dialect/FIROps.cpp:1464
+mlir::LogicalResult
+fir::WhereOp::fold(llvm::ArrayRef<mlir::Attribute> opnds,
+                   llvm::SmallVectorImpl<mlir::OpFoldResult> &results) {
----------------
schweitz wrote:
> rriddle wrote:
> > This doesn't seem to do anything? Seems WhereOp is already marked as RecursiveSideEffects which would cause it be deleted in cases where the bodies were empty.
> Removed. It doesn't look like empty `WhereOp`s are removed either way.
Fixed the bug here.


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

https://reviews.llvm.org/D78835





More information about the llvm-commits mailing list