[flang-commits] [PATCH] D129018: [flang] Establish a single source of target information for semantics

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Sat Jul 2 11:42:56 PDT 2022


klausler added a comment.

In D129018#3626741 <https://reviews.llvm.org/D129018#3626741>, @tschuett wrote:

> From a design point, I would have expected an abstract base class. Targets can implement it in any way they wish. Maybe the driver is better place for target-specific information. Then you can have a factory method with the target target triple.
>
> There was a discussion that Flang should have used comdats:
> https://reviews.llvm.org/D127455

This patch collects into one place the few items of target information that are relevant to f18 semantics (not optimization or lowering!), which were scattered around various data structures or undefined, and puts them behind a sensible API that suffices for the needs of f18 semantics, which really just needs to know the available types and how to lay them out in derived types so that semantics can build the derived type information tables and fold some layout-dependent intrinsic functions.  How that type information is acquired and installed is another concern not within the scope of this patch.  The next step will be to use this API in semantics to guide the folding of the TRANSFER intrinsic function and see whether it is a good fit, adjusting it if it is not.

We always welcome new contributors to the LLVM Fortran effort; see flang/docs/GettingInvolved.md for more information.  Thank you for your interest.


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

https://reviews.llvm.org/D129018



More information about the flang-commits mailing list