[PATCH] D113395: [flang][CodeGen] Transform `IsPresentOpConversion` and `AbsentOpConversion`

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 8 05:50:47 PST 2021


clementval added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:25
 #include "llvm/ADT/ArrayRef.h"
+#include <mlir/Dialect/LLVMIR/LLVMDialect.h>
 
----------------
Why is this suddenly needed? We have been creating LLVM ops until now without this extra include. Also it feels weird to not use quotes here. 


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:86
+    mlir::Type ty = convertType(absent.getType());
+    mlir::Location loc = absent.getLoc();
+
----------------
Fine if you want to update `auto` usage from `fir-dev` here. `getLoc()` is most of the time used with `auto` even in MLIR code base. 

Don't forget to sync back in fir-dev. 


================
Comment at: flang/test/Fir/convert-to-llvm.fir:397
+// CHECK-NEXT: }
+
+func @absent() -> i1 {
----------------
Can you split the test here `//-----` and update the comment accordingly? They is clearly two different ops tested here.   


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113395



More information about the llvm-commits mailing list