<div dir="ltr">Hi John,<div>Thank you for your reply!</div><div><br></div><div>1) For the DSA points-to analysis, I have tried the DSA code from project smack (<a href="https://github.com/smackers/smack">https://github.com/smackers/smack</a>). </div><div>It is surprising that DSA is less precise than basicaa when running on bzip2.</div><div><br></div><div>Which version of DSA will you recommend If I would like to use DSA on llvm 3.5? If no such version, which one will be a good start to do further improvement?</div><div><br></div><div><br></div><div>2) For other alias analyses, sorry for not attaching the bc file.</div><div>--------------------------------------------</div><div>Source code 'SimpleGEP.c'</div><div>--------------------------------------------<br></div><div><div>typedef struct {</div><div>        int *x;</div><div>        int y[20];</div><div>} Foo;</div><div><br></div><div>int main() {</div><div>        Foo foo;</div><div>        int index = 10;</div><div>        foo.x = &index;</div><div>        foo.y[2] = 10;</div><div>        return 0;</div><div>}</div></div><div><br></div><div>--------------------------------------------</div><div>Compile command</div><div>--------------------------------------------<br></div><div> clang -emit-llvm -c SimpleGEP.c -o SimpleGEP.bc<br></div><div>--------------------------------------------</div><div>The IR code 'SimpleGEP.bc'</div><div>--------------------------------------------<br></div><div><div>; ModuleID = 'SimpleGEP.bc'</div><div>target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"</div><div>target triple = "x86_64-unknown-linux-gnu"</div><div><br></div><div>%struct.Foo = type { i32*, [20 x i32] }</div><div><br></div><div>; Function Attrs: nounwind uwtable</div><div>define i32 @main() #0 {</div><div>entry:</div><div>  %retval = alloca i32, align 4</div><div>  %foo = alloca %struct.Foo, align 8</div><div>  %index = alloca i32, align 4</div><div>  store i32 0, i32* %retval</div><div>  store i32 10, i32* %index, align 4</div><div>  %x = getelementptr inbounds %struct.Foo* %foo, i32 0, i32 0</div><div>  store i32* %index, i32** %x, align 8</div><div>  %y = getelementptr inbounds %struct.Foo* %foo, i32 0, i32 1</div><div>  %arrayidx = getelementptr inbounds [20 x i32]* %y, i32 0, i64 2</div><div>  store i32 10, i32* %arrayidx, align 4</div><div>  ret i32 0</div><div>}</div><div><br></div><div>attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }</div><div><br></div><div>!llvm.ident = !{!0}</div><div><br></div><div>!0 = metadata !{metadata !"clang version 3.5.0 (tags/RELEASE_350/final)"}</div></div><div><br></div><div>Thank you!</div><div><br></div><div>Regards,</div><div>Zhiyuan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 9, 2015 at 11:45 PM, John Criswell <span dir="ltr"><<a href="mailto:jtcriswel@gmail.com" target="_blank">jtcriswel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <div>On 4/9/15 11:13 PM, Wan Zhiyuan wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi Xin,
        <div>Thank you for your reply!</div>
      </div>
    </blockquote>
    <br></span>
    There is the DSA points-to analysis in the poolalloc project.  It
    works with an older version of LLVM and will be more difficult to
    use, but it's a unification-based analysis.  Just be forewarned that
    it's not as accurate as it was when originally written (due to
    reduced field sensitivity due to changes to LLVM over time; it's a
    long story explained during another recent thread).<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I have tried the 3 alias analyses you have mentioned on
          LLVM 3.5:</div>
        <div>1) $ opt -globalsmodref-aa -aa-eval < xxx.bc >
          /dev/null </div>
        <div>(May-alias response 100%)<br>
        </div>
        <div>2) $ opt -tbaa -aa-eval < xxx.bc > /dev/null </div>
        <div>(May-alias response 100%)</div>
        <div>3) $ opt -cfl-aa -aa-eval < xxx.bc> /dev/null</div>
        <div> (Unknown command line argument '-cfl-aa')<br>
        </div>
        <div><br>
        </div>
        <div>It seems that they are not working properly. Could you
          please give some advice?</div>
      </div>
    </blockquote>
    <br></span>
    That doesn't look right at all, but I'm not sure what's causing the
    issue.  That said, since we don't know how xxx.bc was created (or
    what it contains), it'll be hard for anyone to pinpoint the problem.<br>
    <br>
    Regards,<br>
    <br>
    John Criswell<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>And I was wondering if these alias analyses can produce
          alias results as precise as andersen or steensgaard.</div>
        <div><br>
        </div>
        <div>Thank you!<br>
        </div>
        <div>Zhiyuan</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Apr 9, 2015 at 10:19 PM, Xin
          Tong <span dir="ltr"><<a href="mailto:trent.tong@gmail.com" target="_blank">trent.tong@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote">Hi Zhiyuan<br>
            <br>
            LLVM has globalsmodref-aa for global variables, TBAA - type
            based<br>
            alias analysis and CFL-AA.<br>
            <br>
            Xin<br>
            <div>
              <div><br>
                On Tue, Apr 7, 2015 at 9:32 PM, Wan Zhiyuan <<a href="mailto:wanzhiyuan@gmail.com" target="_blank">wanzhiyuan@gmail.com</a>>
                wrote:<br>
                > Dear all,<br>
                > I was wondering if there are some reliable alias
                analyses build on top of<br>
                > LLVM other than basicaa.<br>
                ><br>
                > Thank you!<br>
                ><br>
                > Zhiyuan<br>
                ><br>
              </div>
            </div>
            > _______________________________________________<br>
            > LLVM Developers mailing list<br>
            > <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">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>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br>
    <br>
    </span><span class="HOEnZb"><font color="#888888"><pre cols="72">-- 
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a href="http://www.cs.rochester.edu/u/criswell" target="_blank">http://www.cs.rochester.edu/u/criswell</a></pre>
  </font></span></div>

</blockquote></div><br></div>