<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<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::FunctionHandle<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>