commit | 0409ea0310b00f63fd68ed4a858d415922d3c7f6 | [log] [tgz] |
---|---|---|
author | jeanPerier <jperier@nvidia.com> | Tue Mar 12 09:04:25 2024 +0100 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Mar 12 01:07:19 2024 -0700 |
tree | 1d2b9cfb124acc8c1560bea43d7feb7a75aa8e71 | |
parent | 8c800f46f8ee3c01f68613e40d86bf987dd5143f [diff] |
[flang] implement sizeof lowering for polymorphic entities (#84498) For non polymorphic entities, semantics knows the type size and rewrite sizeof to `"cst element size" * size(x)`. Lowering has to deal with the polymorphic case where the type size must be retrieved from the descriptor (note that the lowering implementation would work with any entity, polymorphic on not, it is just not used for the non polymorphic cases). GitOrigin-RevId: 85f6669de59b2bb75c6848afa79de63be988721c
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.