Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Driver] Restrict Ofast deprecation help message to Clang #101682

Merged

Conversation

kiranchandramohan
Copy link
Contributor

The discussion about this in Flang (https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243) has not concluded hence restricting the deprecation only to Clang.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Aug 2, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 2, 2024

@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: Kiran Chandramohan (kiranchandramohan)

Changes

The discussion about this in Flang (https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243) has not concluded hence restricting the deprecation only to Clang.


Full diff: https://github.com/llvm/llvm-project/pull/101682.diff

1 Files Affected:

  • (modified) clang/include/clang/Driver/Options.td (+3-2)
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index f690467bb82cd..d13bc51811c3c 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -932,8 +932,9 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>,
   Alias<O>, AliasArgs<["1"]>;
 def Ofast : Joined<["-"], "Ofast">, Group<O_Group>,
   Visibility<[ClangOption, CC1Option, FlangOption]>,
-  HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior,"
-  " or '-O3' to enable only conforming optimizations">;
+  HelpTextForVariants<[ClangOption,CC1Option],
+                      "Deprecated; use '-O3 -ffast-math' for the same behavior,"
+                      " or '-O3' to enable only conforming optimizations">;
 def P : Flag<["-"], "P">,
   Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
   Group<Preprocessor_Group>,

@AaronBallman AaronBallman requested a review from MaskRay August 2, 2024 15:55
@AaronBallman AaronBallman added the clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' label Aug 2, 2024
Copy link
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Changes LGTM; please give @MaskRay a day before landing though, in case he's got concerns. Once this lands, we should cherry-pick to 19.x

@@ -932,8 +932,9 @@ def O_flag : Flag<["-"], "O">, Visibility<[ClangOption, CC1Option, FC1Option]>,
Alias<O>, AliasArgs<["1"]>;
def Ofast : Joined<["-"], "Ofast">, Group<O_Group>,
Visibility<[ClangOption, CC1Option, FlangOption]>,
HelpText<"Deprecated; use '-O3 -ffast-math' for the same behavior,"
" or '-O3' to enable only conforming optimizations">;
HelpTextForVariants<[ClangOption,CC1Option],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
HelpTextForVariants<[ClangOption,CC1Option],
HelpTextForVariants<[ClangOption, CC1Option],

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the change in the force-push.

@kiranchandramohan kiranchandramohan force-pushed the Ofast_restrict_clang_deprec branch from e94fab5 to 5bf3f2a Compare August 2, 2024 16:24
@MaskRay
Copy link
Member

MaskRay commented Aug 2, 2024

Thanks for the clarification!
Cc some flang developers to confirm this and #101701 are the direction as https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243 doesn't have lots of recorded discussion: @banach-space @clementval @klausler

@clementval
Copy link
Contributor

Thanks for the clarification! Cc some flang developers to confirm this and #101701 are the direction as https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243 doesn't have lots of recorded discussion: @banach-space @clementval @klausler

👍 This was discussed during the flang weekly call.

@kiranchandramohan kiranchandramohan added this to the LLVM 19.X Release milestone Aug 5, 2024
@kiranchandramohan kiranchandramohan merged commit e60ee1f into llvm:main Aug 5, 2024
7 checks passed
@kiranchandramohan
Copy link
Contributor Author

/cherry-pick e60ee1f

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 5, 2024
The discussion about this in Flang
(https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243) has
not concluded hence restricting the deprecation only to Clang.

(cherry picked from commit e60ee1f)
@llvmbot
Copy link
Member

llvmbot commented Aug 5, 2024

/pull-request #101963

tru pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 10, 2024
The discussion about this in Flang
(https://discourse.llvm.org/t/rfc-deprecate-ofast-in-flang/80243) has
not concluded hence restricting the deprecation only to Clang.

(cherry picked from commit e60ee1f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
Development

Successfully merging this pull request may close these issues.

6 participants