[Openmp-commits] [PATCH] D83271: [OpenMP] Replace function pointer uses in GPU state machine

Matt Arsenault via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 6 18:29:29 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:930-931
+    Optional<Kernel> &CachedKernel = UniqueKernelMap[&F];
+    if (CachedKernel.hasValue())
+      return CachedKernel.getValue();
+
----------------
if (CachedKernel) return *CachedKernel


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:938
+      CachedKernel = Kernel(&F);
+      return CachedKernel.getValue();
+    }
----------------
*CachedValue


================
Comment at: llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll:40
+
+define internal void @__omp_offloading_35_a1e179_foo_l7_worker() {
+entry:
----------------
These tests seem really big


================
Comment at: llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll:278-280
+!llvm.module.flags = !{!0, !1, !2, !3}
+!omp_offload.info = !{!4}
+!nvvm.annotations = !{!5, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8, !6, !7, !6, !8, !8, !8, !8, !9, !9, !8}
----------------
Mostly unneeded metadata?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83271





More information about the Openmp-commits mailing list