<div dir="ltr">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?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 29, 2021 at 12:09 AM Craig Topper <<a href="mailto:craig.topper@gmail.com">craig.topper@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The registration of register allocators happens via a global static variable in <span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">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><div><font color="#000000" face="Menlo"><span style="font-size:11px;font-variant-ligatures:no-common-ligatures"><br></span></font></div><div><font color="#000000" face="Menlo"><span style="font-size:11px;font-variant-ligatures:no-common-ligatures">llc and opt both include </span></font><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">LinkAllCodegenComponents.h which has a reference to a PBQP function which makes the file appear live to the linker. clang does not include </span><span style="color:rgb(0,0,0);font-family:Menlo;font-size:11px;font-variant-ligatures:no-common-ligatures">LinkAllCodegenComponents.h</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px">.</span><div><br clear="all"><div><div dir="ltr">~Craig</div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><a class="gmail_plusreply" id="gmail-m_-8621455979154005164gmail-m_7243306146661138819plusReplyChip-0" href="mailto:lhames@gmail.com" target="_blank">+Lang Hames</a> for PBQP questions<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div><p style="margin-top:0px;font-family:Arial,sans-serif;font-size:15.008px">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</p><p style="margin-top:0px;font-family:Arial,sans-serif;font-size:15.008px">"<span style="color:rgb(67,67,67);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap;background-color:rgb(249,249,249)">clang (LLVM </span><span style="color:rgb(67,67,67);font-weight:bold;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap">option</span><span style="color:rgb(67,67,67);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap;background-color:rgb(249,249,249)"> parsing): </span><span style="color:rgb(67,67,67);font-weight:bold;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap">for</span><span style="color:rgb(67,67,67);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap;background-color:rgb(249,249,249)"> the --regalloc </span><span style="color:rgb(67,67,67);font-weight:bold;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap">option</span><span style="color:rgb(67,67,67);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap;background-color:rgb(249,249,249)">: Cannot find </span><span style="color:rgb(67,67,67);font-weight:bold;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap">option</span><span style="color:rgb(67,67,67);font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap;background-color:rgb(249,249,249)"> named </span><span style="font-style:italic;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap">'pbqp'!"</span></p><p style="margin-top:0px;font-family:Arial,sans-serif;font-size:15.008px"><span style="font-size:15.008px">My query is how can I </span>use the pbqp<span style="font-size:15.008px"> register allocator with clang(build from source) </span>for the X86<span style="font-size:15.008px"> target?</span></p><p style="margin-top:0px;font-family:Arial,sans-serif;font-size:15.008px"><span style="font-size:15.008px">Regards,</span></p><p style="margin-top:0px;font-family:Arial,sans-serif;font-size:15.008px"><span style="font-size:15.008px">Siddharth Jain</span></p><p style="margin-top:0px;font-family:Arial,sans-serif;font-size:15.008px"><span style="font-style:italic;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px;white-space:pre-wrap"></span></p><br><pre style="font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace;font-size:15.008px"><br></pre></div></div>

<br>
<span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap;background-color:yellow">Disclaimer:- </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small">This </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small">footer text is to convey that this email is sent by one of the </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small">users of IITH. So, do not mark it as SPAM.</span></p></span>_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div>

<br>
<span><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap;background-color:yellow">Disclaimer:- </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small">This </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small">footer text is to convey that this email is sent by one of the </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small">users of IITH. So, do not mark it as SPAM.</span></p></span>