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] Reduce the number of extraneous rtl when expanding mutliply



On Nov 9, 2004, at 10:41 PM, Roger Sayle wrote:



On Tue, 9 Nov 2004, Andrew Pinski wrote:
	* expmed.c (expand_mult_const): If we have an alg_m as the first
	operation and there is only one other operation, then don't copy
	the register into a new one.

I don't think this is safe. I was just about to approve this patch (under the condition that you mention PR middle-end/18293 in the ChangeLog) when I it struck me that we can't use op0 directly as the accumulator, as op0's pseudo mustn't be modified, but the accum pseudo may potentially be modified in place.


It does not matter if it is not safe or not anymore, we can produce
worse code with this patch as the IV-OPT cost analysis is being messed
up by not having the extra copy in there.

I am going to put this on back burner for now.

Thanks,
Andrew Pinski


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