[PATCH] D45066: [Polly] [ScopInfo] Remove bail out condition in buildMinMaxAccess()
SAHIL GIRISH YERAWAR via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 13 10:09:12 PDT 2018
cs15btech11044 marked an inline comment as done.
cs15btech11044 added inline comments.
================
Comment at: lib/Analysis/ScopInfo.cpp:2351-2352
// allocated array but we will never dereference it anyway.
- assert(MaxPMA.dim(isl::dim::out) && "Assumed at least one output dimension");
+ assert(((!MaxPMA || !MinPMA) || MaxPMA.dim(isl::dim::out)) &&
+ "Assumed at least one output dimension");
+
----------------
Meinersbur wrote:
> You should decide between one of the following (not a mix of both):
> 1. Check for an error and return before reaching the assert
> 2. Let the assertion pass in case of `MaxPMA` being NULL.
>
> Please tell me if you are unsure what to do.
>
I am a bit unsure about how to proceed.
I am thinking of checking `MaxPMA` and `MinPMA` before assertion and returning error if either of them are `NULL`, along with removing these checks from the assertion.
Would that be suitable?
Repository:
rPLO Polly
https://reviews.llvm.org/D45066
More information about the llvm-commits
mailing list