<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 6/16/2017 11:44 AM, 陳韋任 wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFSLk9dj6sq5GPV8Z8j+eLa6uEAvFMgxTXJH1uafE5P=bRenrg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:arial,helvetica,sans-serif">I guess it
          tends not to block cross block optimization opportunity, or it
          just happen</div>
        <div class="gmail_default"><a
            class="gmail-m_4048814098611670904moz-txt-link-freetext"
            href="https://reviews.llvm.org/D30416" target="_blank"
            style="font-family:arial,sans-serif;font-size:14px"
            moz-do-not-send="true">https://reviews.llvm.org/<wbr>D30416</a><span
            style="font-size:14px"> is one?</span><br>
        </div>
        <div class="gmail_default"><span style="font-size:14px"><br>
          </span></div>
        <div class="gmail_default"><span style="font-size:14px">Regards,</span></div>
        <div class="gmail_default"><span style="font-size:14px">chenwj</span></div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-06-17 1:49 GMT+08:00 Friedman, Eli
          via llvm-dev <span dir="ltr"><<a
              href="mailto:llvm-dev@lists.llvm.org" target="_blank"
              moz-do-not-send="true">llvm-dev@lists.llvm.org</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"><span class=""></span><br>
              <p>We don't aggressively narrow loads and stores in IR
                because it tends to block other optimizations.  See <a
                  class="m_4048814098611670904moz-txt-link-freetext"
                  href="https://reviews.llvm.org/D30416" target="_blank"
                  moz-do-not-send="true">https://reviews.llvm.org/<wbr>D30416</a>.<br>
              </p>
              <span class=""></span></div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <br>
    I guess my previous reply was a bit too terse.<br>
    <br>
    We don't want to narrow loads early in the optimization pipeline
    because it tends to hide relationships between bitfields.  In
    particular, overlapping loads/stores are more difficult to
    optimize.  We want EarlyCSE/GVN/DSE/etc. to see the full-width loads
    and stores to make them more effective.<br>
    <br>
    Currently, we do narrowing in DAGCombine.  D30416 is a proposal to
    move that slightly earlier, to the late stages of the IR
    optimization pipeline, so we can avoid the limitations of
    SelectionDAG.<br>
    <br>
    If you read the whole discussion on that patch, it goes into more
    detail about this.<br>
    <br>
    -Eli<br>
    <pre class="moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
  </body>
</html>