<div dir="ltr"><div dir="ltr" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Ok, the command necessary to get past this is:<div><br></div><div>opt ./example.ll  -disable-basicaa -cfl-anders-aa -aa-eval -disable-output -print-alias-sets<br></div><div><br></div><div>It was non-intuitive, because I thought turning on cfl-anders-aa would also enable printing the alias sets automatically. It also helps to add this flag: <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">-mem2reg</span></div></div><div class="gmail-yj6qo gmail-ajU" style="outline:none;padding:10px 0px;width:22px;margin:2px 0px 0px;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br class="gmail-Apple-interchange-newline"></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 22, 2018 at 12:50 PM, Kenneth Adam Miller <span dir="ltr"><<a href="mailto:kennethadammiller@gmail.com" target="_blank">kennethadammiller@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 dir="ltr">Hello all,<div><br></div><div>I'm having trouble getting this analysis to print out it's graph of aliases. I am processing an example C file into llvm ir, like this:<br><br></div><div><div>int main(void) {</div><div>  int x=1, y=2, z=3;</div><div>  int *p;</div><div>  int **p1, **p2;</div><div>  if (x==z) { //0x100000f40</div><div>    p=&x;</div><div>    p1=&p;</div><div>    x*=2;</div><div>    *p1+=z;</div><div>  }</div></div><div>}</div><div><br></div><div>clang -S -emit-llvm example.c -o example.ll<br></div><div><br></div><div>Then, I am trying to run the Andersen alias analysis on it:</div><div><br></div><div>opt -analyze --cfl-anders-aa -aa example.ll<br></div><div><br></div><div>I wrote a new print function for the anders alias analysis, and the print function parameter Module *M and the Result calculated each indicate that there are no aliases. I'm certain I'm missing something, but I don't know what. To be absolutely clear, a Result is calculated of type:</div><div><br></div><div>  std::unique_ptr<<wbr>CFLAndersAAResult> Result;<br></div><div><br></div><div>And CFLAndersAAResult contains member fields:</div><div><br></div><div><div>  DenseMap<const Function *, Optional<FunctionInfo>> Cache;</div><div><br></div><div>  std::forward_list<cflaa::<wbr>FunctionHandle<<wbr>CFLAndersAAResult>> Handles;</div></div><div><br></div><div>The DenseMap Cache is empty, and so is Handles. </div><div><br></div><div>I can do -print-alias-sets, and that prints something, but I don't think it's the result of the Andersen analysis. Because when I do commands with <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">--cfl-anders-aa taken out, I still get the same alias sets.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Can anybody help me get the Andersen alias results?</span></div></div>
</blockquote></div><br></div>