GVN performs PRE, but covers only the "diamond" case, i.e. it only hoists expressions to immediate predecessor blocks in order to avoid an increase in live ranges, and only does so when there is no increase in code size. <div>
<br><div>From what I know, previously there was SSAPRE in LLVM but it was removed because SSAPRE caused code bloat and the benefit of redundancy elimination didn't make up for that.<div><br></div><div>Josey: I attempted some months ago to implement an actual PRE pass using GVN that covers more general cases using path profiling and a heuristic to only eliminate redundancies when really worthy, but didn't get to finish yet. Would you be interested in knowing more about it?<br>
<br><div class="gmail_quote">On Fri, Nov 25, 2011 at 5:37 AM, Jianzhou Zhao <span dir="ltr"><<a href="mailto:jianzhou@seas.upenn.edu">jianzhou@seas.upenn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, Nov 25, 2011 at 6:41 AM, josey's...JJ frm kollam nw @<br>
calicut.... <<a href="mailto:joseykollam@gmail.com">joseykollam@gmail.com</a>> wrote:<br>
> i wish to develop llvm SSAPRE compiler optimization for my engineering<br>
> academic project .for,that i have a sample c++ program and its .ll<br>
> file.anyone have SSAPRE implementation in c++. if anyone have, please give<br>
> me that implementation immediately.<br>
<br>
</div>In the old version of LLVM, the GVN pass also does PRE. But by<br>
default, PRE is not on. We need to set -gvnpre to make it work. ''opt<br>
--help'' will list all flags for optimizations. I am not sure if the<br>
latest LLVM still has the flag.<br>
<div class="im"><br>
<br>
><br>
> <a href="mailto:joseykollam@gmail.com">joseykollam@gmail.com</a><br>
><br>
> josey @ <a href="tel:9895685353" value="+19895685353">9895685353</a><br>
> elw technologies<br>
> cochin<br>
><br>
><br>
</div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Jianzhou<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>[Carolina Simões Gomes]<br>M.Sc. Student in Computing Science<br>University of Alberta, Canada<div>CAS Partner - IBM Toronto<br>+1 (780) 863-0155<br><br>
</div><br>
</div></div></div>