<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I'm not familiar with std::transform,
      but it looks like one element in the source<br>
      can only give one element in the destination, whereas here you can
      have one element<br>
      decomposing into several ones.<br>
      <br>
      On 19/03/2017 23:22, Daniel Berlin wrote:<br>
    </div>
    <blockquote
cite="mid:CAF4BwTVf5+z-0mxnhut6MWALZ3NCG6=q++7tcZ6yoJ89P1ip3w@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Sun, Mar 19, 2017 at 3:13 PM, Axel
            Davy <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:axel.davy@ens.fr" target="_blank">axel.davy@ens.fr</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div bgcolor="#FFFFFF">
                <div class="gmail-m_6044199292940291528moz-cite-prefix">The
                  patch is on top of other patches not yet merged.<br>
                  <br>
                  You can find a branch with all the patches here:<br>
                  <a moz-do-not-send="true"
                    class="gmail-m_6044199292940291528moz-txt-link-freetext"
href="https://github.com/axeldavy/llvm/commits/llvm_upstream"
                    target="_blank">https://github.com/axeldavy/<wbr>llvm/commits/llvm_upstream</a><br>
                  <br>
                  getPairsForRegs is not equivalent to std::copy. </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Okay, then it's definitely equivalent to std::transform
               ;)</div>
            <div>(though note: It looks nearly trivial to define a
              subclass of the register mask pair that makes *all* those
              calls std::copy)</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">
              <div bgcolor="#FFFFFF">
                <div class="gmail-m_6044199292940291528moz-cite-prefix">The
                  name is probably poorly choosen,<br>
                  I'm open to suggestions.<br>
                  <br>
                  Yours,<br>
                  <br>
                  Axel
                  <div>
                    <div class="gmail-h5"><br>
                      <br>
                      On 19/03/2017 23:10, Daniel Berlin wrote:<br>
                    </div>
                  </div>
                </div>
                <div>
                  <div class="gmail-h5">
                    <blockquote type="cite">
                      <div dir="ltr">This code has a number of issues
                        (using copying all over the place) that is
                        likely causing your issue.
                        <div>For example:</div>
                        <div>
                          <div>// Idem for a list of Reg/Mask</div>
                          <div>  SmallVector<RegisterMaskPair, 8>
                            getPairsForRegs(</div>
                          <div>    const
                            SmallVector<RegisterMaskPair, 8>
                            Regs);</div>
                          <div><br>
                          </div>
                          <div><br>
                          </div>
                          <div>You almost certainly meant this to be a
                            const reference to Regs.</div>
                          <div>etc</div>
                          <div><br>
                          </div>
                          <div>Actually, staring at/ this harder, that
                            function is just equivalent to std::copy,
                            no?<br>
                            <br>
                          </div>
                          <div>I tried to patch it into a client, but it
                            does not patch cleanly.<br>
                          </div>
                          <div>If you rebase it, i'll take a closer
                            look.</div>
                          <div><br>
                          </div>
                        </div>
                      </div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">On Sun, Mar 19, 2017 at
                          2:22 PM, Axel Davy <span dir="ltr"><<a
                              moz-do-not-send="true"
                              href="mailto:axel.davy@ens.fr"
                              target="_blank">axel.davy@ens.fr</a>></span>
                          wrote:<br>
                          <blockquote class="gmail_quote"
                            style="margin:0px 0px 0px
                            0.8ex;border-left:1px solid
                            rgb(204,204,204);padding-left:1ex">
                            <div bgcolor="#FFFFFF">
                              <div
                                class="gmail-m_6044199292940291528m_-3118111395948692590moz-cite-prefix">Here
                                is the code that makes use of this:<br>
                                <br>
                                <a moz-do-not-send="true"
class="gmail-m_6044199292940291528m_-3118111395948692590moz-txt-link-freetext"
                                  href="https://reviews.llvm.org/D31124"
                                  target="_blank">https://reviews.llvm.org/D3112<wbr>4</a><span
