<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Ping.<br>
      <br>
      On 2/20/2013 7:01 AM, Matthew Curtis wrote:<br>
    </div>
    <blockquote cite="mid:5124C921.5010103@codeaurora.org" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Ping.<br>
        <br>
        On 2/11/2013 7:35 AM, Matthew Curtis wrote:<br>
      </div>
      <blockquote cite="mid:5118F396.3080303@codeaurora.org" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <div class="moz-cite-prefix">Ping.<br>
          <br>
          On 2/6/2013 8:15 AM, Matthew Curtis wrote:<br>
        </div>
        <blockquote cite="mid:5112658A.8060001@codeaurora.org"
          type="cite">Hello all, <br>
          <br>
          This patch helps resolve a couple of issues we encountered
          while <br>
          porting the Polly plug-in to Windows. <br>
          <br>
          The Polly plugin depends on some LLVM Passes which it
          identifies via <br>
          Pass IDs. Pass IDs are implemented as the address of a static
          member <br>
          variable (ID) of the Pass. On Windows however, there seems to
          be a bug <br>
          in the Visual Studio compiler or linker that results in
          multiple <br>
          dll-local copies of this data when referenced directly. The
          result is <br>
          that Polly is unable to locate Passes that are part of the
          executable <br>
          it is being loaded into. <br>
          <br>
          As a work around, this patch adds getters (GetClassPassID) for
          the <br>
          Pass IDs used by Polly. The symbols for the globals are not <br>
          exported. The getters are exported and Polly uses them
          instead. <br>
          <br>
          Removing use of global data by the Polly plug-in also makes it
          <br>
          possible to delay load LLVM symbols from the containing
          executable <br>
          which in turn removes the restriction that the executable have
          a <br>
          specific name (determined at link-time). <br>
          <br>
          We also considered a couple alternatives to this minimal
          patch: <br>
          <br>
          1) Update *all* Passes to provide GetClassPassID in lieu of
          ID. <br>
          <br>
             This leaves the code in the cleanest state and would be a
          good <br>
             choice if starting from scratch. However I started
          implementing it <br>
             and it turns out to have a very large ripple effect. Not
          only does <br>
             it require changing a large number of files in LLVM, but it
          breaks <br>
             source compatibility for passes that are not part of the
          LLVM <br>
             source. <br>
          <br>
             That being said, I'd be willing to do the work if everyone
          thinks <br>
             that's the right thing to do and we're willing break source
          <br>
             compatibility. <br>
          <br>
             Perhaps we could ease the pain by deprecating ID for some
          time <br>
             before removing it. <br>
          <br>
          2) Add GetClassPassID to Passes accessible by plug-ins (i.e.
          those <br>
             under include/llvm), but leave ID as it is. <br>
          <br>
             As with the proposed patch, this may cause confusion
          because there <br>
             are multiple ways of getting a Pass's ID. But at least it's
          not <br>
             specific to the Polly plug-in and other plug-ins on Windows
          may <br>
             benefit. <br>
          <br>
          Thanks, <br>
          Matthew Curtis <br>
          <br>
          BTW, there's a brief related discussion on llvm-dev here: <br>
          <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/058838.html">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/058838.html</a>
          <br>
          <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-February/thread.html#58982">http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-February/thread.html#58982</a>
          <br>
          <br>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <br>
          <pre wrap="">_______________________________________________
llvm-commits mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
        </blockquote>
        <br>
        <br>
        <pre class="moz-signature" cols="72">-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</pre>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
llvm-commits mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
      </blockquote>
      <br>
      <br>
      <pre class="moz-signature" cols="72">-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
llvm-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</pre>
  </body>
</html>