<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 2013-05-15 12:06 , Chandler Carruth
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAGCO0Ki3S4QO241BoZ=uFXQPrf4tNYKDBQWgSPeXe6+AGm2Ljw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote"><br>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
              Should I add the following changes as well?  There don't
              seem to be tests for these files (nothing I could find in
              a quick search, anyway).<br>
            </blockquote>
            <div><br>
            </div>
            <div style="">I would add them, but maybe in a separate
              commit.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Will do.<br>
    <br>
    <blockquote
cite="mid:CAGCO0Ki3S4QO241BoZ=uFXQPrf4tNYKDBQWgSPeXe6+AGm2Ljw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div style=""> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Main
              patch is attached.  OK to commit?</blockquote>
          </div>
          <div class="gmail_extra"><br>
          </div>
          LGTM. Check w/ Duncan though since he looked at one version of
          it.</div>
      </div>
    </blockquote>
    <br>
    Sure.  Duncan, please let me know if that extra test case I added
    addresses your concerns.  Note that I could only address the
    analysis part.  I believe codegen is not using this information
    properly yet (I left a TODO in the test case).<br>
    <br>
    <blockquote
cite="mid:CAGCO0Ki3S4QO241BoZ=uFXQPrf4tNYKDBQWgSPeXe6+AGm2Ljw@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra" style="">I'm not sure what the best way
          to phrase all of this is though...</div>
      </div>
    </blockquote>
    <br>
    How about something like this:<br>
    <br>
    diff --git a/docs/LangRef.rst b/docs/LangRef.rst<br>
    index 1c0864d..77ef016 100644<br>
    --- a/docs/LangRef.rst<br>
    +++ b/docs/LangRef.rst<br>
    @@ -808,10 +808,15 @@ example:<br>
         this function into callers whenever possible, ignoring any
    active<br>
         inlining size threshold for this caller.<br>
     ``cold``<br>
    -    This attribute indicates that this function is not called<br>
    -    frequently.  When computing edge weights, basic blocks<br>
    -    post-dominated by a cold function are also considered to be
    cold;<br>
    -    and, thus, given low weight.<br>
    +    This attribute indicates that this function is unlikely to be<br>
    +    executed. It indicates that performance of the code in paths<br>
    +    coming out and leading into that function call should not be a<br>
    +    concern.  Paths leading to the cold call are marked as unlikely
    by<br>
    +    the branch prediction analysis.  Example of functions that are<br>
    +    useful to mark cold are functions handling unlikely conditions,<br>
    +    such as fatal errors.  This will cause the optimizer to place
    more<br>
    +    emphasis on optimizing the hot paths in the code (e.g., code<br>
    +    layout will move cold code sections to the bottom).<br>
     ``nonlazybind``<br>
         This attribute suppresses lazy symbol binding for the function.
    This<br>
         may make calls to the function faster, at the cost of extra
    program<br>
    <br>
    <br>
    Diego.<br>
  </body>
</html>