I am using gdb to debug the -instcount pass. The steps I followed were:
- gdb opt
- break llvm::PassManager::run
- run -stats -analyze -instcount filename.bc
I got the bc file using -emit-llvm option as following: llvm-gcc -O3 -emit-llvm filename.c -c -o filename.bc
But when I started debugging, the debugger never really went into my bitecode file, filename.bc and it returned me the statistics regarding different number of instructions. I am wondering how it did all those calculations without even going into the bitecode file?