[all-commits] [llvm/llvm-project] 6ffea7: [flang] Use BIND name, if any, when consolidating ...
jeanPerier via All-commits
all-commits at lists.llvm.org
Fri Sep 8 01:44:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6ffea74f7c2cda7de91879a771daa6d45da198d9
https://github.com/llvm/llvm-project/commit/6ffea74f7c2cda7de91879a771daa6d45da198d9
Author: jeanPerier <jperier at nvidia.com>
Date: 2023-09-08 (Fri, 08 Sep 2023)
Changed paths:
M flang/include/flang/Common/Fortran.h
M flang/include/flang/Lower/LoweringOptions.def
M flang/include/flang/Lower/Mangler.h
M flang/include/flang/Semantics/semantics.h
M flang/include/flang/Semantics/tools.h
M flang/lib/Frontend/CompilerInvocation.cpp
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/Mangler.cpp
M flang/lib/Optimizer/Transforms/ExternalNameConversion.cpp
M flang/lib/Semantics/semantics.cpp
M flang/lib/Semantics/tools.cpp
A flang/test/Lower/HLFIR/common-block-bindc-conflicts.f90
M flang/test/Lower/OpenMP/copyin.f90
M flang/test/Lower/OpenMP/declare-target-data.f90
M flang/test/Lower/OpenMP/firstprivate-commonblock.f90
M flang/test/Lower/OpenMP/lastprivate-commonblock.f90
M flang/test/Lower/OpenMP/private-commonblock.f90
M flang/test/Lower/OpenMP/threadprivate-common-block-hlfir.f90
M flang/test/Lower/OpenMP/threadprivate-commonblock.f90
M flang/test/Lower/OpenMP/threadprivate-use-association.f90
M flang/test/Lower/array.f90
M flang/test/Lower/common-block-2.f90
M flang/test/Lower/common-block.f90
M flang/test/Lower/equivalence-2.f90
M flang/test/Lower/explicit-interface-results-2.f90
M flang/test/Lower/host-associated-globals.f90
M flang/test/Lower/module_definition.f90
M flang/test/Lower/module_use.f90
M flang/test/Lower/module_use_in_same_file.f90
M flang/test/Lower/namelist-common-block.f90
M flang/test/Lower/pointer-assignments.f90
M flang/test/Lower/pointer-initial-target-2.f90
Log Message:
-----------
[flang] Use BIND name, if any, when consolidating common blocks (#65613)
This patch changes how common blocks are aggregated and named in
lowering in order to:
* fix one obvious issue where BIND(C) and non BIND(C) with the same
Fortran name were "merged"
* go further and deal with a derivative where the BIND(C) C name matches
the assembly name of a Fortran common block. This is a bit unspecified
IMHO, but gfortran, ifort, and nvfortran "merge" the common block
without complaints as a linker would have done. This required getting
rid of all the common block mangling early in FIR (\_QC) instead of
leaving that to the phase that emits LLVM from FIR because BIND(C)
common blocks did not have mangled names. Care has to be taken to deal
with the underscoring option of flang-new.
See added flang/test/Lower/HLFIR/common-block-bindc-conflicts.f90 for an
illustration.
More information about the All-commits
mailing list