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

missing: how to get "opt -analyze --loops" from the new pass manager #107

Closed dtkerns closed 9 months ago

dtkerns commented 10 months ago

related to #50 but I did't want to comment on a closed issue. I've read thru the official llvm docs and can't figure out how to get loops: Natural Loop Information out of the new pass manager appreciate any assistance

banach-space commented 10 months ago

hey!

The pass is defined here: https://github.com/llvm/llvm-project/blob/17afa5befb4cbe86c22c25ae1603433c8bd21551/llvm/lib/Analysis/LoopInfo.cpp#L1168-L1177. Try -verify-loop-info. Also, for generic LLVM stuff, https://discourse.llvm.org/ tends to be better.

dtkerns commented 10 months ago

thanks ... but I need a bit more hand-holding than just your link to the .cpp file. I'll post over in the discourse channel, thanks for the link!

dtkerns commented 10 months ago

btw, if you can help, I'm still not getting anywhere ... https://discourse.llvm.org/t/need-usage-help-w-new-pass-manager-for-opt-analysis-natural-loop-information/75874

dtkerns commented 9 months ago

bjope chashed this down... looks like a bug in opt. (see discourse link above)