[PATCH] D16038: [LCG] Build an edge abstraction for the LazyCallGraph and use it to differentiate between indirect references to functions an direct calls.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 9 16:36:37 PST 2016


chandlerc created this revision.
chandlerc added a subscriber: llvm-commits.
Herald added a subscriber: sanjoy.

This doesn't do a whole lot yet other than change the print out produced
by the analysis, but it lays the groundwork for a very major change I'm
working on next: teaching the call graph to actually be a call graph,
modeling *both* the indirect reference graph and the call graph
simultaneously. More details on that in the next patch though.

Here, the biggest qustion I have for reviewers is whether they like the
core interface used by the edge abstraction. Notably, the Edge::Kind
enums end up used broadly in the API of the entire call graph. Better
names or structure for these abstractions would be very interesting.

The rest of this is essentially a bunch of over-engineering that won't be
interesting until the next patch. But this also isolates essentially all of the
churn necessary to introduce the edge abstraction from the very important
behavior change necessary in order to separately model the two graphs. So it
should make review of the subsequent patch a bit easier at the cost of making
this patch seem poorly motivated. ;]

That said, if folks would rather me merge this into the big patch that
makes having this abstraction necessary, I'm happy to do that.

http://reviews.llvm.org/D16038

Files:
  include/llvm/Analysis/LazyCallGraph.h
  lib/Analysis/LazyCallGraph.cpp
  test/Analysis/LazyCallGraph/basic.ll
  test/Analysis/LazyCallGraph/non-leaf-intrinsics.ll
  unittests/Analysis/LazyCallGraphTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16038.44416.patch
Type: text/x-patch
Size: 46296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160110/a3089136/attachment.bin>


More information about the llvm-commits mailing list