================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to