<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 21.03.2013 02:30, schrieb Andrew
      Trick:<br>
    </div>
    <blockquote
      cite="mid:745A57C7-26A8-4D5D-868D-40A0236775C6@apple.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <br>
      <div>
        <div>On Mar 20, 2013, at 8:48 AM, Christian König <<a
            moz-do-not-send="true"
            href="mailto:christian.koenig@amd.com">christian.koenig@amd.com</a>>
          wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite">
          <div text="#000000" bgcolor="#FFFFFF">
            <div class="moz-cite-prefix">I've reverted the commit for
              now.<br>
              <br>
              The code is trivial incorrect, but fixing it causes X86 to
              generate more inefficient code.<br>
              <br>
              Somebody with more knowledge of the code should take a
              look at it.<br>
            </div>
          </div>
        </blockquote>
        <div><br>
        </div>
        <div>I'm trying to kill off the whole pass. Until then, it's
          incorrect but not unsafe and through random luck doing what we
          want. For now, I'm fine if someone want to just delete these
          conditions if it doesn't cause serious regressions.</div>
      </div>
    </blockquote>
    <br>
    Hi Andy,<br>
    <br>
    Thanks for your comments, I already thought so, even with this code
    removed it looked a bit strange and unmaintained (for example we've
    got a ready filter and nobody seems to use it???).<br>
    <br>
    There seems to be a bunch of different approaches for pre register
    allocation scheduling, any suggestions for a target that so far
    doesn't have anything implemented regarding this? Simplified I just
    need a pre register allocation scheduler that keeps an eye on both
    the current register pressure and also the latency of my opcodes.<br>
    <br>
    Thanks in advance,<br>
    Christian.<br>
    <br>
    <blockquote
      cite="mid:745A57C7-26A8-4D5D-868D-40A0236775C6@apple.com"
      type="cite">
      <div>
        <div>-Andy</div>
        <br>
        <blockquote type="cite">
          <div text="#000000" bgcolor="#FFFFFF">
            <div class="moz-cite-prefix"> Am 20.03.2013 16:04, schrieb
              Koenig, Christian:<br>
            </div>
            <blockquote
              cite="mid:A4364598C2C10948901DA5A2C8D4BAC717443C@storexdag04.amd.com"
              type="cite">
              <meta name="Generator" content="Microsoft Word 14
                (filtered medium)">
              <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
..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]-->
              <div class="WordSection1">
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi

                    Justin,<o:p></o:p></span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yeah,

                    seeing that also. I usually don’t compile neither
                    X86 nor AArch64 so I didn’t stumbled over it before
                    committing (and the changes seemed trivial).
                    Currently investigating into it.<o:p></o:p></span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Christian.<o:p></o:p></span></p>
                <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p>
                <div style="border:none;border-left:solid blue
                  1.5pt;padding:0in 0in 0in 4.0pt">
                  <div>
                    <div style="border:none;border-top:solid #B5C4DF
                      1.0pt;padding:3.0pt 0in 0in 0in">
                      <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
                          Justin Holewinski [<a moz-do-not-send="true"
                            class="moz-txt-link-freetext"
                            href="mailto:justin.holewinski@gmail.com">mailto:justin.holewinski@gmail.com</a>]
                          <br>
                          <b>Sent:</b> Wednesday, March 20, 2013 3:47 PM<br>
                          <b>To:</b> Koenig, Christian<br>
                          <b>Cc:</b> llvm-commits<br>
                          <b>Subject:</b> Re: [llvm] r177518 -
                          pre-RA-sched: fix TargetOpcode usage<o:p></o:p></span></p>
                    </div>
                  </div>
                  <p class="MsoNormal"><o:p> </o:p></p>
                  <div>
                    <p class="MsoNormal">Hi Christian,<br>
                      <br>
                      I'm seeing some test suite failures with this
                      change on Linux x86_64:<br>
                      <br>
                      <span style="font-family:"Courier New"">Failing

                        Tests (7):<br>
                            LLVM :: CodeGen/AArch64/func-calls.ll<br>
                            LLVM :: CodeGen/AArch64/sibling-call.ll<br>
                            LLVM ::
                        CodeGen/X86/2010-05-03-CoalescerSubRegClobber.ll<br>
                            LLVM :: CodeGen/X86/avx-basic.ll<br>
                            LLVM :: CodeGen/X86/avx-shuffle.ll<br>
                            LLVM :: CodeGen/X86/lsr-loop-exit-cond.ll<br>
                            LLVM :: CodeGen/X86/shift-bmi2.ll</span><o:p></o:p></p>
                  </div>
                  <div>
                    <p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
                    <div>
                      <p class="MsoNormal">On Wed, Mar 20, 2013 at 9:49
                        AM, Christian Konig <<a
                          moz-do-not-send="true"
                          href="mailto:christian.koenig@amd.com"
                          target="_blank">christian.koenig@amd.com</a>>

                        wrote:<o:p></o:p></p>
                      <p class="MsoNormal">Author: ckoenig<br>
                        Date: Wed Mar 20 08:49:22 2013<br>
                        New Revision: 177518<br>
                        <br>
                        URL: <a moz-do-not-send="true"
                          href="http://llvm.org/viewvc/llvm-project?rev=177518&view=rev"
                          target="_blank">
