Page MenuHomePhabricator

[flang][driver] Update PP tests to use the new driver
ClosedPublic

Authored by FarisRehman on Jan 15 2021, 10:00 AM.

Details

Summary

Update the preprocessor regression tests to use the new driver if flang-new is built, otherwise the tests will still run with f18.

Summary of changes:

  • Introduce %flang-driver to the regression tests, which points to the new driver if it is built or otherwise points to f18
  • Update all tests in flang/test/Preprocessing/ to use %flang-driver

Depends on: D93453, D94516, D94228, D94782

Diff Detail

Event Timeline

FarisRehman created this revision.Jan 15 2021, 10:00 AM
FarisRehman requested review of this revision.Jan 15 2021, 10:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 15 2021, 10:00 AM
FarisRehman edited the summary of this revision. (Show Details)Jan 15 2021, 10:02 AM
FarisRehman added a project: Restricted Project.
sameeranjoshi accepted this revision.Jan 20 2021, 1:58 AM

We are slowly trying to replace the throwaway driver f18. That's actually a good progress.
Thank you for the progress @awarzynski @FarisRehman
I would wait for others to approve as this patch touches the core Fortran parts.

This revision is now accepted and ready to land.Jan 20 2021, 1:58 AM
awarzynski accepted this revision.Jan 21 2021, 7:27 AM

This change:

  • preserves the current behavior when FLANG_BUILD_NEW_DRIVER=OFF
  • adds a lot of new tests for flang-new when FLANG_BUILD_NEW_DRIVER=ON at almost no cost

Really nice to see this patch! I have two suggestions for the future:

  • when flang-new becomes flang, we should update flang-driver accordingly
  • also, we could switch to flang-new -fc1 instead of flang-new

I don't see a good reason for these to happen just now - one step at a time! LGTM

Really nice to see this patch! I have two suggestions for the future:

  • when flang-new becomes flang, we should update flang-driver accordingly

You could change %flang-driver and %flang-new to %flang now. That way it wouldn't be necessary to change all of the tests again.

FarisRehman updated this revision to Diff 318920.EditedJan 25 2021, 1:26 AM

Rename flang-driver to flang

Address review comments by renaming %flang-driver to %flang.

awarzynski added inline comments.Jan 25 2021, 3:06 AM
flang/test/Flang-Driver/code-gen.f90
1–5 ↗(On Diff #318920)

I'm guessing that this was added by accident ;-) Don't forget to revert before committing to main.

This revision was automatically updated to reflect the committed changes.
FarisRehman marked an inline comment as done.