<div dir="ltr">Hi Will,<div><br></div><div>Are you actively maintaining the version of DSA found in poolalloc? In a response to a question I posted earlier today, Reid Kleckner wondered if poolalloc (and by extension, DSA?) is unmaintained.</div><div><br></div><div>- Christian</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 28, 2015 at 4:59 PM, Will Dietz <span dir="ltr"><<a href="mailto:willdtz@gmail.com" target="_blank">willdtz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm working on this issue, thank you for reporting it.<br>
<br>
The short answer is that the callgraph reported by TD is the same as<br>
discovered/computed during BU<br>
(and BU can't determine the indirect call can only target C2).<br>
<br>
I've added this example, and a few other related tests, to the DSA's<br>
test suite[1] to document<br>
this behavior while I'm working out what the best solution is.<br>
<br>
I'll try to post back here when it's resolved one way or the other,<br>
but feel free to bug me if you don't hear back in a few days :).<br>
<br>
~Will<br>
<br>
[1] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_llvm-2Dmirror_poolalloc_commit_32b43cd23e3d18f7080f9c966d9b4b3b3fb6962d&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=4Y9A_k4lSplSnw735BbZGOuO-2MXIHnICEprgjlb81Q&s=gKYkKbC9BG7uKlLw8um5emmxXVt1LNifqavjyQgT5sc&e=" target="_blank">https://github.com/llvm-mirror/poolalloc/commit/32b43cd23e3d18f7080f9c966d9b4b3b3fb6962d</a><br>
<div><div class="h5"><br>
On Sun, May 24, 2015 at 4:31 AM, Maxim Olifer <<a href="mailto:olifer.maxim@gmail.com">olifer.maxim@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I am trying to extract a callgraph using DSA, but the analysis looks quite<br>
> pessimistic. I use TDD analysis and here is my test code:<br>
><br>
> #include <stdlib.h><br>
><br>
> typedef void (*tX)(int a, int b);<br>
> typedef void (*tY)(int a);<br>
><br>
> typedef struct {<br>
> tX p ;<br>
> int n;<br>
> } msg;<br>
><br>
> static void A1(int a) { }<br>
> static void B2(int a, int b) { }<br>
> static void C2(int a, int b) { }<br>
><br>
><br>
> tY q;<br>
><br>
> static void decode(tX decoder_f){<br>
> decoder_f(1,2);<br>
> }<br>
><br>
> int main(void) {<br>
> msg *a = malloc(sizeof(msg));<br>
> q = &A1;<br>
> a->p = &B2;<br>
> decode(&C2);<br>
><br>
> return 0;<br>
> }<br>
><br>
> The result that I get is:<br>
><br>
> main: [malloc decode ]<br>
> A1: []<br>
> B2: []<br>
> C2: []<br>
> decode: [A1 B2 C2 ]<br>
><br>
> Why does "decode" function have two extra callees (A1 and B2)? Is it<br>
> possible to filter them out?<br>
><br>
> Kind Regards,<br>
> Maxim<br>
><br>
><br>
</div></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>
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>
</blockquote></div><br></div>