[llvm-dev] Regarding PBQP register allocator not working for X86

Wang, Phoebe via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 28 21:27:47 PST 2021


It might because AArch64 has a “AArch64PBQPRegAlloc.cpp” which includes “RegAllocPBQP.h”. It should be special only for AArach64, and may not be supported either if you build other target.
For the installed clang, I guess it includes the support for AArch64.
I think a simply workaround is to add AArch64 to your target list by “DLLVM_TARGETS_TO_BUILD=X86;AArch64”

Thanks
Phoebe

From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Siddharth Jain via llvm-dev
Sent: Wednesday, December 29, 2021 12:45 PM
To: Craig Topper <craig.topper at gmail.com>
Cc: llvm-dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] Regarding PBQP register allocator not working for X86

PBQP is working with clang installed from apt and clang build from source for AArch64 target but not for X86. Any idea why it could be happening specifically for the X86 target?

On Wed, Dec 29, 2021 at 12:09 AM Craig Topper <craig.topper at gmail.com<mailto:craig.topper at gmail.com>> wrote:
The registration of register allocators happens via a global static variable in RegAllocPBQP.cpp. Perhaps because no functions in that function are called from any other file, the file and all its static variables got stripped from the binary?

llc and opt both include LinkAllCodegenComponents.h which has a reference to a PBQP function which makes the file appear live to the linker. clang does not include LinkAllCodegenComponents.h.

~Craig


On Tue, Dec 28, 2021 at 9:58 AM David Blaikie via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
+Lang Hames<mailto:lhames at gmail.com> for PBQP questions

On Tue, Dec 28, 2021 at 11:49 AM Siddharth Jain via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote:
Hi All,


I am building LLVM 10.0.1 from source for X86 target, the build completed successfully but when I am compiling using clang(build from source) with “regalloc” flag set to “pbqp”, following error is thrown

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

My query is how can I use the pbqp register allocator with clang(build from source) for the X86 target?

Regards,

Siddharth Jain





Disclaimer:- This footer text is to convey that this email is sent by one of the users of IITH. So, do not mark it as SPAM.
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
_______________________________________________
LLVM Developers mailing list
llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


Disclaimer:- This footer text is to convey that this email is sent by one of the users of IITH. So, do not mark it as SPAM.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211229/06e4d378/attachment.html>


More information about the llvm-dev mailing list