<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    +1.  I've seen a couple of cases where metadata on a global would be
    useful as an optimization hint as well.  <br>
    <br>
    Philip<br>
    <br>
    <div class="moz-cite-prefix">On 05/06/2016 01:17 PM, Peter
      Collingbourne via llvm-dev wrote:<br>
    </div>
    <blockquote
cite="mid:CAPQLkRjj3kp9Z_fi1Be4-UB18WvT18A26okhcBfxaK_jCUyBMQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div>I'd like to add support for metadata attachments for global
          variables in the same way as we did for functions.</div>
        <div><br>
        </div>
        <div>
          <div>Syntax would be pretty simple:</div>
          <div>@foo = global i32 0, !foo !0, !bar !1</div>
          <div>(the extra commas are required to disambiguate from a
            named metadata on the next line)</div>
        </div>
        <div><br>
        </div>
        <div>Benefits:</div>
        <div>1) Lets us reverse the DIGlobalVariable ->
          GlobalVariable edge, which should hopefully clear the way for
          removing the <a moz-do-not-send="true"
            href="http://llvm.dbg.cu">llvm.dbg.cu</a> named metadata
          node.</div>
        <div><br>
        </div>
        <div>2) Allows for bitset metadata to be attached to globals
          rather than being represented as a named metadata node. This
          means that bitset metadata is naturally dropped when globals
          are dropped, and makes it easier to manipulate bitset metadata
          and build summaries of bitset definitions.</div>
        <div><br>
        </div>
        <div>Comments appreciated.</div>
        <div><br>
        </div>
        <div>Thanks,<br>
          -- <br>
          <div>
            <div dir="ltr">-- 
              <div>Peter</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>