[PATCH] D141307: Add -f[no-]loop-versioning option

Tom Eccles via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 6 10:06:54 PST 2023


tblah added a comment.

Please could you add tests for the flag forwarding logic in flang/tests/Driver/frontend-forwarding.f90. For example see https://reviews.llvm.org/rGd0d4b635786d510cd919cadbeb7e5e19983242cf



================
Comment at: clang/lib/Driver/ToolChains/Flang.cpp:69
+  Arg *loopVersioning =
+      Args.getLastArg(options::OPT_Ofast, options::OPT_floop_versioning,
+                      options::OPT_fno_loop_versioning);
----------------
Does GFortran only enable this with -Ofast? I would have thought this would be an -On thing because it doesn't impact precision.


================
Comment at: flang/include/flang/Frontend/CodeGenOptions.def:27
 
+CODEGENOPT(LoopVersioning, 1, 0) ///< PIC level of the LLVM module.
 CODEGENOPT(PICLevel, 2, 0) ///< PIC level of the LLVM module.
----------------
nit: comment


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141307/new/

https://reviews.llvm.org/D141307



More information about the cfe-commits mailing list