[Openmp-commits] [openmp] 5524952 - [OpenMP][JIT][FIX] Create the default O0 pipeline for -O0

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 3 17:10:24 PST 2023


Author: Johannes Doerfert
Date: 2023-01-03T17:07:52-08:00
New Revision: 5524952c14b9e0507e3db12f961cde37581a502b

URL: https://github.com/llvm/llvm-project/commit/5524952c14b9e0507e3db12f961cde37581a502b
DIFF: https://github.com/llvm/llvm-project/commit/5524952c14b9e0507e3db12f961cde37581a502b.diff

LOG: [OpenMP][JIT][FIX] Create the default O0 pipeline for -O0

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
index 893f4b17f392..ffd443a4b489 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
@@ -238,7 +238,10 @@ void JITEngine::opt(TargetMachine *TM, TargetLibraryInfoImpl *TLII, Module &M,
   PB.registerLoopAnalyses(LAM);
   PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
 
-  MPM.addPass(PB.buildPerModuleDefaultPipeline(getOptLevel(OptLevel)));
+  if (OptLevel)
+    MPM.addPass(PB.buildPerModuleDefaultPipeline(getOptLevel(OptLevel)));
+  else
+    MPM.addPass(PB.buildO0DefaultPipeline(getOptLevel(OptLevel)));
 
   MPM.run(M, MAM);
 }


        


More information about the Openmp-commits mailing list