[llvm] [LTO] Enable adding custom pass instrumentation callbacks (PR #71268)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 14:37:20 PST 2023


teresajohnson wrote:

> These are command-line options and their variables are local to the TU. There is no API to access them from other components. Designing a global filter could be a solution, but for now, it seems too complex for our needs. Moreover, using such an API would mean that components communicate through a global state, which is usually not considered a good program design.

I'm not sure what you mean here. How are you invoking your LTO link? You can pass internal options via the linker or other tools that are invoking LTO. E.g. for an lld LTO link: -Wl,-mllvm,-enable-elim-avail-extern=false (making up a possible name for the internal option).

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


More information about the llvm-commits mailing list