[cfe-dev] Get count of inlined functions from clang rung

Troy Johnson via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 27 13:47:44 PDT 2018


I'm not aware of a more direct way to do it, but you could count messages:

> cat inline.c
int x;
void tiny() { ++x; }
void f() { tiny(); tiny(); tiny(); }
> clang -Ofast -Rpass=inline inline.c 2>&1 | grep "inlined into" | wc -l
3

-Troy

> -----Original Message-----
> From: cfe-dev <cfe-dev-bounces at lists.llvm.org> On Behalf Of Alexander Zaitsev
> via cfe-dev
> Sent: Monday, August 27, 2018 3:18 PM
> To: Clang Dev <cfe-dev at lists.llvm.org>
> Subject: [cfe-dev] Get count of inlined functions from clang rung
> 
> Hello.
> 
> Is it possible get count of inlined by clang functions with any clang command line
> options? If yes, which options should I set? Thank you.
> 
> --
> Best regards,
> Alexander Zaitsev
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


More information about the cfe-dev mailing list