This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Faster for_each_rtx-like iterators


Jeff Law <law@redhat.com> writes:
> On 05/17/14 01:33, Richard Sandiford wrote:
>> I suppose we could put the onus on the users of the iterator to invoke
>> a "handle subrtxes of this code" routine once they know what the code is.
>> That could make things a bit ugly though.  E.g.:
>>
>>    FOR_EACH_SUBRTX (iter, array, expr, NONCONST)
>>      if (GET_CODE (*iter) == VALUE && CSELIB_VAL_PTR (*iter)->uid > minuid)
>>        return true;
>>
>> would become:
>>
>>    FOR_EACH_SUBRTX (iter, array, expr, NONCONST)
>>      if (GET_CODE (*iter) == VALUE)
>>        {
>>          if (CSELIB_VAL_PTR (*iter)->uid > minuid)
>>            return true;
>>          iter.code_is (VALUE);
>>        }
>>
>> It began to feel like premature optimisation.
> Understood.  Thanks for poking at it.
>
> There's something about FOR_EACH_RTX that feels like it needs a rethink, 
> but I haven't managed to put my head around it yet.   I'll put it away 
> for a while.
>
> So as far as the patch itself is concerned, are there any outstanding 
> issues?

No, I just need to find time to brush off the patches and submit them
properly (looks there are 57 in all).  Hope to do that in the next
week or so.

Thanks for the reviews.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]