On Tue, Jun 30, 2015 at 8:12 AM, Tobias Grosser <tob...@grosser.es> wrote:
> On 06/30/2015 02:12 AM, Sebastian Pop wrote:
>>
>> On Mon, Jun 29, 2015 at 3:58 PM, Aditya Kumar <hiradi...@msn.com> wrote:
>>>
>>> No regressions.
>>>
>>> 2015-06-29  Aditya Kumar  <aditya...@samsung.com>
>>>              Sebastian Pop <s....@samsung.com>
>>>
>>>          * graphite-scop-detection.c (stmt_simple_for_scop_p): Bail out
>>> in case of a return statement.
>>
>>
>> Looks good to me.
>> Tobi, do you see a good reason not to cut scops at return stmts?
>
>
> Return stmts in a SCoP are definitely invalid. Now, as in my last email, I
> wonder why this is not a positive list. There are probably a lot of gimple
> codes that are invalid inside scops. By default we should refuse everything
> we do _not_ know.

The function already does that.  It just accepted GIMPLE_RETURN as valid.

IMHO a

   default:
     gcc_unreachable ();

is the best style as it forces you to list everything explicitely.
The function should
be refactored to do all codes in the switch stmt (GIMPLE_ASMs are handled
in a if, so are GIMPLE_DEBUG for example).

Richard.

> Best,
> Tobias

Reply via email to