[all-commits] [llvm/llvm-project] c91ba0: [Flang][NFC] Split runtime headers in preparation ...
Michael Kruse via All-commits
all-commits at lists.llvm.org
Fri Dec 6 06:29:22 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c91ba04328e1ded6f284469a7828d181324d4e30
https://github.com/llvm/llvm-project/commit/c91ba04328e1ded6f284469a7828d181324d4e30
Author: Michael Kruse <llvm-project at meinersbur.de>
Date: 2024-12-06 (Fri, 06 Dec 2024)
Changed paths:
M flang/include/flang/Lower/Allocatable.h
M flang/include/flang/Optimizer/Builder/IntrinsicCall.h
M flang/include/flang/Optimizer/Builder/MutableBox.h
M flang/include/flang/Optimizer/CodeGen/DescriptorModel.h
M flang/include/flang/Runtime/CUDA/allocatable.h
M flang/include/flang/Runtime/CUDA/allocator.h
M flang/include/flang/Runtime/CUDA/common.h
M flang/include/flang/Runtime/CUDA/descriptor.h
M flang/include/flang/Runtime/CUDA/memory.h
A flang/include/flang/Runtime/allocator-registry-consts.h
M flang/include/flang/Runtime/allocator-registry.h
A flang/include/flang/Runtime/array-constructor-consts.h
M flang/include/flang/Runtime/array-constructor.h
A flang/include/flang/Runtime/descriptor-consts.h
M flang/include/flang/Runtime/descriptor.h
A flang/include/flang/Runtime/io-api-consts.h
M flang/include/flang/Runtime/io-api.h
A flang/include/flang/Runtime/iostat-consts.h
M flang/include/flang/Runtime/iostat.h
M flang/lib/Lower/Bridge.cpp
M flang/lib/Lower/ConvertVariable.cpp
M flang/lib/Lower/IO.cpp
M flang/lib/Optimizer/Builder/IntrinsicCall.cpp
M flang/lib/Optimizer/Builder/Runtime/ArrayConstructor.cpp
M flang/lib/Optimizer/CodeGen/CodeGen.cpp
M flang/lib/Semantics/compute-offsets.cpp
M flang/runtime/array-constructor.cpp
M flang/runtime/environment-default-list.h
M flang/runtime/internal-unit.cpp
M flang/test/Lower/HLFIR/array-ctor-as-runtime-temp.f90
M flang/test/Lower/HLFIR/array-ctor-character.f90
M flang/test/Lower/HLFIR/array-ctor-derived.f90
M flang/test/Lower/HLFIR/structure-constructor.f90
M flang/unittests/Optimizer/Builder/Runtime/AllocatableTest.cpp
M flang/unittests/Runtime/ArrayConstructor.cpp
M flang/unittests/Runtime/ExternalIOTest.cpp
M flang/unittests/Runtime/ListInputTest.cpp
M flang/unittests/Runtime/LogicalFormatTest.cpp
M flang/unittests/Runtime/Namelist.cpp
M flang/unittests/Runtime/NumericalFormatTest.cpp
M flang/unittests/Runtime/RuntimeCrashTest.cpp
Log Message:
-----------
[Flang][NFC] Split runtime headers in preparation for cross-compilation. (#112188)
Split some headers into headers for public and private declarations in
preparation for #110217. Moving the runtime-private headers in
runtime-private include directory will occur in #110298.
* Do not use `sizeof(Descriptor)` in the compiler. The size of the
descriptor is target-dependent while `sizeof(Descriptor)` is the size of
the Descriptor for the host platform which might be too small when
cross-compiling to a different platform. Another problem is that the
emitted assembly ((cross-)compiling to the same target) is not identical
between Flang's running on different systems. Moving the declaration of
`class Descriptor` out of the included header will also reduce the
amount of #included sources.
* Do not use `sizeof(ArrayConstructorVector)` and
`alignof(ArrayConstructorVector)` in the compiler. Same reason as with
`Descriptor`.
* Compute the descriptor's extra flags without instantiating a
Descriptor. `Fortran::runtime::Descriptor` is defined in the runtime
source, but not the compiler source.
* Move `InquiryKeywordHashDecode` into runtime-private header. The
function is defined in the runtime sources and trying to call it in the
compiler would lead to a link-error.
* Move allocator-kind magic numbers into common header. They are the
only declarations out of `allocator-registry.h` in the compiler as well.
This does not make Flang cross-compile ready yet, the main goal is to
avoid transitive header dependencies from Flang to clang-rt. There are
more assumptions that host platform is the same as the target platform.
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