Source Feature Extraction

Hi All,
I am new to LLVM. One of the things I would like to do is to try and extract source features (e.g. a normalised distribution of the various type of instructions in each function.), can anyone point me to a good way of doing that?
If it is not already implemented do you think creating a feature Extraction pass and passing it as an optimisation pass would be the way to go?
Cheers,
Sameer

Hi Sameer,

I am new to LLVM. One of the things I would like to do is to try and extract
source features (e.g. a normalised distribution of the various type of
instructions in each function.), can anyone point me to a good way of doing that?
If it is not already implemented do you think creating a feature Extraction pass
and passing it as an optimisation pass would be the way to go?

llvm-bcanalyzer will give you some statistics about what is in a given bitcode
file.

Ciao, Duncan.