<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Non linear MemoryDependencyAnalysis"
   href="http://llvm.org/bugs/show_bug.cgi?id=22348">22348</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Non linear MemoryDependencyAnalysis
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Global Analyses
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rafael.espindola@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>bruno.cardoso@gmail.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=13740" name="attach_13740" title="test case generator">attachment 13740</a> <a href="attachment.cgi?id=13740&action=edit" title="test case generator">[details]</a></span>
test case generator

The attached python scripts creates a testcases that look like

  %a0 = alloca i8
  store i8 42, i8* %a0
  %a1 = alloca i8
  store i8 42, i8* %a1
  ...

  %x0 = load i8* %a0
  call void @bar(i8 %x0)
  %x1 = load i8* %a1
  call void @bar(i8 %x1)
  ...

  call void @foo(i8* %a0)
  call void @foo(i8* %a1)

For analyzing each load, alias analysis finds that the pointer is
AliasAnalysis::ModRef. To get better precision we run callCapturesBefore on
each call to see if that call could have written to the memory position.

To implement callCapturesBefore, we need to find if uses of the pointer that
can capture it dominate the call. To do that, we have to walk the basic block
from the start.

One option that might work is to compute a minimal set of instructions that
capture a pointer. Minimal in the sense one does not dominate the other. One
important property of this set is that it would have at most one instruction
per BB.

With that set we can then check if any of those instructions dominate the call.

Another option is to try to speed up dependency computation when both
instructions are in the same BB.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>