[PATCH] D63832: Analysis Pass for Target Data Mapping for OpenMP 5.0

Prithayan Barua via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 11:31:14 PDT 2019


prithayan created this revision.
prithayan added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, guansong, hiraditya, mgorny.
Herald added a project: LLVM.

An Analysis pass, that prints the host/device memory copies introduced due to the target offloading clauses used by the programmer.
It follows the Omp Spec 5.0
This is a global/module level pass, that does interprocedural analysis to interpret the semantics of all the target offloading clauses.
First we analyze every function, and parse the arguments being passed to the Omp RTL calls, and extract the variables mapped, the map type and the array section.
Then we perform a global analysis to do a BFS traversal of every function basic block, and maintain the reference count, and interpret when the variable is copied from host to device and viceversa.

Checked in two lit test cases from the DRACC benchmark.
Use the following pass to test this analysis pass.
opt -S -passes='print-omp-diagnostics'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63832

Files:
  llvm/include/llvm/Analysis/OmpDiagnosticsAnalysis.h
  llvm/include/llvm/InitializePasses.h
  llvm/lib/Analysis/CMakeLists.txt
  llvm/lib/Analysis/OmpDiagnosticsAnalysis.cpp
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/test/Analysis/OmpDiagnosticsAnalysis/DRACC_OMP_022_MxV_Missing_Data_yes.ll
  llvm/test/Analysis/OmpDiagnosticsAnalysis/DRACC_OMP_023_MxV_Partially_Missing_Data_yes.ll
  llvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63832.206716.patch
Type: text/x-patch
Size: 175462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190626/bb18da69/attachment-0001.bin>


More information about the llvm-commits mailing list