Like OpenBSD we removed classic flang from the tree a while ago. At the time I didn’t think anyone was aware it was being ported forward, but at this point all our infrastructure for Fortran uses gfortran so the impact was low.
If it breaks the impasse I’d be happy with flang being installed as llvm-fortran for 17.
No. This was already discussed above. It must be Flang and Clang. As an intermediate step you may prefix Flang with llvm to avoid confusion with the classic flang. IMHO, llvm-flang is an improvement over flang-new.
Strongly agree here. Branding is hard. Naming is hard. Managing packages is hard. Removing flang from the name throws a massive sideways wrench in all those hard problems.
Some distros use git-<package> or <package>-git to show that this is a development version of the package named <package>. It is widely accepted that git packages are the same as their non-git counterparts in functionality, only more unstable and with new features.
Naming it flang-git or git-flang would also be technically correct, since we are using git.
But in the end, anything that has flang in its name is better than any other alternative.
This is a thought more than a proposal, but in our conclusion above we suggested that packagers should install flang as llvm-flang (at least for now), but it’s named flang-new in the repo. Should we change the name in the repo to llvm-flang to make that clearer and give packagers one less thing to do?
Playing devils advocate a little bit, is changing the name to llvm-flang for now making it less likely that there will be strong support to change it to just flang later? Since llvm-flang doesn’t seem as much like an obviously temporary name as flang-new?
Given that we’re not renaming it to its “official” name yet, I don’t really have that strong of an opinion on what its temporary name is.
Is there a way to follow the progress on the HLFIR effort, e.g. any of: a tracking issue, a milestone, a project, a status page? I checked for all 4 without success, but maybe I’ve missed something.
Implementation Progress:
HLFIR (High LevelLFIR (High Level FIR dialect)
Most of issues with intrinsic ops were fixed last week.
Only two relatively big TODOs. Affects about 10 tests. Character conversion (Anthony working on this), Paranthesized Polymorphic arrays.
In a good shape correctness-wise. Testing with HLFIR + Polymorphic type enabled. Will do with intrinsic ops enabled.
Currently around 100 failures. Some of them do not work with FIR. So the failure rate is lower. Next is investigating performance. Will prioritise based on this investigation.
Enabling HLFIR end to end OpenMP tests make sense right now. Please have a look to see whether something needs to be done.
As soon as we can switch, the better. This needs an RFC.
With respect, that is a hyper-focused view on the current implementation status, not a big picture “what overall points are still outstanding to consider the HLFIR refactoring done” (much less some list of TODOs as would be captured in a tracking issue, milestone, etc.).
Coaxing out some points from your list (obviously this is just for illustration, it shouldn’t be me doing that).
I have noticed that there are several tests that are not being built correctly in the gfortran test suite. I am in the process of fixing those issues (more such patches will follow). I should be able to provide a “more correct” success rate after that.
Btw, due to other commitments, I won’t be able to help with this throughout February. Please feel free to edit/merge/re-use my PR in whatever way that could help progress this.
I have just finished updating the build system for the gfortran tests because they were not generally being built correctly. I can provide an update on the status of flang on the test suite later this week or early next week.
Below is a high-level summary of the performance of flang on the gfortran test suite:
Category
Count
Notes
Total
7878
Viable
7688
Tests that are not excluded on the platform (Linux, x86_64) or explicitly unsupported because of unsupported extensions etc.
Passing
5584
Failing
2104
A rough count of the causes of the failures are provided below. These are deliberately broad categories just so we can get a rough idea of how things stand. Some of the categories disproportionately affect certain categories of tests. For instance, most of the scanning and parsing errors affect the OpenMP and OpenACC tests.
Cause
Count
Notes
Not yet implemented assertion
858
Segmentation fault
100
These all seemed to be at compile-time. The runtime never segfaulted
Could not scan
22
Could not parse
161
Unknown commandline argument
91
Some of these are limitations with the test suite which will be addressed.
Undeclared identifier
31
These seemed to all be related to C interoperability and something missing in the header.
Undefined reference
34
These seemed to be related to math functions missing from the runtime for the most part
Semantic Errors
239
Linker Error
7
This is due to the -flto not being handled correctly in the test suite.
Runtime error
14
The runtime raised an error
Terminated by signal
4
These are probably timeouts but may be a result of an issue in the runtime
Others
543
These are usually mismatches between the expected and actual test results
I can provide a more detailed breakdown if required at the flang community call.
I’d like to see the compiler segfaults fixed for sure.
For the others, I’d like us to evaluate bad bug vs. minor issue, e.g. off by 100 or off by 0.0000001, respectively.
Do you have a breakdown by test somewhere? I’m curious about the fail-to-parse as well as the semantic errors.
My test harness is running about 6600 tests. Of those, about 5200 are deemed ok, which means they are passing, not yet implemented, or not applicable to flang for some reason. Most of the remaining tests have not been classified yet.
I don’t have the exact error message corresponding to each test but I can probably get you that if you need it. But here are lists of tests that produce “could not scan” and “could not parse” errors. The paths are relative to Fortran/gfortran/regression in the test suite: