[llvm-dev] How to count instructions in a function? (original) (raw)
Zubin Pahuja via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 29 13:02:55 PST 2017
- Previous message: [llvm-dev] PPC64 Disassembler
- Next message: [llvm-dev] How to count instructions in a function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
I am trying to count IR instructions in a function for static analysis using llvm pass. In contrast with existing examples, I am trying to include instruction counts of all the callees of the function.
Counting the instructions of a function is easy using passes, but iterating through the module's CallGraph is proving to be confusing. I believe I have to use CallGraphWrapperPass to get both module pass and its CallGraph. How do I iterate through the CallGraph in runOnModule()? A simple print callee names example would be highly appreciated.
Thanks, Zubin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171129/35239a01/attachment.html>
- Previous message: [llvm-dev] PPC64 Disassembler
- Next message: [llvm-dev] How to count instructions in a function?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]