This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] operand_equal_p with valueization
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 26 May 2015 09:52:25 +0200 (CEST)
- Subject: Re: [RFC] operand_equal_p with valueization
- Authentication-results: sourceware.org; auth=none
- References: <20150522123600 dot GE91616 at kam dot mff dot cuni dot cz> <alpine dot LSU dot 2 dot 11 dot 1505221528210 dot 30088 at zhemvz dot fhfr dot qr> <20150522135338 dot GF75713 at kam dot mff dot cuni dot cz>
On Fri, 22 May 2015, Jan Hubicka wrote:
> >
> > And no, I'm hesitant to change operand_equal_p too much. It's
> > very much deep-rooted into GENERIC.
>
> OK, as another option, i can bring relevant logic from operand_equal_p
> to ipa-icf and separate it into the compare_operand class like I did.
> Use it in ipa-icf-gimple now and we can slowly turn other uses of
> operand_equal into the compare_operand users in middle end.
>
> I agree that operand_equal is bit crazy code and it does not handle quite few
> things we could do at gimple. I have nothing against going this direction.
> (after all I do not like touching fold-const much becuase it works on generic,
> gimple and FE non-generic and it is not well specified what it should do)
Yes, I've played with the idea of a GIMPLE specific operand_equal_p
multiple times but then the changes required to operand_equal_p were
small all the times. And having one piece of code that does sth is
always good ...
We might turn operand_equal_p to a "worker" (template?) that
operand_equal_p and gimple_operand_equal_p can share (with an extra
flag whether to turn on GIMPLE stuff and/or valueization). And
then simply provide explicit instantiations for the original
operand_equal_p and a new gimple_operand_equal_p.
Of course we'll only know if we like that when seeing a patch that
does this ;0)
Richard.