On November 9, 2015 6:35:20 PM GMT+01:00, Bernd Schmidt <bschm...@redhat.com> 
wrote:
>On 11/07/2015 03:44 PM, Kelvin Nilsen wrote:

>> +bool
>> +in_loop_p (basic_block block, struct loop *loop_ptr)
>> +{
>> +  basic_block *bbs = get_loop_body (loop_ptr);
>> +  bool result = false;
>> +
>> +  for (unsigned int i = 0; i < loop_ptr->num_nodes; i++)
>> +    {
>> +      if (bbs[i] == block)
>> +    result = true;
>> +    }
>
>I think something that starts with bb->loop_father and iterates
>outwards 
>would be more efficient.

flow_bb_inside_loop_p() ?

Cheers,

Reply via email to