commit | e41b4c3de85527f9214f9834fdbf2397a344b5a5 | [log] [tgz] |
---|---|---|
author | Slava Zakharin <szakharin@nvidia.com> | Mon Mar 10 11:08:37 2025 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Mar 10 11:10:50 2025 -0700 |
tree | 0d89d69a65f43627672a74f49c07ee397a5ace52 | |
parent | dc5e490fa4652d5c6787609f02874129f032b555 [diff] |
[RFC][flang] Add support for assumed-shape dummy arrays repacking. (#127147) This is a document describing why and how to add support for repacking of assumed-shape dummy arrrays to provide more efficient data cache. It proposes adding new FIR operations and outlines the compiler flow handling these operations. I would like to hear feedback on all of it, but especially on: * The possibility of detecting safeness of the repacking in the context of OpenACC/OpenMP. If it is not possible to do the runtime checks to determine safety, then there is not need to add the `TempCopyIsSafe` attributes to the instruction. * Whether it is possible to preserve the debug information in cases where `fir.pack_array` is sunk after `[hl]fir.declare`, so that before the `fir.pack_array` a debugger will refer to the values in the original array, and after `fir.pack_array` it will refer to the copy. GitOrigin-RevId: aa3875411746de0a24a8de0d40def711cd70153d
Flang is a ground-up implementation of a Fortran front end written in modern C++. It started off as the f18 project (https://github.com/flang-compiler/f18) with an aim to replace the previous flang project (https://github.com/flang-compiler/flang) and address its various deficiencies. F18 was subsequently accepted into the LLVM project and rechristened as Flang.
Please note that flang is not ready yet for production usage.
Read more about flang in the docs directory. Start with the compiler overview.
To better understand Fortran as a language and the specific grammar accepted by flang, read Fortran For C Programmers and flang's specifications of the Fortran grammar and the OpenMP grammar.
Treatment of language extensions is covered in this document.
To understand the compilers handling of intrinsics, see the discussion of intrinsics.
To understand how a flang program communicates with libraries at runtime, see the discussion of runtime descriptors.
If you're interested in contributing to the compiler, read the style guide and also review how flang uses modern C++ features.
If you are interested in writing new documentation, follow LLVM's Markdown style guide.
Consult the Getting Started with Flang for information on building and running flang.