http://llvm.org/viewvc/llvm-project?rev=177518&view=rev</a><br>
                        Log:<br>
                        pre-RA-sched: fix TargetOpcode usage<br>
                        <br>
                        TargetOpcodes need to be treaded as Machine- and
                        not ISD-Opcodes.<br>
                        <br>
                        Signed-off-by: Christian König <<a
                          moz-do-not-send="true"
                          href="mailto:christian.koenig@amd..com">christian.koenig@amd.com</a>><br>
                        <br>
                        Modified:<br>
                           
                        llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp<br>
                        <br>
                        Modified:
                        llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp<br>
                        URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=177518&r1=177517&r2=177518&view=diff"
                          target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=177518&r1=177517&r2=177518&view=diff</a><br>
==============================================================================<br>
                        ---
                        llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
                        (original)<br>
                        +++
                        llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
                        Wed Mar 20 08:49:22 2013<br>
                        @@ -1894,12 +1894,15 @@ unsigned
                        RegReductionPQBase::getNodePrio<br>
                             // CopyToReg should be close to its uses to
                        facilitate coalescing and<br>
                             // avoid spilling.<br>
                             return 0;<br>
                        -  if (Opc == TargetOpcode::EXTRACT_SUBREG ||<br>
                        -      Opc == TargetOpcode::SUBREG_TO_REG ||<br>
                        -      Opc == TargetOpcode::INSERT_SUBREG)<br>
                        -    // EXTRACT_SUBREG, INSERT_SUBREG, and
                        SUBREG_TO_REG nodes should be<br>
                        -    // close to their uses to facilitate
                        coalescing.<br>
                        -    return 0;<br>
                        +  if (SU->getNode() &&
                        SU->getNode()->isMachineOpcode()) {<br>
                        +    Opc =
                        SU->getNode()->getMachineOpcode();<br>
                        +    if (Opc == TargetOpcode::EXTRACT_SUBREG ||<br>
                        +        Opc == TargetOpcode::SUBREG_TO_REG ||<br>
                        +        Opc == TargetOpcode::INSERT_SUBREG)<br>
                        +      // EXTRACT_SUBREG, INSERT_SUBREG, and
                        SUBREG_TO_REG nodes should be<br>
                        +      // close to their uses to facilitate
                        coalescing.<br>
                        +      return 0;<br>
                        +  }<br>
                           if (SU->NumSuccs == 0 &&
                        SU->NumPreds != 0)<br>
                             // If SU does not have a register use, i.e.
                        it doesn't produce a value<br>
                             // that would be consumed (e.g. store),
                        then it terminates a chain of<br>
                        @@ -2585,12 +2588,15 @@ static bool
                        canEnableCoalescing(SUnit *S<br>
                             // avoid spilling.<br>
                             return true;<br>
                        <br>
                        -  if (Opc == TargetOpcode::EXTRACT_SUBREG ||<br>
                        -      Opc == TargetOpcode::SUBREG_TO_REG ||<br>
                        -      Opc == TargetOpcode::INSERT_SUBREG)<br>
                        -    // EXTRACT_SUBREG, INSERT_SUBREG, and
                        SUBREG_TO_REG nodes should be<br>
                        -    // close to their uses to facilitate
                        coalescing.<br>
                        -    return true;<br>
                        +  if (SU->getNode() &&
                        SU->getNode()->isMachineOpcode()) {<br>
                        +    Opc =
                        SU->getNode()->getMachineOpcode();<br>
                        +    if (Opc == TargetOpcode::EXTRACT_SUBREG ||<br>
                        +        Opc == TargetOpcode::SUBREG_TO_REG ||<br>
                        +        Opc == TargetOpcode::INSERT_SUBREG)<br>
                        +      // EXTRACT_SUBREG, INSERT_SUBREG, and
                        SUBREG_TO_REG nodes should be<br>
                        +      // close to their uses to facilitate
                        coalescing.<br>
                        +      return true;<br>
                        +  }<br>
                        <br>
                           if (SU->NumPreds == 0 &&
                        SU->NumSuccs != 0)<br>
                             // If SU does not have a register def,
                        schedule it close to its uses<br>
                        <br>
                        <br>
                        _______________________________________________<br>
                        llvm-commits mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
                        <a moz-do-not-send="true"
                          href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits"
                          target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
                    </div>
                    <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
                      <br clear="all">
                      <br>
                      -- <o:p></o:p></p>
                    <div>
                      <p class="MsoNormal">Thanks,<o:p></o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal"><o:p> </o:p></p>
                    </div>
                    <div>
                      <p class="MsoNormal">Justin Holewinski<o:p></o:p></p>
                    </div>
                  </div>
                </div>
              </div>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <br>
              <pre wrap="">_______________________________________________
llvm-commits mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
            </blockquote>
            <br>
          </div>
          _______________________________________________<br>
          llvm-commits mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
          <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>