<html>
    <head>
      <base href="http://bugs.llvm.org/">
    </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 - Too many scalar dependencies in loops with load-hoisted bounds"
   href="http://bugs.llvm.org/show_bug.cgi?id=32532">32532</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Too many scalar dependencies in loops with load-hoisted bounds
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Polly
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

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

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Optimizer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>polly-dev@googlegroups.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm@meinersbur.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18227" name="attach_18227" title="reduction_looprotate_loadhoist.ll">attachment 18227</a> <a href="attachment.cgi?id=18227&action=edit" title="reduction_looprotate_loadhoist.ll">[details]</a></span>
reduction_looprotate_loadhoist.ll

The attached file reduction_looprotate_loadhoist.ll has too many scalar
dependencies. In particular, it passes the loop induction variable %i as scalar
accesses even though the loop induction variable will be generated by
IslNodeBuilder and the old value is never referenced.

$ opt reduction_looprotate_loadhoist.ll -polly-process-unprofitable
-polly-invariant-load-hoisting -polly-scops -analyze

    Statements {
        Stmt_reduction_preheader
            Domain :=
                [Start] -> { Stmt_reduction_preheader[i0] : 0 <= i0 <= 1 };
            Schedule :=
                [Start] -> { Stmt_reduction_preheader[i0] -> [i0, 0, 0, 0] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_i__phi[] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_preheader[i0] -> MemRef_phi__phi[]
};
        Stmt_reduction_for
            Domain :=
                [Start] -> { Stmt_reduction_for[i0, i1] : 0 <= i0 <= 1 and 0 <
i1 <= 3 - Start; Stmt_reduction_for[i0, 0] : 0 <= i0 <= 1 };
            Schedule :=
                [Start] -> { Stmt_reduction_for[i0, i1] -> [i0, 1, i1, 0] : 0 <
i1 <= 3 - Start; Stmt_reduction_for[i0, 0] -> [i0, 1, 0, 0] };
            ReadAccess :=       [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_for[i0, i1] -> MemRef_i__phi[] };
            ReadAccess :=       [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_for[i0, i1] -> MemRef_phi__phi[] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_for[i0, i1] -> MemRef_phi[] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_for[i0, i1] -> MemRef_i[] };
        Stmt_body
            Domain :=
                [Start] -> { Stmt_body[i0, i1] : 0 <= i0 <= 1 and 0 < i1 <= 3 -
Start; Stmt_body[i0, 0] : 0 <= i0 <= 1 };
            Schedule :=
                [Start] -> { Stmt_body[i0, i1] -> [i0, 1, i1, 1] : 0 < i1 <= 3
- Start; Stmt_body[i0, 0] -> [i0, 1, 0, 1] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_body[i0, i1] -> MemRef_mul[] };
            ReadAccess :=       [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_body[i0, i1] -> MemRef_phi[] };
        Stmt_reduction_inc
            Domain :=
                [Start] -> { Stmt_reduction_inc[i0, i1] : 0 <= i0 <= 1 and 0 <
i1 <= 3 - Start; Stmt_reduction_inc[i0, 0] : 0 <= i0 <= 1 };
            Schedule :=
                [Start] -> { Stmt_reduction_inc[i0, i1] -> [i0, 1, i1, 2] : 0 <
i1 <= 3 - Start; Stmt_reduction_inc[i0, 0] -> [i0, 1, 0, 2] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_inc[i0, i1] -> MemRef_i__phi[] };
            ReadAccess :=       [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_inc[i0, i1] -> MemRef_mul[] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_inc[i0, i1] -> MemRef_phi__phi[] };
            ReadAccess :=       [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_inc[i0, i1] -> MemRef_i[] };
        Stmt_reduction_exit
            Domain :=
                [Start] -> { Stmt_reduction_exit[i0] : 0 <= i0 <= 1 };
            Schedule :=
                [Start] -> { Stmt_reduction_exit[i0] -> [i0, 2, 0, 0] };
            MustWriteAccess :=  [Reduction Type: NONE] [Scalar: 0]
                [Start] -> { Stmt_reduction_exit[i0] -> MemRef_A[i0] };
            ReadAccess :=       [Reduction Type: NONE] [Scalar: 1]
                [Start] -> { Stmt_reduction_exit[i0] -> MemRef_mul[] };
    }</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>