[llvm-dev] option similar to -finstrument-functions but for code blocks
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Thu Jan 24 08:19:43 PST 2019
Peng Yu via llvm-dev <llvm-dev at lists.llvm.org> writes:
> I'd like to track not just at the function level, but also at the code
> block level. For example, for a if-else statement, I want to know when
> the if-branch or else-branch is enter/exit.
>
> Is there a clang option similar to -finstrument-functions for code blocks?
Are you looking for code coverage or profile information (block
execution counts)? Dean already replied with the code coverage
information. LLVM has a profile instrumentation pass which is run with
opt -profile-generate. This is gprof-style profiling. I don't know
offhand which (if any) clang option is hooked up to -profile-generate.
-David
More information about the llvm-dev
mailing list