Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[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. #25970

Closed
llvmbot opened this issue Nov 21, 2015 · 3 comments
Assignees
Labels
bugzilla Issues migrated from bugzilla tools:opt

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Nov 21, 2015

Bugzilla Link 25596
Resolution FIXED
Resolved on Nov 22, 2015 05:07
Version trunk
OS Windows NT
Attachments reduced testcase
Reporter LLVM Bugzilla Contributor
CC @jdoerfert

Extended Description

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@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:
llvm/llvm-project#25832 

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.

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 21, 2015

assigned to @tobiasgrosser

@llvmbot
Copy link
Collaborator Author

llvmbot commented Nov 21, 2015

Hi, Tobias, assigning this to you because it is caused by your patch, please reassign if needed, thanks

@tobiasgrosser
Copy link
Contributor

Fixed in r253818. Thanks for the reduced test case.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla tools:opt
Projects
None yet
Development

No branches or pull requests

2 participants