<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 03/14/2017 05:56 AM, Andreas
      Scherman via llvm-dev wrote:<br>
    </div>
    <blockquote
cite="mid:CAFRBxJdH4sBbrTyekQaOXgKxE+4Oh5qo_xE8Upp5vM+LqhZiOg@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">Hi!
        <div><br>
        </div>
        <div>The example in the docs[1] states that the LLVM concurrency
          model does not allow the hoisting of loads and introduction of
          local variables due to another thread potentially altering the
          value whilst running the function. Given that I have analysis
          which shows that the memory location of variable <i>x </i>can
          not be concurrently accessed -- how would I inform the LLVM
          transformation passes of this information?</div>
      </div>
    </blockquote>
    <br>
    You'll need to modify the LICM code to use this information (look
    for calls to isSimple()).<br>
    <br>
    Can you describe what your analysis does?<br>
    <br>
     -Hal<br>
    <br>
    <blockquote
cite="mid:CAFRBxJdH4sBbrTyekQaOXgKxE+4Oh5qo_xE8Upp5vM+LqhZiOg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I tried injecting this information in to the AliasAnalysis
          under getModRefInfo() by returning NoModref for the memory
          locations I knew not to be accessed concurrently. However, it
          seemed that the usages of the variables was not respected in
          that case, such that we could reorder variables and change the
          semantics of the program.</div>
        <div><br>
        </div>
        <div>
          <div>Thanks in advance,</div>
        </div>
        <div><br>
        </div>
        <div>Andreas</div>
        <div><br>
        </div>
        <div>[1]: <a moz-do-not-send="true"
            href="http://llvm.org/docs/Atomics.html#optimization-outside-atomic">http://llvm.org/docs/Atomics.html#optimization-outside-atomic</a></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>
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </body>
</html>