aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVikash Gupta <Vikash.Gupta@amd.com>2024-07-26 15:24:06 +0530
committerGitHub <noreply@github.com>2024-07-26 15:24:06 +0530
commitd65f0375910f6dfeaa94c1060e7d81fb7bdf76be (patch)
tree59bd041159bf50cb2bc8e7efb967441d91eab3dd /flang/lib/Frontend/CompilerInvocation.cpp
parent35dfe8013c2e100ffa159ca183430422a370d3a4 (diff)
downloadllvm-d65f0375910f6dfeaa94c1060e7d81fb7bdf76be.zip
llvm-d65f0375910f6dfeaa94c1060e7d81fb7bdf76be.tar.gz
llvm-d65f0375910f6dfeaa94c1060e7d81fb7bdf76be.tar.bz2
[Clang] Use private address space for builtin_alloca return type for OpenCL (#95750)
The __builtin_alloca was returning a flat pointer with no address space when compiled using openCL1.2 or below but worked fine with openCL2.0 and above. This accounts to the fact that later uses the concept of generic address space which supports cast to other address space(i.e to private address space which is used for stack allocation) . But, in actuality, as it returns pointer to the stack, it should be pointing to private address space irrespective of openCL version becuase builtin_alloca allocates stack memory used for current function in which it is called. Thus,it requires redefintion of the builtin function with appropraite return pointer to private address space.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions