[cfe-dev] [analyzer] Summary IPA thoughts

Aleksei Sidorin via cfe-dev cfe-dev at lists.llvm.org
Thu Oct 22 04:43:45 PDT 2015


> Is this within a translation unit? Are you planning to make this method
> usable across translation units?

You force us to disclose ;)
Yes, we have a working proof-of-concept of cross-translation-unit 
analysis (aka XTU). It is based on ASTImporter (which was fully 
implemented) and some infrastructure to collect function information. 
But that's another big story.

  // BTW, is there a nice way to write ASTImporter unit-tests?

So, our approach is applicable to XTU too since all translation units 
become one. Moreover, it is independent (well, almost independent) from 
inlining approach and IPA mode may be configured easily via 
-analyzer-config. To enable summary-based IPA, we just switch 
"-analyzer-config ipa=summary" and don't touch defaults. This should 
also make upstreaming easier in future since it doesn't influence 
default behaviour.

-- 
Best regards,
Aleksei Sidorin
Software Engineer,
IMSWL-IMCG, SRR, Samsung Electronics




More information about the cfe-dev mailing list