[cfe-dev] Mutable AST -- Advice Needed --
Richard Smith
richard at metafoo.co.uk
Tue May 28 11:08:17 PDT 2013
On Tue, May 28, 2013 at 10:57 AM, steveneliuk <s.eliuk at samsung.com> wrote:
> Hello,
>
> The WebCL Working Group (WG) is requesting input from experienced
> Clang/LLVM
> developers and contributors concerning AST mutation.
>
> A little background,
>
> WebCL exposes parallel processing to the web. Specifically, WebCL allows
> web
> applications to utilize GPU\s and multi-core CPU\s directly from the
> web-browser. This is about the least verbose description I could produce,
> more information can be found through the following link
> <http://www.khronos.org/webcl/> .
> http://www.khronos.org/webcl/
>
> There is a tight relationship between WebCL and OpenCL because WebCL
> employs
> /orchestrated/ OpenCL-kernels to enable parallel processing on parallel
> devices. The /orchestrated/ kernels provide a level of security/projection
> that is not inherent/needed in OpenCL.
>
>
> Typically, a web-developer produces a kernel and WebCL uses a Validator to
> /orchestrate/ the kernel. The validator performs various checks such as
> memory initialization, validity of pointers, static/dynamic analysis, etc
> and outputs the new kernel that is web-safe.
>
> One of the proposed directions of development is based on Clang, and going
> against the grain, with a mutable AST. We understand the AST in Clang is
> fundamentally treated as immutable and we respect this design choice. The
> goal of the WebCL Validator does not rely on a later stage coupling with
> LLVM or later stages of compilation where the modified AST could become
> unstable/problematic.
>
> Given the above information, could those with experience and expertise
> please provide feedback on the proposed implementation? We are curious the
> pitfalls of modifying the AST. Eventually, if the code is stable and meets
> the requirements of Clang we would like to upstream/contribute the code,
> but
> this would be in the distant future.
>
> There is a bug open concerning the WebCL Validator development effort that
> can be accessed through the following link
> <https://www.khronos.org/bugzilla/show_bug.cgi?id=875> ,
> https://www.khronos.org/bugzilla/show_bug.cgi?id=875
>
> Thank you on behalf of the WebCL WG for considering our request,
It's unclear to me from the above description what you actually want to do
with Clang.
Are you actually trying to perform source-to-source translation or
validation or something else?
If it's source-to-source translation, is the output intended to be
human-maintainable or only as the input to other tools?
If it's a validator, why do you want a mutable AST?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130528/2dd7f6c4/attachment.html>
More information about the cfe-dev
mailing list