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

Andreas Simbuerger simbuerg at googlemail.com
Fri Jun 13 01:31:26 PDT 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 06/12/2014 07:02 PM, David Peixotto wrote:
>> -----Original Message----- From: llvm-commits-bounces at cs.uiuc.edu
>> [mailto:llvm-commits- bounces at cs.uiuc.edu] On Behalf Of Andreas
>> Simbuerger Sent: Thursday, June 12, 2014 12:25 AM To:
>> llvm-commits at cs.uiuc.edu Subject: [polly] r210753 - Check for an
>> empty error log.
>> 
>> Author: simbuerg Date: Thu Jun 12 02:25:08 2014 New Revision:
>> 210753
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=210753&view=rev 
>> Log: Check for an empty error log.
>> 
>> Fixes #19976.
>> 
>> The error log does not contain an error, in case we reject a
>> candidate without generating a diagnostic message by using
>> invalid<>(...). This is the case for the top-level region of a
>> function.
>> 
>> The patch comes without a test-case because adding a useful one
>> requires additional code just for triggering it. Before the patch
>> it would only trigger, if we try to print the CFG with Scop error
>> annotations.
>> 
>> Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
>> 
>> Modified: polly/trunk/lib/Analysis/ScopDetection.cpp URL:
>> http://llvm.org/viewvc/llvm- 
>> project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=210753&r1=210752&r2
>>
>> 
=210753&view=diff
>> ==========================================================================
>>
>> 
====
>> --- polly/trunk/lib/Analysis/ScopDetection.cpp (original) +++
>> polly/trunk/lib/Analysis/ScopDetection.cpp Thu Jun 12 02:25:08
>> 2014 @@ -219,7 +219,14 @@ std::string
>> ScopDetection::regionIsInval // Get the first error we found.
>> Even in keep-going mode, this is the first // reason that caused
>> the candidate to be rejected. RejectLog Errors =
>> RejectLogs.at(R); -  return (*Errors.begin())->getMessage(); + +
>> // This can happen when we marked a region invalid, but didn't
>> track + // an error for it. +  if (Errors.size() == 0) +
>> return ""; + +  RejectReasonPtr RR = *Errors.begin();  return
>> RR->getMessage(); }
> 
> 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 :-).

Cheers,

> 
> _______________________________________________ llvm-commits
> mailing list llvm-commits at cs.uiuc.edu 
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

- -- 
Andreas Simbürger
University of Passau - Programming Group
http://www.infosun.fim.uni-passau.de/cl/staff/simbuerger/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQEcBAEBAgAGBQJTmrbeAAoJELS7a/6Ti2HYMrgH/iee5kUdxhgZvzUeF4NjjkkT
buPUiG3pqRV0L/pI0+FzuMTtwTj8r2IPbfGezZ/Gw6xBBGUpgtybgrwMJlH0x1mt
9Dco37yPWIoU16cqI1O2CtM6hjQ2s3REOMRZmvfCDxgXj9mOwpXuiyx+peosNNXg
zErW1EDyY6yybQM4ulDZLnXRPHuik5vv6fdyQr7Mx8KzooXwI8P5tKlGpjKYyytK
coFO8zUwIc8VmPlfbpHnUmdEDKWWl2bJ5wObWnxTLK0LD5FmdTtZrV3b5EYSlW1w
h5KfTfVztp0RpDYscoBUkyh+7ya95Kas2757tDeSocxv2egYJlasrHgU30FKLq0=
=dnYa
-----END PGP SIGNATURE-----



More information about the llvm-commits mailing list