[all-commits] [llvm/llvm-project] b815a3: [Flang] Move non-common headers to FortranSupport ...

Michael Kruse via All-commits all-commits at lists.llvm.org
Thu Feb 6 06:29:32 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b815a3942a0b0a9e7aab6b269ffdb0e93abc4368
      https://github.com/llvm/llvm-project/commit/b815a3942a0b0a9e7aab6b269ffdb0e93abc4368
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2025-02-06 (Thu, 06 Feb 2025)

  Changed paths:
    R flang/include/flang/Common/Fortran-features.h
    R flang/include/flang/Common/Fortran.h
    A flang/include/flang/Common/ISO_Fortran_binding_wrapper.h
    R flang/include/flang/Common/LangOptions.def
    R flang/include/flang/Common/LangOptions.h
    R flang/include/flang/Common/MathOptionsBase.def
    R flang/include/flang/Common/MathOptionsBase.h
    R flang/include/flang/Common/OpenMP-features.h
    R flang/include/flang/Common/OpenMP-utils.h
    R flang/include/flang/Common/Version.h
    R flang/include/flang/Common/default-kinds.h
    M flang/include/flang/Common/erfc-scaled.h
    M flang/include/flang/Common/fast-int-set.h
    M flang/include/flang/Common/format.h
    M flang/include/flang/Common/optional.h
    M flang/include/flang/Common/real.h
    M flang/include/flang/Common/reference-wrapper.h
    M flang/include/flang/Common/restorer.h
    M flang/include/flang/Common/target-rounding.h
    M flang/include/flang/Common/template.h
    M flang/include/flang/Common/uint128.h
    M flang/include/flang/Common/visit.h
    M flang/include/flang/Evaluate/call.h
    M flang/include/flang/Evaluate/characteristics.h
    M flang/include/flang/Evaluate/common.h
    M flang/include/flang/Evaluate/constant.h
    M flang/include/flang/Evaluate/expression.h
    M flang/include/flang/Evaluate/intrinsics.h
    M flang/include/flang/Evaluate/target.h
    M flang/include/flang/Evaluate/type.h
    M flang/include/flang/Frontend/CompilerInvocation.h
    M flang/include/flang/Frontend/FrontendOptions.h
    M flang/include/flang/ISO_Fortran_binding.h
    R flang/include/flang/ISO_Fortran_binding_wrapper.h
    M flang/include/flang/Lower/AbstractConverter.h
    M flang/include/flang/Lower/Bridge.h
    M flang/include/flang/Lower/ConvertType.h
    M flang/include/flang/Lower/LoweringOptions.h
    M flang/include/flang/Optimizer/Builder/FIRBuilder.h
    M flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h
    M flang/include/flang/Optimizer/CodeGen/DescriptorModel.h
    M flang/include/flang/Optimizer/Dialect/CUF/Attributes/CUFAttr.h
    M flang/include/flang/Optimizer/Support/TypeCode.h
    M flang/include/flang/Optimizer/Support/Utils.h
    M flang/include/flang/Parser/dump-parse-tree.h
    M flang/include/flang/Parser/message.h
    M flang/include/flang/Parser/parse-state.h
    M flang/include/flang/Parser/parse-tree.h
    M flang/include/flang/Parser/parsing.h
    M flang/include/flang/Parser/user-state.h
    M flang/include/flang/Runtime/descriptor-consts.h
    M flang/include/flang/Runtime/descriptor.h
    M flang/include/flang/Runtime/random.h
    M flang/include/flang/Runtime/support.h
    M flang/include/flang/Runtime/type-code.h
    M flang/include/flang/Semantics/expression.h
    M flang/include/flang/Semantics/scope.h
    M flang/include/flang/Semantics/semantics.h
    M flang/include/flang/Semantics/symbol.h
    M flang/include/flang/Semantics/tools.h
    M flang/include/flang/Semantics/type.h
    A flang/include/flang/Support/Fortran-features.h
    A flang/include/flang/Support/Fortran.h
    A flang/include/flang/Support/LangOptions.def
    A flang/include/flang/Support/LangOptions.h
    A flang/include/flang/Support/MathOptionsBase.def
    A flang/include/flang/Support/MathOptionsBase.h
    A flang/include/flang/Support/OpenMP-features.h
    A flang/include/flang/Support/OpenMP-utils.h
    A flang/include/flang/Support/Version.h
    A flang/include/flang/Support/default-kinds.h
    M flang/include/flang/Tools/CrossToolHelpers.h
    M flang/lib/CMakeLists.txt
    R flang/lib/Common/CMakeLists.txt
    R flang/lib/Common/Fortran-features.cpp
    R flang/lib/Common/Fortran.cpp
    R flang/lib/Common/LangOptions.cpp
    R flang/lib/Common/OpenMP-utils.cpp
    R flang/lib/Common/Version.cpp
    R flang/lib/Common/default-kinds.cpp
    R flang/lib/Common/idioms.cpp
    M flang/lib/Decimal/CMakeLists.txt
    M flang/lib/Evaluate/CMakeLists.txt
    M flang/lib/Evaluate/call.cpp
    M flang/lib/Evaluate/formatting.cpp
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/lib/Frontend/CMakeLists.txt
    M flang/lib/Frontend/CompilerInstance.cpp
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/CMakeLists.txt
    M flang/lib/Lower/CallInterface.cpp
    M flang/lib/Lower/ConvertExpr.cpp
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    M flang/lib/Optimizer/CodeGen/TypeConverter.cpp
    M flang/lib/Optimizer/Dialect/FIRType.cpp
    M flang/lib/Optimizer/OpenMP/CMakeLists.txt
    M flang/lib/Optimizer/OpenMP/GenericLoopConversion.cpp
    M flang/lib/Optimizer/Passes/CMakeLists.txt
    M flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
    M flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
    M flang/lib/Optimizer/Transforms/CMakeLists.txt
    M flang/lib/Optimizer/Transforms/CUFDeviceGlobal.cpp
    M flang/lib/Optimizer/Transforms/CUFGPUToLLVMConversion.cpp
    M flang/lib/Optimizer/Transforms/CUFOpConversion.cpp
    M flang/lib/Optimizer/Transforms/ExternalNameConversion.cpp
    M flang/lib/Optimizer/Transforms/LoopVersioning.cpp
    M flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
    M flang/lib/Optimizer/Transforms/StackReclaim.cpp
    M flang/lib/Optimizer/Transforms/VScaleAttr.cpp
    M flang/lib/Parser/CMakeLists.txt
    M flang/lib/Parser/basic-parsers.h
    M flang/lib/Parser/prescan.h
    M flang/lib/Parser/unparse.cpp
    M flang/lib/Semantics/CMakeLists.txt
    M flang/lib/Semantics/check-return.cpp
    M flang/lib/Semantics/check-select-rank.cpp
    M flang/lib/Semantics/check-stop.cpp
    M flang/lib/Semantics/data-to-inits.h
    M flang/lib/Semantics/expression.cpp
    M flang/lib/Semantics/resolve-names-utils.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/semantics.cpp
    M flang/lib/Semantics/tools.cpp
    M flang/lib/Support/CMakeLists.txt
    A flang/lib/Support/Fortran-features.cpp
    A flang/lib/Support/Fortran.cpp
    A flang/lib/Support/LangOptions.cpp
    A flang/lib/Support/OpenMP-utils.cpp
    A flang/lib/Support/Version.cpp
    A flang/lib/Support/default-kinds.cpp
    A flang/lib/Support/idioms.cpp
    M flang/runtime/CUDA/allocator.cpp
    M flang/runtime/ISO_Fortran_binding.cpp
    M flang/runtime/ISO_Fortran_util.h
    M flang/runtime/allocatable.cpp
    M flang/runtime/stat.h
    M flang/runtime/temporary-stack.cpp
    M flang/tools/bbc/CMakeLists.txt
    M flang/tools/bbc/bbc.cpp
    M flang/tools/f18-parse-demo/CMakeLists.txt
    M flang/tools/f18-parse-demo/f18-parse-demo.cpp
    M flang/tools/tco/CMakeLists.txt
    M flang/unittests/Evaluate/CMakeLists.txt
    M flang/unittests/Evaluate/ISO-Fortran-binding.cpp
    M flang/unittests/Frontend/CMakeLists.txt
    M flang/unittests/Runtime/CUDA/Allocatable.cpp
    M flang/unittests/Runtime/CUDA/AllocatorCUF.cpp
    M flang/unittests/Runtime/CUDA/Memory.cpp
    M flang/unittests/Runtime/TemporaryStack.cpp

  Log Message:
  -----------
  [Flang] Move non-common headers to FortranSupport (#124416)

Move non-common files from FortranCommon to FortranSupport (analogous to
LLVMSupport) such that

* declarations and definitions that are only used by the Flang compiler,
but not by the runtime, are moved to FortranSupport

* declarations and definitions that are used by both ("common"), the
compiler and the runtime, remain in FortranCommon

* generic STL-like/ADT/utility classes and algorithms remain in
FortranCommon

This allows a for cleaner separation between compiler and runtime
components, which are compiled differently. For instance, runtime
sources must not use STL's `<optional>` which causes problems with CUDA
support. Instead, the surrogate header `flang/Common/optional.h` must be
used. This PR fixes this for `fast-int-sel.h`.

Declarations in include/Runtime are also used by both, but are
header-only. `ISO_Fortran_binding_wrapper.h`, a header used by compiler
and runtime, is also moved into FortranCommon.



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