<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 12/17/13 2:06 PM, Renato Golin
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAMSE1kem35+bk4rBVw7S5JKwRF--E__HGCHn4ofrro6tZJ2G4A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On 17 December 2013 19:10, Philip
            Reames <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div class="im">
                  <div><span style="color:rgb(34,34,34)">Specifically
                      with regards to metadata, why is the metadata on
                      the call site not the function declaration?  I
                      would expect that a call to "cos" would always
                      vectorize to the same "cos4".  Is supporting
                      different vectorizations at different points of
                      the program a key goal?</span></div>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Yes. Sometimes...</div>
            <div><br>
            </div>
            <div>See the test in the patch for an idea of two different
              functions, maybe both available, maybe not.</div>
            <div><br>
            </div>
            <div>Also, some variants could be more efficient in some
              cases, while some in others. This may sound vague, but
              OpenCL has such a large number of functions that I'd be
              surprised if there were only simple cases... James can
              give more concrete examples on where this is important.<br>
            </div>
            <div><br>
            </div>
            <div>In a strictly libc case, you may create several
              variants of memcpy based on the arguments (restrict or
              volatile, address space boundaries, etc), and apply the
              fastest you can on each case.</div>
          </div>
        </div>
      </div>
    </blockquote>
    I acknowledge your point, but want to point out that the specific
    example you've given is function specific, not call site specific. 
    You've described a property of a given function in terms of how it's
    called, but the description is of behavior related to the function. 
    (i.e. call calls to memcpy have the same rules applied)<br>
    <br>
    I'm not saying there aren't cases where having the per-call site
    detail is useful; I'm just concerned it's overkill for the common
    case.  It also requires a much more complicated frontend.  All code
    which might want to be vectorized needs to know about the
    vectorization semantics.  With a per function annotation (attribute,
    metadata, whatever..), only the part that generates the function
    declaration would need to preserve this information.  <br>
    <br>
    Just to be clear, I'm not <i>opposing</i> the current solution.  If
    this is what the interested parties want to run with, that's fine. 
    I'm simply pointing out some downsides to the proposed design.  <br>
    <br>
    Philip<br>
    <br>
  </body>
</html>