[all-commits] [llvm/llvm-project] 1448ed: [flang] add extra component information in fir.typ...
jeanPerier via All-commits
all-commits at lists.llvm.org
Thu Jun 27 09:59:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1448ed2000ff0be17025dab0aad7412d054425eb
https://github.com/llvm/llvm-project/commit/1448ed2000ff0be17025dab0aad7412d054425eb
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-06-27 (Thu, 27 Jun 2024)
Changed paths:
M flang/include/flang/Optimizer/Builder/FIRBuilder.h
M flang/include/flang/Optimizer/Dialect/FIROps.td
M flang/include/flang/Optimizer/Support/InternalNames.h
M flang/include/flang/Optimizer/Support/Utils.h
M flang/lib/Lower/Bridge.cpp
M flang/lib/Optimizer/Builder/FIRBuilder.cpp
M flang/lib/Optimizer/Dialect/FIROps.cpp
M flang/lib/Optimizer/Support/CMakeLists.txt
M flang/lib/Optimizer/Support/InternalNames.cpp
A flang/lib/Optimizer/Support/Utils.cpp
M flang/test/Fir/fir-ops.fir
A flang/test/Lower/HLFIR/type-info-components.f90
Log Message:
-----------
[flang] add extra component information in fir.type_info (#96746)
fir.type does not contain all Fortran level information about
components. For instance, component lower bounds and default initial
value are lost. For correctness purpose, this does not matter because
this information is "applied" in lowering (e.g., when addressing the
components, the lower bounds are reflected in the hlfir.designate).
However, this "loss" of information will prevent the generation of
correct debug info for the type (needs to know about lower bounds). The
initial value could help building some optimization pass to get rid of
initialization runtime calls.
This patch adds lower bound and initial value information into
fir.type_info via a new fir.dt_component operation. This operation is
generated only for component that needs it, which helps keeping the IR
small for "boring" types.
In general, adding Fortran level info in fir.type_info will allow
delaying the generation of "type descriptors" gobals that are very
verbose in FIR and make it hard to work with FIR dumps from applications
with many derived types.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list