This is an archive of the discontinued LLVM Phabricator instance.

[Clang] Add support for -fcx-limited-range, -fcx-fortran-rules options.
Needs RevisionPublic

Authored by jcranmer-intel on Feb 8 2022, 2:19 PM.

Details

Summary

These are built on top of, and require, the complex intrinsics definitions to
work with. They are intended to be similar in operation to the gcc command line
options.

Depends on D119289

Diff Detail

Event Timeline

jcranmer-intel created this revision.Feb 8 2022, 2:19 PM
jcranmer-intel requested review of this revision.Feb 8 2022, 2:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2022, 2:19 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
aaron.ballman added a subscriber: aaron.ballman.

Adding some reviewers, but the changes here look reasonable to me. You should fix the clang-format issues, though.

Same, other than the clang-format, I see nothing to be concerned about. @mdtoguchi is my driver expert however.

mdtoguchi added inline comments.Feb 23 2022, 7:27 AM
clang/include/clang/Driver/Options.td
1853

Typical negate syntax would use -fno-cx-*

clang/lib/Driver/ToolChains/Clang.cpp
2958

Is there any need to disable any settings for -fno-fast-math?

zahiraam added inline comments.
clang/include/clang/Driver/Options.td
1853

+1.

clang/lib/Driver/ToolChains/Clang.cpp
2958

Yes. Under the fno-fast-math the fcx-limited-range is disabled. So we need a to set the CxRangeArg to a value that illustrate that, LangOptions::CX_None?

Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2022, 7:18 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
MaskRay requested changes to this revision.Apr 12 2022, 1:17 PM
MaskRay added inline comments.
clang/test/Driver/complex-range-flags.c
3

delete

this is legacy which is not needed for a long time

6

Move CHECK lines below RUN

14

No need to wrap lines

This revision now requires changes to proceed.Apr 12 2022, 1:17 PM