Skip to content

Commit d65bd28

Browse files
committed
[flang] Update -falias-analysis help text
As requested by @branach-space on llvm#73111. This makes it clearer that -f[no-]alias-analysis will always override -O flags, no matter their ordering.
1 parent c449460 commit d65bd28

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6334,8 +6334,8 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri
63346334
PosFlag<SetTrue, [], [ClangOption], "Create unit-strided versions of loops">,
63356335
NegFlag<SetFalse, [], [ClangOption], "Do not create unit-strided loops (default)">>;
63366336
defm alias_analysis : BoolOptionWithoutMarshalling<"f", "alias-analysis",
6337-
PosFlag<SetTrue, [], [], "Pass alias information on to LLVM (default when optimizing for speed)">,
6338-
NegFlag<SetFalse, [], [], "Do not pass alias information on to LLVM (default for unoptimized builds)">>;
6337+
PosFlag<SetTrue, [], [], "Pass alias information on to LLVM (default when optimizing for speed). Overrides -O0.">,
6338+
NegFlag<SetFalse, [], [], "Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags.">>;
63396339
} // let Visibility = [FC1Option, FlangOption]
63406340

63416341
def J : JoinedOrSeparate<["-"], "J">,

flang/test/Driver/driver-help-hidden.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
! CHECK-NEXT: -D <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted)
2727
! CHECK-NEXT: -emit-llvm Use the LLVM representation for assembler and object files
2828
! CHECK-NEXT: -E Only run the preprocessor
29-
! CHECK-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed)
29+
! CHECK-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed). Overrides -O0.
3030
! CHECK-NEXT: -falternative-parameter-statement
3131
! CHECK-NEXT: Enable the old style PARAMETER statement
3232
! CHECK-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation
@@ -63,7 +63,7 @@
6363
! CHECK-NEXT: -flto Enable LTO in 'full' mode
6464
! CHECK-NEXT: -fms-runtime-lib=<value>
6565
! CHECK-NEXT: Select Windows run-time library
66-
! CHECK-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds)
66+
! CHECK-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags.
6767
! CHECK-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE
6868
! CHECK-NEXT: -fno-color-diagnostics Disable colors in diagnostics
6969
! CHECK-NEXT: -fno-integrated-as Disable the integrated assembler

flang/test/Driver/driver-help.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
! HELP-NEXT: -D <macro>=<value> Define <macro> to <value> (or 1 if <value> omitted)
2323
! HELP-NEXT: -emit-llvm Use the LLVM representation for assembler and object files
2424
! HELP-NEXT: -E Only run the preprocessor
25-
! HELP-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed)
25+
! HELP-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed). Overrides -O0.
2626
! HELP-NEXT: -falternative-parameter-statement
2727
! HELP-NEXT: Enable the old style PARAMETER statement
2828
! HELP-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation
@@ -53,7 +53,7 @@
5353
! HELP-NEXT: -flto Enable LTO in 'full' mode
5454
! HELP-NEXT: -fms-runtime-lib=<value>
5555
! HELP-NEXT: Select Windows run-time library
56-
! HELP-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds)
56+
! HELP-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags.
5757
! HELP-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE
5858
! HELP-NEXT: -fno-color-diagnostics Disable colors in diagnostics
5959
! HELP-NEXT: -fno-integrated-as Disable the integrated assembler
@@ -149,7 +149,7 @@
149149
! HELP-FC1-NEXT: -emit-llvm Use the LLVM representation for assembler and object files
150150
! HELP-FC1-NEXT: -emit-obj Emit native object files
151151
! HELP-FC1-NEXT: -E Only run the preprocessor
152-
! HELP-FC1-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed)
152+
! HELP-FC1-NEXT: -falias-analysis Pass alias information on to LLVM (default when optimizing for speed). Overrides -O0.
153153
! HELP-FC1-NEXT: -falternative-parameter-statement
154154
! HELP-FC1-NEXT: Enable the old style PARAMETER statement
155155
! HELP-FC1-NEXT: -fapprox-func Allow certain math function calls to be replaced with an approximately equivalent calculation
@@ -196,7 +196,7 @@
196196
! HELP-FC1-NEXT: -flogical-abbreviations Enable logical abbreviations
197197
! HELP-FC1-NEXT: -flto=<value> Set LTO mode
198198
! HELP-FC1-NEXT: -flto Enable LTO in 'full' mode
199-
! HELP-FC1-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds)
199+
! HELP-FC1-NEXT: -fno-alias-analysis Do not pass alias information on to LLVM (default for unoptimized builds). Overrides -O flags.
200200
! HELP-FC1-NEXT: -fno-analyzed-objects-for-unparse
201201
! HELP-FC1-NEXT: Do not use the analyzed objects when unparsing
202202
! HELP-FC1-NEXT: -fno-automatic Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE

0 commit comments

Comments
 (0)