[llvm-dev] option similar to -finstrument-functions but for code blocks

Peng Yu via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 23 09:13:05 PST 2019


Hi,

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?

Alternatively, I could manually insert the code to the IR .ll file.

I see the generated .ll use the following function when
-finstrument-functions is enabled. Is there an equivalent function for
code blocks?

%1 = call i8* @llvm.returnaddress(i32 0), !dbg !10

-- 
Regards,
Peng


More information about the llvm-dev mailing list