[PATCH] D113538: OpenMP: Start calling setTargetAttributes for generated kernels
Matt Arsenault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 18 07:52:04 PST 2021
arsenm 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:
> > 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
!FD seems to always be true for openmp kernels because there's no associated function. This isn't looking at the IR function calling convention but I thought about switching to check that instead, but that's a separate change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113538/new/
https://reviews.llvm.org/D113538
More information about the cfe-commits
mailing list