This is the mail archive of the 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: update address taken: don't drop clobbers

On October 16, 2014 7:26:48 PM CEST, Jeff Law <> wrote:
>On 10/16/14 08:11, Marc Glisse wrote:
>> I am looking into that, it must be doable. It seems not too hard, in
>> maybe_register_def, to push all results from make_ssa_name to some
>> data-structure (I don't think new_ssa_names gives me that list, but
>> there may be other ways to get it without introducing yet another
>> and either mark them as used in maybe_replace_use or
>> or better loop through them at the end, checking has_zero_uses (it is
>> bit wasteful, only those coming from clobbers may have 0 uses (or we
>> missed a dce/dse earlier), but it should be fast enough, even walking
>> all ssa_names should be fast enough). If we go to that much trouble,
>> may as well clean them while we are there. It isn't obvious to me how
>> notice unused new ssa_names more easily, to trigger a DCE.
>I'd walk the SSA_NAMEs at the end checking for zero uses.  I'm curious 
>how often that will trigger  :-)

Most often for the initial into SSA I guess. After that only for the cases we rename a variable which does not happen often. SRA and update-address-taken cone to my mind.

BTW, I dislike having multiple DCE implementations...



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