[RFA][PATCH][PR tree-optimization/64058] Improve and stabilize sorting of coalesce pairs

Jeff Law law@redhat.com
Wed Mar 16 17:10:00 GMT 2016


On 03/14/2016 07:08 PM, Trevor Saunders wrote:
>>
>> To work around the narrow API in the comparison function we have to either
>> store additional data in each node or have them available in globals.  The
>> former would be horribly wasteful, the latter is just ugly.  I choose the
>> latter in the lazy evaluation of the conflicts version.
>
> its a bit ugly in C++98, but you can give std::sort a random object with
> operator () to compare with.
So we could just wrap the object with a class that has a suitable 
operator?  I like that much more than mucking around with global 
variables.  Let me give that a whirl.

Jeff



More information about the Gcc-patches mailing list