[PATCH] D119332: [flang] Add Win32 to the list of supported triples

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 10:09:16 PST 2022


schweitz added a comment.

In D119332#3310504 <https://reviews.llvm.org/D119332#3310504>, @awarzynski wrote:

>> Have you tried this patch on fir-dev?
>
> Yes and everything worked fine for me. Though I only tested on Linux (not sure that matters though, most/all tests seem to use `--target=x86_64-unknown-linux-gnu`).
>
> I didn't see anything that would be OS (or ABI) specific in `KindMapping`, which is what `fir::CodeGenSpecifics::get` effectively returns. To me this looks like a fairly safe change to make.

I don't follow that.

The KindMap is not related to the target machine. It is effectively a mini-language to allow support for different dialects of Fortran that may use or reassign KIND values (in the source syntax) as a form of future-proofing the optimizer. (It's a source code thing.)

Code gen to a specific target can and does depend on what the target (triple) is from the user, the ABI(s) of that target, and how the LLVM machine code expects aspects to see the LLVM IR presented to produce the correct calls, memory layouts, etc. flang has to follow in clang's footsteps in that regard as different LLVM backends expect different types, etc. (The target is a codegen thing.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119332



More information about the llvm-commits mailing list