This is the mail archive of the mailing list for the binutils 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: [patch][gold] Remove empty Merge_map class

ping. This is just deleting dead code.

On 17 February 2015 at 10:56, Rafael EspÃndola
<> wrote:
> Ping. A rebased patch is attached.
> On 6 February 2015 at 18:32, Rafael EspÃndola
> <> wrote:
>> When looking at the constant merging code to see if the
>> mapping could be reused for gc, the most confusing part for
>> me was the empty Merge_map class.
>> It is only used as a key to implement is_merge_section_for (which is
>> only used by find_starting_output_address).
>> Since it is just a key, we can use the Output_section_data as a key
>> instead. This patch does that. IMHO removing the indirection makes
>> things a bit easier to understand. It also removes the need for the
>> virtual do_is_merge_section_for.
>> Last but not least, it makes some inefficiencies easier to spot. For
>> example,  Output_merge_data::do_add_input_section handles only one
>> input section and therefore only one merge map, but it does
>>  object->add_merge_mapping(this, shndx, i, entsize, k);
>> in a loop. It could extract Input_merge_map* before the loop.
>> Cheers,
>> Rafael

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