[cfe-dev] Question about stripping address-space qualifier with C++

mats petersson mats at planetcatfish.com
Tue Jan 13 07:24:22 PST 2015


What is the overall problem you are trying to solve? In general,
adress space casts either generate no code (no problem) or will modify
the behaviour of the code (necessary for correct operation). I don't
see much point in fixing the former, and breaking things by "fixing"
the latter doesn't seem like a brilliant idea either...

Can you give an example of C++ code that uses address space casts, and
that you want to remove them in?

(Caveat, I work on OpenCL, and we do use address space casts quite a bit)

--
Mats

On 13 January 2015 at 11:48, JinGu Kang <jingu at codeplay.com> wrote:
> Hi all,
>
> I am looking for some ways to strip address-space qualifiers with C++ from
> clang. I think we can use the 'addrspacecast' instruction to do it in IR
> level. Before doing it in an IR pass, I would like to try to do it with
> clang. But I can not find some ways to strip it with C++ source code from
> clang or generate 'addrspacecast' instructions with C++ from clang. Is there
> some C++ syntax to do it such as reinterpret_cast? If you have some ideas,
> please let me know.
>
> Thanks,
> JinGu Kang
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list