[PATCH] D113538: OpenMP: Start calling setTargetAttributes for generated kernels
    Jon Chesterfield via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Nov 18 07:42:08 PST 2021
    
    
  
JonChesterfield added inline comments.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:9288
+
+  const bool IsOpenMP = M.getLangOpts().OpenMP && !FD;
+  if ((IsOpenCLKernel || IsHIPKernel || IsOpenMP) &&
----------------
JonChesterfield wrote:
> JonChesterfield wrote:
> > Here, we do the amdgpu-implicitarg-num-bytes and uniform-work-group-size assignments regardless of whether FD is true or not
> Cancel that, there's a IsOpenMP = ...&& !FD here. Failed to follow the control flow.
Are we looking for `if (AMDGPU::isKernel(function.getCallingConv())` instead of looking at the function attributes? I don't think we want to annotate non-kernels with these things
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113538/new/
https://reviews.llvm.org/D113538
    
    
More information about the cfe-commits
mailing list