[Openmp-commits] [openmp] [NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (PR #66295)

Arthur Eubanks via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 14 20:03:39 PDT 2023


================
@@ -661,27 +661,27 @@ static bool FixupInvocation(CompilerInvocation &Invocation,
 
 static unsigned getOptimizationLevel(ArgList &Args, InputKind IK,
                                      DiagnosticsEngine &Diags) {
-  unsigned DefaultOpt = llvm::CodeGenOpt::None;
+  unsigned DefaultOpt = 0;
   if ((IK.getLanguage() == Language::OpenCL ||
        IK.getLanguage() == Language::OpenCLCXX) &&
       !Args.hasArg(OPT_cl_opt_disable))
-    DefaultOpt = llvm::CodeGenOpt::Default;
+    DefaultOpt = 2;
----------------
aeubanks wrote:

We do eventually map the opt level here to a `CodeGenOpt` via `CodeGenOpt::getLevel()`, but we also use the opt level here for a bunch of other things in the clang codegen process. So whatever the "default" llvm codegen pipeline opt level is shouldn't be tied to a clang frontend opt level default.

Maybe I'm not understanding your comment.

https://github.com/llvm/llvm-project/pull/66295


More information about the Openmp-commits mailing list