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.
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.
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
I got some workable solution only with '-Rpass=inline |& grep -c
"inlined into"'. If you have anything more elegant - tell me please
27.08.2018 23:18, Alexander Zaitsev via cfe-dev пишет:
I got some workable solution only with '-Rpass=inline |& grep -c
"inlined into"'. If you have anything more elegant - tell me please
You can also use -fsave-optimization-record and then process the YAML
records from the inliner.
-Hal