[llvm-branch-commits] [flang] [Flang] Introduce FortranSupport (PR #122069)
Michael Kruse via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 24 10:40:13 PST 2025
Meinersbur wrote:
Moving this PR out of the chain causes merge conflicts further down, making maintaining consistency of the series even more difficult. At least the change `std::optional` to `optional.h` is needed or I cannot compile it with nvcc (I am not sure how you do). I understand that with submitting patches I accept some responsibility to maintain it. I don't want to do so if it is not in a maintainable state.
I will put this PR as first into the chain, so at least it can be applied independently.
> breaking it up based on today's runtime usage of it is a bit artificial (some features from it that are not used today in the runtime may very well be already usable and may be used tomorrow).
The current FortranCommon is already artificial presumably because it has grown organically: Everything that does not belong to some other library. Some of it (e.g. `genEntryBlock` from `OpenMP-utils.h`, `getFlangRepositoryString()` from `Version.h`) should conceptually never be used by the runtime. Splitting it up by usages actually makes it less artificial.
Any code that is currently not be used in the runtime should be assumed to not work with the runtime. E.g. because it causes an additional link dependency to `FortranCommon.a/so` or libc++, cannot be compiled with nvcc, or requires annotation for offloading. Similarly, code that is not being tested can be assumed to not work or after changes to the future. That is, additional work to make it usable within the runtime is required anyways.
Every other code, including those in other libraries, might also be eventually be useful for the runtime (e.g. if we are to include a JIT). That is not a reason to preemptively make all of them a dependency of the runtime.
Partial use of libraries is called "erroneous configuration" in LLVM, see https://github.com/llvm/llvm-project/commit/ebc3302725350c44aaf5f97ce7ba484e30b3efa8
Sorry, I cannot follow the argument.
https://github.com/llvm/llvm-project/pull/122069
More information about the llvm-branch-commits
mailing list