[PATCH] D107971: [openmp] Annotate tmp variables with omp_thread_mem_alloc
Jon Chesterfield via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 12 09:28:42 PDT 2021
JonChesterfield added a comment.
In D107971#2941666 <https://reviews.llvm.org/D107971#2941666>, @jdoerfert wrote:
> Assuming this causes us to generate an `alloc as(5)` for `__tmp`, LG
Yes, with the running example and this patch we get the perfect:
%__tmp = alloca double, align 8, addrspace(5)
%call = call double @__ocml_sincos_f64(double %__x, double addrspace(5)* %__tmp)
Before, we get:
%__tmp = call fastcc i8* @__kmpc_alloc_shared()
%__tmp_on_stack = bitcast i8* %__tmp to double*
%__tmp_on_stack.ascast = addrspacecast double* %__tmp_on_stack to double addrspace(5)*
%call = call double @__ocml_sincos_f64(double %__x, double addrspace(5)* %__tmp_on_stack.ascast)
which interacts badly with the addrspace(5) annotation on the ocml function
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107971/new/
https://reviews.llvm.org/D107971
More information about the cfe-commits
mailing list