<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 14, 2015, at 8:53 PM, Philip Reames <<a href="mailto:listmail@philipreames.com" class="">listmail@philipreames.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=windows-1252" http-equiv="Content-Type" class="">
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    <div class="moz-cite-prefix">On 07/14/2015 05:07 PM, Pete Cooper
      wrote:<br class="">
    </div>
    <blockquote cite="mid:A220B0A8-FB1B-4699-BE55-158426214869@apple.com" type="cite" class="">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252" class="">
      <br class="">
      <div class="">
        <blockquote type="cite" class="">
          <div class="">On Jul 14, 2015, at 4:48 PM, Reid Kleckner <<a moz-do-not-send="true" href="mailto:rnk@google.com" class="">rnk@google.com</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div dir="ltr" class="">This sounds more like a use case for
              metadata. Can we attach metadata to function arguments, or
              does that not work currently?</div>
          </div>
        </blockquote>
        We can’t, no.</div>
      <div class=""><br class="">
      </div>
      <div class="">I have an out of tree patch which allows metadata in
        AttributeSets.  This would also potentially also work here.</div>
      <div class=""><br class="">
      </div>
      <div class="">However, depending on the number of unique strings/metadata
        in AttributeSets, this could get large.  I don’t think we’ve
        ever had more that a few unique AttributeSets in an entire
        module.  If you have too many different strings then you could
        have a significant number of sets which could get slow.</div>
      <div class=""><br class="">
      </div>
      <div class="">Metadata attached to the function or the function arguments
        is likely to scale better than strings/metadata in the
        AttributeSets, but I guess it all depends on whether many are
        even needed.</div>
    </blockquote>
    As far as I can tell, the string attributes on function parameters
    is already "supposed to work".  We support it in bytecode.  We even
    support serialization of the attributes.  It's just the parsing
    that's broken.  I don't have any problem with an eventual move
    towards supporting metadata on arguments, but does anyone object to
    landing the current patches?  Whether we believe that the use case
    motivating the patch is better represented by metadata or not,
    having the deserialization support seems like a clear improvement. 
    <br class=""></div></div></blockquote>No objection from me.  Seems like an arbitrary restriction for it to currently work on everything other than arguments.</div><div><br class=""></div><div>If you or anyone else wants the metadata in attribute sets, we can have another discussion for that.  My use cases were tbaa on arguments and range metadata, but there could easily be others.</div><div><br class=""></div><div>Cheers,</div><div>Pete<br class=""><blockquote type="cite" class=""><div class=""><div bgcolor="#FFFFFF" text="#000000" class="">
    <br class="">
    As a side note, I can't find any mention of the string attribute
    functionality in the LangRef or ExtendingLLVM.  Seems like it might
    be time to add something about the capability for extension.  We
    should probably also *explicitly* reserve the entire namespace of
    possible keywords for future LLVM in tree enhancements.  <br class="">
    <br class="">
    Philip<br class="">
    <blockquote cite="mid:A220B0A8-FB1B-4699-BE55-158426214869@apple.com" type="cite" class="">
      <div class="">
        <blockquote type="cite" class="">
          <div class="">
            <div class="gmail_extra"><br class="">
              <div class="gmail_quote">On Mon, Jul 13, 2015 at 7:42 AM,
                Artur Pilipenko <span dir="ltr" class=""><<a moz-do-not-send="true" href="mailto:apilipenko@azulsystems.com" target="_blank" class="">apilipenko@azulsystems.com</a>></span>
                wrote:<br class="">
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div style="word-wrap:break-word" class="">
                    Hi,
                    <div class=""><br class="">
                      <div class=""><span class="">
                          <blockquote type="cite" class="">
                            <div class="">On 13 Jul 2015, at 15:59, Hal
                              Finkel <<a moz-do-not-send="true" href="mailto:hfinkel@anl.gov" target="_blank" class="">hfinkel@anl.gov</a>>
                              wrote:</div>
                            <br class="">
                            <div class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">----- Original Message -----</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                              <blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                From: "Artur Pilipenko" <<a moz-do-not-send="true" href="mailto:apilipenko@azulsystems.com" target="_blank" class="">apilipenko@azulsystems.com</a>><br class="">
                                To:<span class=""> </span><a moz-do-not-send="true" href="mailto:llvmdev@cs.uiuc.edu" target="_blank" class="">llvmdev@cs.uiuc.edu</a><br class="">
                                Cc: "Hal Finkel" <<a moz-do-not-send="true" href="mailto:hfinkel@anl.gov" target="_blank" class="">hfinkel@anl.gov</a>><br class="">
                                Sent: Monday, July 13, 2015 6:45:35 AM<br class="">
                                Subject: String attributes for function
                                arguments and return values<br class="">
                                <br class="">
                                Hi,<br class="">
                                <br class="">
                                I’d like to support string attributes on
                                function arguments and<br class="">
                                return values. We are going to use them
                                in our tree to express<br class="">
                                higher level language types.<br class="">
                              </blockquote>
                              <br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                              <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">How do you expect to use this
                                information? Will you need the inliner
                                to do something special with these?</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                            </div>
                          </blockquote>
                        </span>
                        Type information is required for Java specific
                        optimizations, like devirtualization, subtype
                        check optimizations, etc. There are no plans to
                        upstream them, because they are too specific to
                        Java.</div>
                      <div class=""><br class="">
                      </div>
                      <div class="">W.r.t inlining I don’t think that
                        these attributes will require any special
                        handling.</div>
                      <span class="HOEnZb"><font class="" color="#888888">
                          <div class=""><br class="">
                          </div>
                        </font></span>
                      <div class=""><span class="HOEnZb"><font class="" color="#888888">Artur</font></span>
                        <div class="">
                          <div class="h5"><br class="">
                            <blockquote type="cite" class="">
                              <div class=""><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Thanks again,</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Hal</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                  <br class="">
                                  Internally attributes framework have
                                  everything to do this, it’s even<br class="">
                                  possible to generate string attributes
                                  via API right now:<br class="">
                                  Function *function;<br class="">
