[flang-commits] [flang] [clang] [flang] Enable alias tags pass by default (PR #73111)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed Nov 22 13:30:33 PST 2023
================
@@ -242,10 +242,24 @@ static void parseCodeGenArgs(Fortran::frontend::CodeGenOptions &opts,
clang::driver::options::OPT_fno_loop_versioning, false))
opts.LoopVersioning = 1;
- opts.AliasAnalysis =
- args.hasFlag(clang::driver::options::OPT_falias_analysis,
- clang::driver::options::OPT_fno_alias_analysis,
- /*default=*/false);
+ bool aliasAnalysis = false;
+ bool noAliasAnalysis = false;
----------------
tblah wrote:
If `-falias-analysis` is specified then we should enable alias analysis even when it would not be enabled by the optimization level.
If `-fno-alias-analysis` is specified then we should not enable enable analysis even if it would be enabled by the optimization level.
This doesn't fit neatly into a single boolean, because we also need to support the state where both of these are false (indicating that we should follow the default behavior).
An alternative implementation would be a single boolean inside a std::option. Would that be clearer?
https://github.com/llvm/llvm-project/pull/73111
More information about the flang-commits
mailing list