[llvm] Initialize PBQP Pass for Clang (PR #217954)

Michael Hu via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 14:04:18 PDT 2026


mrh29 wrote:

> `-regalloc=pbqp` works fine for me. It's unclear to me why this is needed for the `-regalloc` option to work.

Do you have AArch64 as a target? Digging into this a bit more, the AArch64 Target has a specific implementation (AArch64PBQPRegAlloc) that includes PBQPRegAlloc.h ungated which leads to --regalloc=pbqp working despite having no pass initialization. Building clang with a target set that does not include AArch64 causes clang to fail with the following error:

`clang (LLVM option parsing): for the --regalloc option: Cannot find option named 'pbqp'!`

This also means that PBQP on AArch64 is being included despite not having its dependencies set up by the `INITIALIZE_PASS` macro.

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


More information about the llvm-commits mailing list