class="gmail-m_6044199292940291528HOEnZb"><font color="#888888"><br>
                                    <br>
                                    Axel</font></span>
                                <div>
                                  <div
                                    class="gmail-m_6044199292940291528h5"><br>
                                    <br>
                                    On 19/03/2017 22:16, Daniel Berlin
                                    wrote:<br>
                                  </div>
                                </div>
                              </div>
                              <div>
                                <div
                                  class="gmail-m_6044199292940291528h5">
                                  <blockquote type="cite">
                                    <div dir="ltr">Can you give the
                                      actual code you are trying to use?<br>
                                      It should work fine in, say,
                                      densemap, if you define the
                                      densemapinfo for it.
                                      <div><br>
                                      </div>
                                      <div>Past that, without seeing
                                        exactly how you are trying to
                                        use it, it is hard to say what
                                        the problem is.</div>
                                      <div><br>
                                      </div>
                                      <div>I would venture a guess if
                                        you are doing it in a way that
                                        it is trying to default
                                        construct these, you are
                                        probably not doing it right :)</div>
                                      <div><br>
                                      </div>
                                    </div>
                                    <div class="gmail_extra"><br>
                                      <div class="gmail_quote">On Sun,
                                        Mar 19, 2017 at 12:44 PM, Axel
                                        Davy via llvm-commits <span
                                          dir="ltr"><<a
                                            moz-do-not-send="true"
                                            href="mailto:llvm-commits@lists.llvm.org"
                                            target="_blank">llvm-commits@lists.llvm.org</a>></span>
                                        wrote:<br>
                                        <blockquote class="gmail_quote"
                                          style="margin:0px 0px 0px
                                          0.8ex;border-left:1px solid
                                          rgb(204,204,204);padding-left:1ex">This
                                          is similar to just allocating
                                          the structure.<br>
                                          <br>
                                          Somehow to use maps, it
                                          complained without this
                                          constructor.<br>
                                          I don't think however any
                                          possible initialization value
                                          would make sense.<br>
                                          <br>
                                          Perhaps UINT_MAX for Reg and 0
                                          for LaneMask ? To clearly
                                          indicate there is error<br>
                                          if you see these in logs ?<span
class="gmail-m_6044199292940291528m_-3118111395948692590HOEnZb"><font
                                              color="#888888"><br>
                                              <br>
                                              Axel</font></span>
                                          <div
                                            class="gmail-m_6044199292940291528m_-3118111395948692590HOEnZb">
                                            <div
                                              class="gmail-m_6044199292940291528m_-3118111395948692590h5"><br>
                                              <br>
                                              On 19/03/2017 20:23,
                                              Stanislav Mekhanoshin via
                                              Phabricator wrote:<br>
                                              <blockquote
                                                class="gmail_quote"
                                                style="margin:0px 0px
                                                0px
                                                0.8ex;border-left:1px
                                                solid
                                                rgb(204,204,204);padding-left:1ex">
                                                rampitec added inline
                                                comments.<br>
                                                <br>
                                                <br>
                                                ================<br>
                                                Comment at:
                                                include/llvm/CodeGen/RegisterP<wbr>ressure.h:45<br>
                                                +<br>
                                                +  RegisterMaskPair() {}<br>
                                                +<br>
                                                ----------------<br>
                                                That is undesirable to
                                                have a constructor which
                                                does not initialize
                                                fields.<br>
                                                <br>
                                                <br>
                                                Repository:<br>
                                                   rL LLVM<br>
                                                <br>
                                                <a
                                                  moz-do-not-send="true"
href="https://reviews.llvm.org/D31123" rel="noreferrer" target="_blank">https://reviews.llvm.org/D3112<wbr>3</a><br>
                                                <br>
                                                <br>
                                                <br>
                                              </blockquote>
                                              <br>
______________________________<wbr>_________________<br>
                                              llvm-commits mailing list<br>
                                              <a moz-do-not-send="true"
href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
                                              <a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits"
                                                rel="noreferrer"
                                                target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
                                            </div>
                                          </div>
                                        </blockquote>
                                      </div>
                                      <br>
                                    </div>
                                  </blockquote>
                                  <p><br>
                                  </p>
                                </div>
                              </div>
                            </div>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </blockquote>
                    <p><br>
                    </p>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>