This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Incomplete Draft Patches to Correct Errors in Loop Unrolling Frequencies (bugzilla problem 68212)
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: Bernd Schmidt <bschmidt at redhat dot com>,Kelvin Nilsen <kdnilsen at linux dot vnet dot ibm dot com>,gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Nov 2015 10:56:38 +0100
- Subject: Re: RFC: Incomplete Draft Patches to Correct Errors in Loop Unrolling Frequencies (bugzilla problem 68212)
- Authentication-results: sourceware.org; auth=none
- References: <563E0E67 dot 1090101 at linux dot vnet dot ibm dot com> <5640D958 dot 7010300 at redhat dot com>
On November 9, 2015 6:35:20 PM GMT+01:00, Bernd Schmidt <bschmidt@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,