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 <tom.ecc...@arm.com> Date: Mon, 27 Nov 2023 17:20:16 +0000 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<SetTrue, [], [ClangOption], "Create unit-strided versions of loops">, NegFlag<SetFalse, [], [ClangOption], "Do not create unit-strided loops (default)">>; defm alias_analysis : BoolOptionWithoutMarshalling<"f", "alias-analysis", - PosFlag<SetTrue, [], [], "Pass alias information on to LLVM (default when optimizing for speed)">, - NegFlag<SetFalse, [], [], "Do not pass alias information on to LLVM (default for unoptimized builds)">>; + PosFlag<SetTrue, [], [], "Pass alias information on to LLVM (default when optimizing for speed). Overrides -O0.">, + NegFlag<SetFalse, [], [], "Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags.">>; } // 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 <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted) ! CHECK-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! CHECK-NEXT: -E Only run the preprocessor -! CHECK-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed) +! CHECK-NEXT: -falias-analysis Pass 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=<value> ! 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 <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted) ! HELP-NEXT: -emit-llvm Use the LLVM representation for assembler and object files ! HELP-NEXT: -E Only run the preprocessor -! HELP-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed) +! HELP-NEXT: -falias-analysis Pass 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=<value> ! 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-analysis Pass alias information on to LLVM (default when optimizing for speed) +! HELP-FC1-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed). Overrides -O0. ! HELP-FC1-NEXT: -falternative-parameter-statement ! HELP-FC1-NEXT: Enable the old style PARAMETER statement ! HELP-FC1-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation @@ -196,7 +196,7 @@ ! HELP-FC1-NEXT: -flogical-abbreviations Enable logical abbreviations ! HELP-FC1-NEXT: -flto=<value> Set LTO mode ! HELP-FC1-NEXT: -flto Enable LTO in 'full' mode -! HELP-FC1-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds) +! HELP-FC1-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags. ! HELP-FC1-NEXT: -fno-analyzed-objects-for-unparse ! HELP-FC1-NEXT: Do not use the analyzed objects when unparsing ! HELP-FC1-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits