[llvm] Scalarizer: Replace cl::opts with pass parameters (PR #110645)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 15:12:19 PDT 2024
farzonl wrote:
> > We intentionally brought back the old pass manager semantics. The directX backend is still experimental so if someone removes the legacy pass manager our builds will break silently. Our thinking was keeping around the legacy flag makes it so someone has to grep the codebase before removing.
>
> If you want to set the options from an invocation in the backend, you can still directly pass them to the pass constructor. cl::opts are not a viable way for backends to configure passes, and only potentially useful for test flags and debugging (where running in old PM is obsolete).
Y
> > We intentionally brought back the old pass manager semantics. The directX backend is still experimental so if someone removes the legacy pass manager our builds will break silently. Our thinking was keeping around the legacy flag makes it so someone has to grep the codebase before removing.
>
> If you want to set the options from an invocation in the backend, you can still directly pass them to the pass constructor. cl::opts are not a viable way for backends to configure passes, and only potentially useful for test flags and debugging (where running in old PM is obsolete).
We weren't using it to configure the backend just as a hint/marker that the legacy pass was still in use without folks having to build the DirectX backend. In any case I don't have a strong opinion on this so I'm fine switching it out.
You will however want to remove `scalarizer` from the optdriver:
https://github.com/llvm/llvm-project/blob/ce72c76e9bd0bf74af614cae6a9f85cfd4720e95/llvm/tools/opt/optdriver.cpp#L378
https://github.com/llvm/llvm-project/pull/110645
More information about the llvm-commits
mailing list