<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 23, 2015 at 5:35 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">DSA was built when LLVM's optimizations maintained the type
information on GEP and other instructions (DSA existed before LLVM
was open-source). As such, it uses LLVM's type information to aid
in its type-inference which, in turn, gives it field sensitivity
which, in turn, improves its accuracy. Over time, LLVM
optimizations have come to modify the type information so that it is
just simple byte-level indexing (as opposed to array-of-structure
indexing). DSA hasn't been updated to handle that well. That is
why its precision is better pre-optimization than post-optimization.<br></div></blockquote><div><br></div><div>Ah! I don't suppose you could point to some examples of this? E.g. a simple test program such that one could eyeball the intermediate code before and after optimization? <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
<br>
Just out of curiosity, what are you trying to do? I need call graph
analysis for C/C++ code with function pointers, and so I'm writing
an NSF proposal to seek funding to do that (among other enhancements
to my SVA infrastructure). If it's something that would be useful
to you (or other LLVM community members), it would be useful for me
to know that.<br></div></blockquote></div><br></div><div class="gmail_extra">SVA?<br><br>I'm trying to write a superoptimizer that can optimize code based on a high-level understanding of what it's actually doing, so yes, call graph analysis that can deal with function pointers does seem likely to be one of the things that will be needed.<br></div></div>