This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver] Ensure negative flags have the same visibility as positive
ClosedPublic

Authored by tblah on Aug 23 2023, 6:32 AM.

Details

Summary

https://reviews.llvm.org/D157151 and https://reviews.llvm.org/D157837
added visibility flags to flang options, hiding options which are
supported only in Clang and not in Flang.

After this change, some negative flags e.g. -fno-reciprocal-math no
longer work with flang. These flags are supported in flang (as can be
seen from the support for the positive flags).

I also opted to make sure the clang visibility is the same on these
flags, although I did not look at changing the visibility of non-flang
flags.

Diff Detail

Event Timeline

tblah created this revision.Aug 23 2023, 6:32 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
tblah requested review of this revision.Aug 23 2023, 6:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2023, 6:32 AM
awarzynski accepted this revision.Aug 23 2023, 8:02 AM

LGTM, ta!

clang/include/clang/Driver/Options.td
5316

Could you add a test? https://github.com/llvm/llvm-project/blob/main/flang/test/Driver/fno-integrated-as.f90

I would probably rename that file as integrated-as.f90 and test 3 variants:

! RUN: <no flag>
! RUN: -fintegrated-as
! RUN: -fno-integrated-as
This revision is now accepted and ready to land.Aug 23 2023, 8:02 AM
tblah updated this revision to Diff 552723.Aug 23 2023, 8:19 AM

Thanks for taking a look.

Changes: add test

MaskRay accepted this revision.Aug 23 2023, 10:46 AM
MaskRay added inline comments.
flang/test/Driver/fintegrated-as.f90
15

The default is -fintegrated-as

This revision was landed with ongoing or failed builds.Aug 29 2023, 2:54 AM
This revision was automatically updated to reflect the committed changes.