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: [patch] Remove unused code from dse.c.


On 3/29/13, Jeff Law <law@redhat.com> wrote:
> On 03/29/2013 02:24 AM, Lawrence Crowl wrote:
>> This patch has been in the hash-table branch for months.
>> I thought it didn't quite meet the criteria for obvious,
>> but it's close.
>>
>>
>> In dse.c, remove alias hash tables that are never set.
>> Remove conditions that are then never true.
>> Remove functions that are then never called.
>> Remove variables that are then never read.
>>
>> Tested on x86-64.
>>
>>
>> Index: gcc/ChangeLog
>>
>> 2013-03-29  Lawrence Crowl  <crowl@google.com>
>>
>> 	* dse.c (clear_alias_sets): Remove never set.
>> 	(disqualified_clear_alias_sets): Remove never set.
>> 	(clear_alias_mode_pool): Remove never set.
>> 	(dse_step0): Remove condition that is never true.
>> 	(canon_address): Remove condition that is never true.
>> 	(dse_step7): Remove condition that is never true.
>> 	(rest_of_handle_dse): Remove condition that is never true.
>> 	(rest_of_handle_dse::did_global): Remove never read from above.
>> 	(dse_step2_spill): Remove never called from above.
>> 	(dse_step5_spill): Remove never called from above.
>
> At what point did we stop setting clear_alias_sets?  Was that
> intentional or not?

I do not know the answer to either question.

> If that was an intentional change, then this patchset is OK as-is.
>
> If losing the setting of clear_alias_sets was accidental, then I
> think we'll need to dig a bit further.  The whole point of that
> code is to prevent wild reads from "killing" the spill slot stores
> being tracked.
>
> Of course with IRA/LRA all this may not be as important as it
> once was.

My view is that we have already lost the feature.  The code
that populates the set is gone.  The remaining code has probably
suffered bitrot because it is not being tested.  Trying to recreate
the population will probably result in inconsistencies anyway,
necessitating a rewrite of the remaining code.  So, the remaining
code has little value, and might have negative value.

-- 
Lawrence Crowl


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