function->setAttributes(function->getAttributes().addAttribute(context,<br class="">
                                  i, "attribute"));<br class="">
                                  But because it’s not supported in
                                  LLParser if you dump the function<br class="">
                                  and try to parse it back it will fail.
                                  I have a patch to fix this<br class="">
                                  problem:<br class="">
                                  <a moz-do-not-send="true" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D11058&d=AwMGaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=QxcZ1dQY-4Fptsg8J_QZvUH5zX3_zJfFtYe_mFFV434&s=yDXYh5H5eycn3Yn6A7bDimwo8jVbqaGav2FdRRIz0lg&e=" target="_blank" class="">http://reviews.llvm.org/D11058</a><br class="">
                                  I consider this part as a bug fix for
                                  existing functionality.<br class="">
                                  <br class="">
                                  The second patch is to add accessors
                                  to string attributes to Argument<br class="">
                                  and Function classes:<br class="">
                                  <a moz-do-not-send="true" href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10872&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=x-SxyqtoLVC9ndWtSNBJBeyYQml3MZ2Ch4L_B4Hc3Yg&s=a-NOt0poEqPq0I1bAMlsGTKRbxjviviAhMjJ41PNN2Y&e=" target="_blank" class="">http://reviews.llvm.org/D10872</a><br class="">
                                  This part is optional because there no
                                  code in upstream will make use<br class="">
                                  of it. But if we support string
                                  attributes syntax it makes sense to<br class="">
                                  provide API support as well.<br class="">
                                  <br class="">
                                  Does anyone have any objections?<br class="">
                                  <br class="">
                                  Thanks,<br class="">
                                  Artur<br class="">
                                  <br class="">
                                  <br class="">
                                  <br class="">
                                </blockquote>
                                <br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">--<span class=""> </span></span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Hal Finkel</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Assistant Computational
                                  Scientist</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Leadership Computing Facility</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class="">
                                <span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">Argonne National Laboratory</span></div>
                            </blockquote>
                          </div>
                        </div>
                      </div>
                      <br class="">
                    </div>
                  </div>
                  <br class="">
                  _______________________________________________<br class="">
                  LLVM Developers mailing list<br class="">
                  <a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a> 
                         <a moz-do-not-send="true" href="http://llvm.cs.uiuc.edu/" rel="noreferrer" target="_blank" class="">http://llvm.cs.uiuc.edu</a><br class="">
                  <a moz-do-not-send="true" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class="">
                  <br class="">
                </blockquote>
              </div>
              <br class="">
            </div>
            _______________________________________________<br class="">
            LLVM Developers mailing list<br class="">
            <a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu" class="">LLVMdev@cs.uiuc.edu</a>         <a moz-do-not-send="true" href="http://llvm.cs.uiuc.edu/" class="">http://llvm.cs.uiuc.edu</a><br class="">
            <a moz-do-not-send="true" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br class="">
          </div>
        </blockquote>
      </div>
      <br class="">
      <br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
    </blockquote>
    <br class="">
  </div>

</div></blockquote></div><br class=""></body></html>