[PATCH] D81036: [OpenMP] Begin Adding Analysis Remarks for OpenMP Best Practises.

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 20:28:08 PDT 2020


jhuber6 marked an inline comment as done.
jhuber6 added inline comments.


================
Comment at: llvm/test/Transforms/OpenMP/shared_firstprivate_analysis.ll:13
+
+; CHECK: remark: shared_firstprivate_analysis.c:7:5: Use of OpenMP shared clause with a value that should be pass-by-value. Consider using the firstprivate caluse instead
+define dso_local void @shared(i32 %0) local_unnamed_addr #0 !dbg !14 {
----------------
jdoerfert wrote:
> We need to reference the value somehow. Where does this point to now, I mean what is in line 7? Could we include the C source in a comment at the top? We probably want to issue 2 remarks, one for the value, with the value debug info, and one for the directive.
I can go ahead and add the source. To print out the value it refers to I'd probably need to the get the value from the `__kmpc_fork_call` since the remark is generated from looking at the arguments to the `.omp_outlined` function which doesn't know anything about the actual value. Is it safe to assume that the arguments are in the same order here? Like the third argument to `.omp_outlined` is always the first vararg passed to the callback?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81036





More information about the llvm-commits mailing list