banach-space / llvm-tutor

A collection of out-of-tree LLVM passes for teaching and learning
MIT License
2.95k stars 393 forks source link

[StaticCallCounter] Lack of command line for new PM, and Unknown command line argument '-analyze' #81

Closed iwzbi closed 1 year ago

iwzbi commented 1 year ago

for new PM, I run $LLVM_DIR/bin/opt -load-pass-plugin <build_dir>/lib/libStaticCallCounter.so --passes='print<static-cc>' -disable-output input_for_cc.bc successfully

but '-analyze' is a unknown command line argument when i run $LLVM_DIR/bin/opt -enable-new-pm=0 -load <build_dir>/lib/libStaticCallCounter.so -legacy-static-cc -analyze input_for_cc.bc

my llvm version is 15.0.7

banach-space commented 1 year ago

Holiday @wzbitl ,

Thanks for visiting and reporting this!

It looks like things do work as expected for the new PM (there is no option, instead you specify the printing pass as the pass to run).The legacy PM is deprecated, so really not much point looking into this, sorry :(

-Andrzej

iwzbi commented 1 year ago

Got it, thank you!