[cfe-dev] Tree transformation in clang
eyasu
eya.get at gmail.com
Wed Nov 30 20:50:38 PST 2011
Chandler Carruth <chandlerc at ...> writes:
>
> On Tue, Nov 29, 2011 at 7:20 PM, eyasu getahun
<eya.get at gmail.com> wrote:
> I have seen tree transformation in
> clang(TreeTransform.h). This is to transform one AST to another AST.
>
> Not quite. It provides a basis for building such a transformation, not an
actual transformation.
>
> But
> it is not clear for me how they used this header file for the
> transformation. I didn't see the function for the transformation. Just
> they used this header file for semantic template instantiation and
> template deduction.
>
> I'm not sure who "they" is, but the only real user I know of for this header
is the template instantiation logic. It does instantiation through a very
specific tree transformation implemented using the facilities of TreeTransform.h.
>
> Even there is no explicit command line option for the transformation. Do you
guys think that the transformation is well implemented and documented?
>
> No, as I said, there is no single transformation. You are looking at a small,
internal library used deep in Clang's implementation. What problem are you
actually trying to solve? I suspect the solution will not involve this header
file, but I can know (and it is unlikely anyone on this list can help you) if
you don't say what it is you're trying to do...
First, thanks a lot for the reply. What I am trying to do is transforming one
AST to another AST, later implementing optimizations at AST level. To do this, I
want to know the existing AST transformation in clang. I thought that there is
tree to tree transformation in general, not single transformation. I need just a
pointer about the existing transformation, if any. Thanks again.
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at ...
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
More information about the cfe-dev
mailing list