[flang-commits] [PATCH] D113560: [fir] Add !fir.char type conversion

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Nov 10 04:57:30 PST 2021


awarzynski added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/TypeConverter.h:159
+
+  // fir.char<n>  -->  llvm<"ix*">   where ix is scaled by kind mapping
+  mlir::Type convertCharType(fir::CharacterType charTy) {
----------------
rovka wrote:
> awarzynski wrote:
> > [nit] Shouldn't this be:
> > * `!fir.char<n, 12>` --> `!llvm.array<12 x ix*>`
> > * `!fir.char<n, ?>` --> `ix*`
> > instead?
> Actually, now that you mention it, I'm noticing we're doing !fir.char<n, ?> -> ix, not ix*. Are we supposed to return LLVMPointerType::get(iTy) instead?
> Are we supposed to return LLVMPointerType::get(iTy) instead?

I don't know the answer to this question, but making the comment consistent with the implementation (and the tests) will make any potential debugging easier :-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113560



More information about the flang-commits mailing list