[polly] r210753 - Check for an empty error log.

David Peixotto dpeixott at codeaurora.org
Fri Jun 13 14:46:21 PDT 2014


> > Sorry for the late review, but it seems like it would be better to
> > make sure we track a reject reason for each invalid region. How about
> > adding a reject reason for the top level region to fix the bug?
> 
> Yep would be doable, but it would be a pretty useless diagnostic
> information compared to the others available.
> 
> One consideration: Generating diagnostic info for the top-level region
> should be a little bit slower than this test for an empty log (not tested,
> though).
> 
> I'm good either way. If you insist on having a diagnostic for it, gimme a
> shout and I add one for this :-).

I think it is a good idea to cover all possible failures. Look at this
example:

__attribute__((noreturn)) int bar();
void foo(int *A, int N) {
  for (int i = 0; i < N; ++i)
    if (A[i] == 0)
      bar();
    else
      A[i] += 1;
}

Here we only build one region (the top-level region). If we do not report on
the top level region then we may have nothing to tell the user about this
function and that can be confusing because we do not build any scops, but
also do not say why.

If we should always have at least one sub-region then I don't think we need
to report on the top level, but otherwise I think we should report it for
completeness.





More information about the llvm-commits mailing list