[llvm] [BOLT][binary-analysis] Fix pac-ret scanner's "major limitation" (PR #136664)

Anatoly Trosinenko via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 05:37:55 PDT 2025


https://github.com/atrosinenko commented:

Thank you very much for unblocking gadget scanner - I think it is a good idea to first fix the "read only mode" and then discuss the general case which is much more complex.

I am rather cautious about matching executable name (though I'm not very familiar with BOLT's core). Maybe it is better to choose the mode of operation based on `opts::BinaryAnalysisMode` and other such options, see [these lines](https://github.com/llvm/llvm-project/blob/e428afdfcf56ccadbbcff16e8fe52e51622baed7/bolt/lib/Rewrite/RewriteInstance.cpp#L747) for example. Then, instead of assigning `this->ToolName`, you could compute this property in constructor and assign it to a boolean field.

https://github.com/llvm/llvm-project/pull/136664


More information about the llvm-commits mailing list