1

I am trying to run the llvm InstCount pass in the new pass manager on a random generated c code.

  1. I generated a .bc file from the c file , using command :
/usr/bin/clang -I/home/intern24001/csmith/install_csmith/include -c -emit-llvm randomcode-1.c -o rand.bc

After this I ran

./bin/opt rand.bc -S -stats -passes="instcount"  -o /dev/null

This gave me a blank Statistic report, I have built llvm with -DLLVM_ENABLE_ASSERTIONS=ON

===-------------------------------------------------------------------------===
                          ... Statistics Collected ...
===-------------------------------------------------------------------------===

407 bitcode-reader - Number of Metadata records loaded
  7 bitcode-reader - Number of MDStrings loaded

I have clang-19 in LLVM build

1
  • Did you ever figure this out? Commented Jun 30, 2024 at 4:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.