<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:Menlo;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">For the installed clang, I guess it includes the support for AArch64.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I think a simply workaround is to add AArch64 to your target list by “DLLVM_TARGETS_TO_BUILD=X86;AArch64”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Phoebe<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> llvm-dev <llvm-dev-bounces@lists.llvm.org> <b>On Behalf Of
</b>Siddharth Jain via llvm-dev<br>
<b>Sent:</b> Wednesday, December 29, 2021 12:45 PM<br>
<b>To:</b> Craig Topper <craig.topper@gmail.com><br>
<b>Cc:</b> llvm-dev <llvm-dev@lists.llvm.org><br>
<b>Subject:</b> Re: [llvm-dev] Regarding PBQP register allocator not working for X86<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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?<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Dec 29, 2021 at 12:09 AM Craig Topper <<a href="mailto:craig.topper@gmail.com">craig.topper@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">The registration of register allocators happens via a global static variable in <span style="font-size:8.5pt;font-family:"Menlo",serif;color:black">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?</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Menlo",serif;color:black">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.</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">~Craig<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Dec 28, 2021 at 9:58 AM David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal"><a href="mailto:lhames@gmail.com" target="_blank">+Lang Hames</a> for PBQP questions<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Dec 28, 2021 at 11:49 AM Siddharth Jain via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Hi All,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p style="margin-top:0in"><span style="font-size:11.5pt;font-family:"Arial",sans-serif">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<o:p></o:p></span></p>
<p style="margin-top:0in"><span style="font-size:11.5pt;font-family:"Arial",sans-serif">"</span><span style="font-size:11.5pt;font-family:Consolas;color:#434343;background:#F9F9F9">clang (LLVM
</span><b><span style="font-size:11.5pt;font-family:Consolas;color:#434343">option</span></b><span style="font-size:11.5pt;font-family:Consolas;color:#434343;background:#F9F9F9"> parsing):
</span><b><span style="font-size:11.5pt;font-family:Consolas;color:#434343">for</span></b><span style="font-size:11.5pt;font-family:Consolas;color:#434343;background:#F9F9F9"> the --regalloc
</span><b><span style="font-size:11.5pt;font-family:Consolas;color:#434343">option</span></b><span style="font-size:11.5pt;font-family:Consolas;color:#434343;background:#F9F9F9">: Cannot find
</span><b><span style="font-size:11.5pt;font-family:Consolas;color:#434343">option</span></b><span style="font-size:11.5pt;font-family:Consolas;color:#434343;background:#F9F9F9"> named
</span><i><span style="font-size:11.5pt;font-family:Consolas">'pbqp'!"</span></i><span style="font-size:11.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p style="margin-top:0in"><span style="font-size:11.5pt;font-family:"Arial",sans-serif">My query is how can I use the pbqp register allocator with clang(build from source) for the X86 target?<o:p></o:p></span></p>
<p style="margin-top:0in"><span style="font-size:11.5pt;font-family:"Arial",sans-serif">Regards,<o:p></o:p></span></p>
<p style="margin-top:0in"><span style="font-size:11.5pt;font-family:"Arial",sans-serif">Siddharth Jain<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<pre><span style="font-size:11.5pt;font-family:Consolas"><o:p> </o:p></span></pre>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0in"><span style="font-family:"Arial",sans-serif;color:#222222;background:yellow">Disclaimer:-
</span><span style="font-size:12.0pt;color:#222222;background:white">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.</span><o:p></o:p></p>
<p class="MsoNormal">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p>
</blockquote>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0in"><span style="font-family:"Arial",sans-serif;color:#222222;background:yellow">Disclaimer:-
</span><span style="font-size:12.0pt;color:#222222;background:white">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.</span><o:p></o:p></p>
</div>
</body>
</html>