[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)
https://github.com/tblah closed https://github.com/llvm/llvm-project/pull/73548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/73548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)
https://github.com/banach-space approved this pull request. Thanks, LGTM! > @banach-space I'm happy to change the behavior too if you'd prefer that That would be great, but could be done independently. Up to you! In general, I feel that `-f{no-}alias-analysis` interacts with `-O{#N}` in a way that should be avoided. But I'd need to look more into how `-O{#N}` are defined to have a more informed opinion. So just restricting this option for now (provided it still work for you in the intended way) should be fine. https://github.com/llvm/llvm-project/pull/73548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)
tblah wrote: @banach-space I'm happy to change the behavior too if you'd prefer that https://github.com/llvm/llvm-project/pull/73548 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Tom Eccles (tblah) Changes As requested by @branach-space on #73111. This makes it clearer that -f[no-]alias-analysis will always override -O flags, no matter their ordering. --- Full diff: https://github.com/llvm/llvm-project/pull/73548.diff 3 Files Affected: - (modified) clang/include/clang/Driver/Options.td (+2-2) - (modified) flang/test/Driver/driver-help-hidden.f90 (+2-2) - (modified) flang/test/Driver/driver-help.f90 (+4-4) ``diff diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 9689f12fd01417b..3a6df56496ed0f3 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -6334,8 +6334,8 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri PosFlag, NegFlag>; defm alias_analysis : BoolOptionWithoutMarshalling<"f", "alias-analysis", - PosFlag, - NegFlag>; + PosFlag, + NegFlag>; } // let Visibility = [FC1Option, FlangOption] def J : JoinedOrSeparate<["-"], "J">, diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 index b276f1906e1a457..f005c43b1d990c4 100644 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -26,7 +26,7 @@ ! CHECK-NEXT: -D = Define to (or 1 if omitted) ! CHECK-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! CHECK-NEXT: -E Only run the preprocessor -! CHECK-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed) +! CHECK-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed). Overrides -O0. ! CHECK-NEXT: -falternative-parameter-statement ! CHECK-NEXT: Enable the old style PARAMETER statement ! CHECK-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation @@ -63,7 +63,7 @@ ! CHECK-NEXT: -flto Enable LTO in 'full' mode ! CHECK-NEXT: -fms-runtime-lib= ! CHECK-NEXT: Select Windows run-time library -! CHECK-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds) +! CHECK-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags. ! CHECK-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE ! CHECK-NEXT: -fno-color-diagnostics Disable colors in diagnostics ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 index 452c62541e72e61..0cd05c0a64ac062 100644 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -22,7 +22,7 @@ ! HELP-NEXT: -D = Define to (or 1 if omitted) ! HELP-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! HELP-NEXT: -E Only run the preprocessor -! HELP-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed) +! HELP-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed). Overrides -O0. ! HELP-NEXT: -falternative-parameter-statement ! HELP-NEXT: Enable the old style PARAMETER statement ! HELP-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation @@ -53,7 +53,7 @@ ! HELP-NEXT: -flto Enable LTO in 'full' mode ! HELP-NEXT: -fms-runtime-lib= ! HELP-NEXT: Select Windows run-time library -! HELP-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds) +! HELP-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags. ! HELP-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE ! HELP-NEXT: -fno-color-diagnostics Disable colors in diagnostics ! HELP-NEXT: -fno-integrated-as Disable the integrated assembler @@ -149,7 +149,7 @@ ! HELP-FC1-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! HELP-FC1-NEXT: -emit-obj Emit native object files ! HELP-FC1-NEXT: -E Only run the preprocessor -! HELP-FC1-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed) +! HELP-FC1-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed). Overrides -O0. ! HELP-FC1-NEXT: -falternative-parameter-statement ! HELP-FC1-NEXT:
[flang] [clang] [flang] Update -falias-analysis help text (PR #73548)
https://github.com/tblah created https://github.com/llvm/llvm-project/pull/73548 As requested by @branach-space on #73111. This makes it clearer that -f[no-]alias-analysis will always override -O flags, no matter their ordering. >From d65bd2855b170cffdcf04b2052dfa8aec37b4722 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Mon, 27 Nov 2023 17:20:16 + Subject: [PATCH] [flang] Update -falias-analysis help text As requested by @branach-space on #73111. This makes it clearer that -f[no-]alias-analysis will always override -O flags, no matter their ordering. --- clang/include/clang/Driver/Options.td| 4 ++-- flang/test/Driver/driver-help-hidden.f90 | 4 ++-- flang/test/Driver/driver-help.f90| 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 9689f12fd01417b..3a6df56496ed0f3 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -6334,8 +6334,8 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri PosFlag, NegFlag>; defm alias_analysis : BoolOptionWithoutMarshalling<"f", "alias-analysis", - PosFlag, - NegFlag>; + PosFlag, + NegFlag>; } // let Visibility = [FC1Option, FlangOption] def J : JoinedOrSeparate<["-"], "J">, diff --git a/flang/test/Driver/driver-help-hidden.f90 b/flang/test/Driver/driver-help-hidden.f90 index b276f1906e1a457..f005c43b1d990c4 100644 --- a/flang/test/Driver/driver-help-hidden.f90 +++ b/flang/test/Driver/driver-help-hidden.f90 @@ -26,7 +26,7 @@ ! CHECK-NEXT: -D = Define to (or 1 if omitted) ! CHECK-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! CHECK-NEXT: -E Only run the preprocessor -! CHECK-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed) +! CHECK-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed). Overrides -O0. ! CHECK-NEXT: -falternative-parameter-statement ! CHECK-NEXT: Enable the old style PARAMETER statement ! CHECK-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation @@ -63,7 +63,7 @@ ! CHECK-NEXT: -flto Enable LTO in 'full' mode ! CHECK-NEXT: -fms-runtime-lib= ! CHECK-NEXT: Select Windows run-time library -! CHECK-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds) +! CHECK-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags. ! CHECK-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE ! CHECK-NEXT: -fno-color-diagnostics Disable colors in diagnostics ! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler diff --git a/flang/test/Driver/driver-help.f90 b/flang/test/Driver/driver-help.f90 index 452c62541e72e61..0cd05c0a64ac062 100644 --- a/flang/test/Driver/driver-help.f90 +++ b/flang/test/Driver/driver-help.f90 @@ -22,7 +22,7 @@ ! HELP-NEXT: -D = Define to (or 1 if omitted) ! HELP-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! HELP-NEXT: -E Only run the preprocessor -! HELP-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed) +! HELP-NEXT: -falias-analysisPass alias information on to LLVM (default when optimizing for speed). Overrides -O0. ! HELP-NEXT: -falternative-parameter-statement ! HELP-NEXT: Enable the old style PARAMETER statement ! HELP-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation @@ -53,7 +53,7 @@ ! HELP-NEXT: -flto Enable LTO in 'full' mode ! HELP-NEXT: -fms-runtime-lib= ! HELP-NEXT: Select Windows run-time library -! HELP-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds) +! HELP-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags. ! HELP-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE ! HELP-NEXT: -fno-color-diagnostics Disable colors in diagnostics ! HELP-NEXT: -fno-integrated-as Disable the integrated assembler @@ -149,7 +149,7 @@ ! HELP-FC1-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! HELP-FC1-NEXT: -emit-obj Emit native object files ! HELP-FC1-NEXT: -E Only run the preprocessor -! HELP-FC1-NEXT: -falias-analysisPass alias information on