<html>
    <head>
      <base href="https://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 --- - [polly] Assert in ScopInfo.cpp:2923: const polly::ScopArrayInfo *polly::Scop::getScopArrayInfo(llvm::Value *, ScopArrayInfo::ARRAYKIND): Assertion `SAI && "No ScopArrayInfo available for this base pointer"' failed."
   href="https://llvm.org/bugs/show_bug.cgi?id=25596">25596</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[polly] Assert in ScopInfo.cpp:2923: const polly::ScopArrayInfo *polly::Scop::getScopArrayInfo(llvm::Value *, ScopArrayInfo::ARRAYKIND): Assertion `SAI && "No ScopArrayInfo available for this base pointer"' failed.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>opt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>lawrence@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Command to reproduce:

opt  -polly-process-unprofitable  -polly-code-generator=isl -polly-scops
-analyze tt.ll

tt.ll is a reduced testcase from a real benchmark.

The problem is introduced by Tobias's commit:
commit 27b0d14dedf5df8eda7f761808520fa5a333af98
Author: Tobias Grosser <<a href="mailto:tobias@grosser.es">tobias@grosser.es</a>>
Date:   Wed Nov 11 08:42:20 2015 +0000

    ScopInfo: Pass domain constraints through error blocks

    Previously, we just skipped error blocks during scop construction. With
    this change we make sure we can construct domains for error blocks such
that
    these domains can be forwarded to subsequent basic blocks.

    This change ensures that basic blocks that post-dominate and are dominated
by
    a basic block that branches to an error condition have the very same
iteration
    domain as the branching basic block. Before, this change we would construct
    a domain that excludes all error conditions. Such domains could become
_very_
    complex and were undesirable to build.

    Another solution would have been to drop these constraints using a
    dominance/post-dominance check instead of modeling the error blocks. Such
    a solution could also work in case of unreachable statements or infinite
    loops in the scop. However, as we currently (to my believe incorrectly)
model
    unreachable basic blocks in the post-dominance tree, such a solution is not
    yet feasible and requires first a change to LLVM's post-dominance tree
    construction.

    This commit addresses the most sever compile time issue reported in:
    <a href="http://llvm.org/PR25458">http://llvm.org/PR25458</a>

    git-svn-id: <a href="https://llvm.org/svn/llvm-project/polly/trunk@252713">https://llvm.org/svn/llvm-project/polly/trunk@252713</a>
91177308-0d34-0410-b5e6-96231b3b80d8


Change the following code in Scop::buildDomainsWithBranchConstraints() from:

    if (containsErrorBlock(RN, getRegion(), LI, DT))
       HasErrorBlock = true;

Back to:
    if (containsErrorBlock(RN, getRegion(), LI, DT))
       HasErrorBlock = true;
      continue;
}

Will fix the Assert, however I don’t think it is the right fix and it will
break two new unit testcase added with this commit and after this commit:
ScopInfo/non-pure-function-calls-causes-dead-blocks.ll and ScopInfo/remarks.ll.</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>