[PATCH] D113666: [flang][CodeGen] Transform `fir.emboxchar` to a sequence of LLVM MLIR

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 02:35:53 PST 2021


awarzynski added a comment.

In D113666#3126753 <https://reviews.llvm.org/D113666#3126753>, @clementval wrote:

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

Yup, I was planning to send a bigger patch back to `fir-dev` once I finish `fir.boxchar`. Is that OK?



================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:1403
+    mlir::ValueRange operands = adaptor.getOperands();
+    MLIRContext *ctx = emboxChar.getContext();
+
----------------
clementval wrote:
> This is often `auto` in MLIR code base. 
Having seen `LLVMContext`, `ASTContext`, `MCContext` ... I just really like to know exactly which context I'm dealing with. But I guess that it's unlikely to be anything other than `MLIRContext` in this file.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:1408
+
+    mlir::Location loc = emboxChar.getLoc();
+    mlir::Type llvmStructTy = convertType(emboxChar.getType());
----------------
clementval wrote:
> `getLoc()` is almost 100% of the time `auto` in the LLVM/MLIR code base. 
Almost:
```
grep  -iEr "Location getLoc" mlir/ | wc -l
       9
```
But `auto` is indeed more popular. Let me revert this.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113666



More information about the llvm-commits mailing list