<div dir="ltr">Thanks a lot for your suggestions @Daniel, it helped a lot. <br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm not sure what you mean for this one. The index currently links to GenericOpcode.html in this section: <a href="https://llvm.org/docs/GlobalISel/index.html#design-and-implementation-reference" target="_blank">https://llvm.org/docs/GlobalISel/index.html#design-and-implementation-reference</a> </blockquote><div>Sorry, my bad.  I meant to say that we can add <a href="https://llvm.org/docs/GlobalISel/index.html">https://llvm.org/docs/GlobalISel/index.html</a> link to this page: <a href="https://llvm.org/docs/CodeGenerator.html#introduction-to-selectiondags">https://llvm.org/docs/CodeGenerator.html#introduction-to-selectiondags</a> just as a reference for other instruction Selectors.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> You mean the bit about using std::function? I did some work towards this fairly recently but I haven't got it working yet. The main problem is that calling LegalizerHelper methods from LegalizerInfo without some kind of indirection (like the LegalizerAction enum provides) is tricky. We're currently cheating a bit with custom rules as their implementation is in the LegalizerInfo which was meant to describe what needs to happen, rather than exactly how to do it.</blockquote><div><br></div><div>Okk. Thanks! </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 11, 2021 at 12:27 AM Daniel Sanders <<a href="mailto:daniel_l_sanders@apple.com">daniel_l_sanders@apple.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 style="overflow-wrap: break-word;">Thanks David and Jessica, I probably wouldn't have noticed this thread from the title.<div><br></div><div>Hi Pooja,<br><div><br><blockquote type="cite"><div>On Jun 10, 2021, at 10:12, David Blaikie via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div><div dir="ltr">+Jessica - I think she's got context on GlobalISel and might be able to rope in other folks with context if needed.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 9, 2021 at 10:03 PM Pooja Yadav 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 everyone!<div>I am Pooja Yadav, an outreachy intern and I am working on the project "Create Documentation and Tutorials for the LLVM Global Instruction Selection Framework". I have been going through the documents and tutorials of GISel and I thought to list out the updates that should be made. It would be very helpful if anyone wants to add anything to the list or if they think something needs to be updated or added in the documentation.  </div><div><br></div><div>1. Adding <a title="https://llvm.org/docs/GlobalISel/index.html" href="https://llvm.org/docs/GlobalISel/index.html" rel="noreferrer noopener" style="margin:0px;padding:0px;border:0px;font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;vertical-align:baseline;outline:0px;word-break:break-word;white-space:break-spaces;background-color:rgba(4,4,5,0.07)" target="_blank">https://llvm.org/docs/GlobalISel/index.html</a> before this-<a title="https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-fence" href="https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-fence" rel="noreferrer noopener" style="margin:0px;padding:0px;border:0px;font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;vertical-align:baseline;outline:0px;word-break:break-word;white-space:break-spaces;background-color:rgba(250,166,26,0.08)" target="_blank">https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-fence</a><span style="color:rgb(220,221,222);font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;white-space:break-spaces;background-color:rgba(250,166,26,0.08)"> </span> </div></div></blockquote></div></div></blockquote><div><br></div><div>I'm not sure what you mean for this one. The index currently links to GenericOpcode.html in this section: <a href="https://llvm.org/docs/GlobalISel/index.html#design-and-implementation-reference" target="_blank">https://llvm.org/docs/GlobalISel/index.html#design-and-implementation-reference</a></div><br><blockquote type="cite"><div><div class="gmail_quote"><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"><div>2. <a title="https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-fence" href="https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-fence" rel="noreferrer noopener" style="margin:0px;padding:0px;border:0px;font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;vertical-align:baseline;outline:0px;word-break:break-word;white-space:break-spaces;background-color:rgba(250,166,26,0.08)" target="_blank">https://llvm.org/docs/GlobalISel/GenericOpcode.html#g-fence</a><span style="color:rgb(220,221,222);font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;white-space:break-spaces;background-color:rgba(250,166,26,0.08)"> .</span><span style="color:rgb(220,221,222);font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;white-space:break-spaces;background-color:rgba(250,166,26,0.08)"> </span><span style="background-color:rgba(250,166,26,0.08);font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;white-space:break-spaces"><font>There are many opcodes like this one that need documenting.</font></span></div></div></blockquote></div></div></blockquote><div><br></div><div>Definitely. Most of the instructions also need documentation on the type constraints (e.g. G_ADD only has one type and all three operands must agree on it, also G_PTR_ADD's first type must be a pointer), and any limitations on the types (e.g. G_MERGE_VALUES result must have the same number of bits as the sum of the operand sizes).</div><div><br></div><div>It really ought to be tied into the source somehow so people update the docs as they change things too. I don't know of a good way to do this though.</div><div><br></div><div>As an aside, if we're using a new enough version of pygments I added a syntax highlighter we can be using on the code examples.</div><br><blockquote type="cite"><div><div class="gmail_quote"><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"><div><span style="background-color:rgba(250,166,26,0.08);font-family:Whitney,"Helvetica Neue",Helvetica,Arial,sans-serif;white-space:break-spaces"><font>3. There are some TODOs that I am listing here . Need help to find out whether these TODOs been implemented so that I can try updating the documentation regarding these:  </font></span></div><div>          <a href="https://llvm.org/docs/GlobalISel/IRTranslator.html#aggregates" target="_blank">https://llvm.org/docs/GlobalISel/IRTranslator.html#aggregates</a></div></div></blockquote></div></div></blockquote><div><br></div><div>I'm afraid I haven't dug into this section.</div><br><blockquote type="cite"><div><div class="gmail_quote"><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"><div>          <a href="https://llvm.org/docs/GlobalISel/Legalizer.html#api-legalizerinfo" target="_blank">https://llvm.org/docs/GlobalISel/Legalizer.html#api-legalizerinfo</a></div></div></blockquote></div></div></blockquote><div><br></div><div>You mean the bit about using std::function? I did some work towards this fairly recently but I haven't got it working yet. The main problem is that calling LegalizerHelper methods from LegalizerInfo without some kind of indirection (like the LegalizerAction enum provides) is tricky. We're currently cheating a bit with custom rules as their implementation is in the LegalizerInfo which was meant to describe what needs to happen, rather than exactly how to do it.</div><br><blockquote type="cite"><div><div class="gmail_quote"><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"><div>          <a href="https://llvm.org/docs/GlobalISel/RegBankSelect.html#api-registerbankinfo" target="_blank">https://llvm.org/docs/GlobalISel/RegBankSelect.html#api-registerbankinfo</a></div></div></blockquote></div></div></blockquote><div><br></div><div>Quentin and Matt might be able to help with this bit.</div><div><br></div><div>Hope this helps</div><br><blockquote type="cite"><div><div class="gmail_quote"><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"><div>Some feedback on this would be very helpful.</div><div>Thank you!</div><div><br></div><div>Pooja Yadav</div></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>
_______________________________________________<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><br></div></blockquote></div><br></div></div></blockquote></div>