[llvm-dev] Intended behavior of CGSCC pass manager.

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 19 00:01:51 PDT 2016


Hi David,

Xinliang David Li wrote:
 >>  I believe it is primarily used for ordering the visitation of CallSCC's (i.e. SCC's in the "call graph").
 > This is what it can do -- but what benefit does it provide?

One benefit is that once you get to a function F that constructs an
instance of a class with virtual functions and then calls a virtual
function on the instance, then the virtual function being called and
the constructor will have been maximally simplified (F refs the
constructor, and the constructor refs all the virtual functions), and
you're more likely to inline the constructor and devirtualize the
call.  I don't have any real data to back up that this will materially
help, though.

-- Sanjoy


More information about the llvm-dev mailing list