Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No -debug-only option in clang-12 #51

Closed
li-xin-yi opened this issue Aug 29, 2021 · 2 comments
Closed

No -debug-only option in clang-12 #51

li-xin-yi opened this issue Aug 29, 2021 · 2 comments

Comments

@li-xin-yi
Copy link

li-xin-yi commented Aug 29, 2021

When I tried

$LLVM_DIR/bin/opt -S -load-pass-plugin <build_dir>/lib/libMBAAdd.so -passes=mba-add input_for_mba.ll -debug-only=mba-add -stats -o out.ll

It gives

opt-12: Unknown command line argument '-debug-only=mba-add'.  Try: 'opt-12 --help'
opt-12: Did you mean '--debug-pass=mba-add'?

But both

$LLVM_DIR/bin/opt -S -load-pass-plugin <build_dir>/lib/libMBAAdd.so -passes=mba-add input_for_mba.ll --debug-pass=Structure -stats -o out1.ll

and

$LLVM_DIR/bin/opt -S -load-pass-plugin <build_dir>/lib/libMBAAdd.so -passes=mba-add input_for_mba.ll -o out2.ll

generate the exactly same output files when comparing them by diff out1.ll out2.ll. I have no idea what goes wrong here.

$opt-12 --version
LLVM (http://llvm.org/):
  LLVM version 12.0.1
  
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: broadwell
@YuhengHuang42
Copy link

Please take a look at this: #20

@banach-space
Copy link
Owner

👋🏻 @li-xin-yi!

Thanks for stopping by and for submitting this. Apologies for the delay, I was away for a while.

As @YuhengHuang42 points out (thank you!), #20 deals already provides a solution. Please also note that there's a dedicated note in README.md:

Note that for these macros to work you need a debug build of LLVM (i.e. opt) and llvm-tutor (i.e. use -DCMAKE_BUILD_TYPE=Debug instead of -DCMAKE_BUILD_TYPE=Release).

I will close this as I think this is now re-solved. Please re-open if you are still stuck!

All the best,
-Andrzej

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants