[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Clang AST
From:       caiwei <cworce () 126 ! com>
Date:       2008-04-30 3:43:23
Message-ID: 17914420.661581209527003854.JavaMail.coremail () bj126app12 ! 126 ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


 
 
 
 

在2008-04-29,"Chris Lattner" <clattner@apple.com> 写道:

On Apr 28, 2008, at 10:39 PM, caiwei wrote:
> Hi all,
> I am new to the list and have been lurking a few days. I am interested
> in clang mainly as a possible tool for optimization.If there are any  
> suggestions
> for small tasks (TODOs) that may give me  a good introduction to
> developing for clang, that would be nice.how can I modify the AST  
> for my project?
> 
> for example,After changing the AST code of Clang, the clang compiler  
> optimize  x *2 to x << 2.
> and how to use of the clang AST interface ?

> What sort of optimization are you trying to do?  Are you working with  
> native code generation, or trying to do a source to source optimizer?

> If you are focused on native code generation, it is much better to  
> implement optimizations in the llvm optimizer and/or backend.  If you  
> are interested in source to source transformations (e.g. outputting a  
> modified C file), you can use the AST interfaces and rewriter to do  
> this.  Take a look at the ObjC Rewriter for examples.  If you have a  
> specific question, I'd be happy to try to help.

> -Chris
Thanks Chris,
I need to do AST transformations about inerting nodes and setting existing ones,thus \
getting optimum code(source to modified source code). cai
?
?


[Attachment #5 (text/html)]

<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV></DIV><BR>在2008-04-29,"Chris Lattner" &lt;clattner@apple.com&gt; 写道:<BR>
<BLOCKQUOTE id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; \
BORDER-LEFT: #ccc 1px solid"><PRE>On Apr 28, 2008, at 10:39 PM, caiwei wrote: &gt; Hi \
all, &gt; I am new to the list and have been lurking a few days. I am interested
&gt; in clang mainly as a possible tool for optimization.If there are any  
&gt; suggestions
&gt; for small tasks (TODOs) that may give me  a good introduction to
&gt; developing for clang, that would be nice.how can I modify the AST  
&gt; for my project?
&gt;
&gt; for example,After changing the AST code of Clang, the clang compiler  
&gt; optimize  x *2 to x &lt;&lt; 2.
&gt; and how to use of the clang AST interface ?

&gt;What sort of optimization are you trying to do?  Are you working with  
&gt;native code generation, or trying to do a source to source optimizer?

&gt;If you are focused on native code generation, it is much better to  
&gt;implement optimizations in the llvm optimizer and/or backend.  If you  
&gt;are interested in source to source transformations (e.g. outputting a  
&gt;modified C file), you can use the AST interfaces and rewriter to do  
&gt;this.  Take a look at the ObjC Rewriter for examples.  If you have a  
&gt;specific question, I'd be happy to try to help.

&gt;-Chris</PRE><PRE>Thanks Chris,</PRE><PRE>I need to do AST transformations about \
inerting nodes and setting existing ones,thus getting optimum code(source to modified \
source code).</PRE><PRE>cai<EM> \
</EM></PRE><PRE>&nbsp;</PRE><PRE>&nbsp;</PRE></BLOCKQUOTE><br><!-- footer --><br>  \
<hr> <font style="font-size:12px;line-height:15px;">送!送!送!</font><a \
style="font-size:12px;line-height:15px; color:blue; text-decoration:underline;" \
href="http://popme.163.com/link/004290_0422_5595.html">瑞星2008正版半年免费!</a>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic