문제

How to count total number of load instruction on a simple "hello world" program through LLVM ??

도움이 되었습니까?

해결책

Write a pass which iterates over all the instructions in the module, then count the number of instructions that fulfil isa<LoadInst>(I).

See the programmer's manual for how to iterate over all the instructions.

If you're not sure how to write a pass, take a look at this handy guide.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top