[llvm-bugs] [Bug 25596] 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.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Nov 21 13:19:49 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25596

            Bug ID: 25596
           Summary: [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.
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: opt
          Assignee: unassignedbugs at nondot.org
          Reporter: lawrence at codeaurora.org
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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 <tobias at grosser.es>
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:
    http://llvm.org/PR25458

    git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@252713
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151121/d78f7c95/attachment.html>


More information about the llvm-bugs mailing list