1

I have a function which I believe is called multiple times in the same code path - like c() in the example given here. Is there any way to statically find what code paths call c(), and to see if any of those paths lead to redundant calls?

Thanks!

Community
  • 1
  • 1
user693861
  • 339
  • 3
  • 15
  • I don't see how static analysis could solve this except for very simple cases. – Peter G. May 21 '14 at 18:11
  • 1
    That first line seems like an open invitation to get your question closed as a dupe. Rather than pointing to some other question, you should clearly state what you're asking. – Caleb May 21 '14 at 18:11
  • @Caleb - I thought that graphic in the linked question was the best explanation for my problem, but you're right I should have provided more here. Edited. – user693861 May 21 '14 at 18:33
  • @PeterG. - Well, with ncc and CodeViz I can generate some nice function call graphs. For simple cases it's easy to visually inspect the graph and find redundancies, but I figured it might be possible for a tool to do that automatically, and perhaps for cases that are a bit too complicated for manual inspection. But maybe not, I don't know. – user693861 May 21 '14 at 18:37

0 Answers0