[Mesa-dev] [Bug 107369] "volatile" in OpenCL code not recognized when compiling with -fstack-protector

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jul 27 14:59:40 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=107369

--- Comment #11 from Jan Vesely <jan.vesely at rutgers.edu> ---
GPUs don't really have a stack (not for data anyway) and AMDGCN backend
currently inlines all function calls anyway.
I'm not sure what kind of checks the flag adds.
If anyone can upload the different libclc bitcode it should be easy to spot.
My guess would be that it adds some initialized global variables used in
internal checks. This is illegal in CLC. only variables in constant address
space can have initializers.

IMO Debian should not be arbitrarily adding compilation flags unless they know
what they're doing and they have tested the resulting package.

local variables are stored in private address space which is backed either by
register file, or private buffers.
using volatile, to control where it is located, is a rather hacky workaround of
suboptimal register allocation/instruction scheduling.
Reporting a llvm bug with a reproducer can help. it'd need to be reproducible
using llvm-7, there are no further releases of llvm-5 or 6 planned.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180727/0c0119db/attachment-0001.html>


More information about the mesa-dev mailing list