[Openmp-commits] [PATCH] D101977: [OpenMP] Create custom state machines for generic target regions

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jul 29 18:08:04 PDT 2021


JonChesterfield added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/OpenMPOpt.cpp:2747
+           "Kernel without __kmpc_target_init or __kmpc_target_deinit!");
+
+    // For kernels we need to register a simplification callback so that the Attributor
----------------
I'm seeing this assert fire. The kernel contains both the init and deinit calls, but the InitRFI/DeinitRFI for each use doesn't see any uses, so StoreCallBase isn't called, and nothing is assumed to Storage. Kernel otherwise looks uninteresting, run into while trying to track down another bug.

For my reference, issue_001.c from aomp, debug clang build at trunk today, invoked as:

`clang  -O2 -fopenmp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target=amdgcn-amd-amdhsa -march=gfx906  issue_001.c -o issue_001 `
gets bitcode corruption, invalid record

If passed `-openmp-opt-disable=true`, no corruption seen. If that is used to extract amdgpu bitcode which is fed back into opt, this assert trips.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101977



More information about the Openmp-commits mailing list