This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver] Remove `%flang-new` from the LIT configuration
ClosedPublic

Authored by awarzynski on Apr 9 2021, 3:54 AM.

Details

Summary

%flang-new was introduced in the early days of the new driver to make
a clear distinction between the tests for the current and the new
driver. We have since introduced %flang (compiler driver) and
%flang_fc1 (frontend driver) as the long term solution. This has allowed
us to share tests between flang-new and f18. This patch replaces
all uses of %flang-new with %flang and %flang_fc1.

Some tests are reformatted so that all tests look uniform and are easier
to follow. Where possible, ! REQUIRES: new-flang-driver is deleted so
that more tests can be shared with f18. To facilitate this,
f{no-}implicit-none are introduced in f18 with semantics identical
to flang-new.

Two tests are deleted rather than updated:

  • flang/test/Frontend/print-preprocess-C-file.f90
  • flang/test/Frontend/print-preprocessed-file.f90

Instead, there is plenty of preprocessor tests in
flang/test/Preprocessing/.

For frontend-only options, RUN lines with the compiler driver are deleted
so that the corresponding files test the frontend functionality rather then
the handling of the corresponding options in the compiler driver. We ought to
introduce a dedicated test for this.

Diff Detail

Event Timeline

awarzynski created this revision.Apr 9 2021, 3:54 AM
awarzynski requested review of this revision.Apr 9 2021, 3:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 9 2021, 3:54 AM
awarzynski edited the summary of this revision. (Show Details)Apr 9 2021, 4:01 AM
SouraVX accepted this revision.Apr 9 2021, 4:03 AM

LGTM. Thanks for the patch! and congratulations on the milestone of bringing experimental driver to mainline!

This revision is now accepted and ready to land.Apr 9 2021, 4:03 AM

LGTM. Thanks for the patch! and congratulations on the milestone of bringing experimental driver to mainline!

Thank you for taking a look so promptly and for you kind words! Just to clarify, this patch will only delete %flang-new from flang/test/lit.cfg.py. The new driver is still called flang-new, but at least in LIT we will only have %flang and %flang_fc1. One step at a time :)

One step at a time :)

+1 :)

The new driver is still called flang-new

I presume eventually next step would be replace that as well ?

The new driver is still called flang-new

I presume eventually next step would be replace that as well ?

Yes, I should be sending an RFC to discuss this shortly (~next couple of weeks).

awarzynski updated this revision to Diff 336431.Apr 9 2021, 6:21 AM

Try to diagnose debug-measure-parse-tree.f90

I've not been able to re-produce the failure from the pre-commit CI, debug-measure-parse-tree.f90 looks fine to me. I'm adding not in front of f18 in order to understand whether it's f18 or FileCheck that's failing. Any other suggestions most welcome!

awarzynski updated this revision to Diff 336456.Apr 9 2021, 7:51 AM

Continue debugging debug-measure-parse-tree.f90

Previous patch revealed that it was f18 that was failing. I'm guessing that it's trying to call an external gfortran compiler and that fails in the pre-commit CI. This can be fixed by adding -fsyntax-only (which we have been adding in other tests for this very reason).

flang/test/Frontend/prescanner-diag.f90