Re: RFC: extend cprop_hardreg into a global pass

2012-07-31 Thread Bin.Cheng
>> Though the two pseudo-regs >> are connected by reg-move insn and contains same value afterward, >> the two live ranges(i.e. allocnos) are conflict with each other, thus IRA >> cannot allocate same hard register for them. > > If two allocnos have the same value, why can't IRA coalesce them? I don

Re: RFC: extend cprop_hardreg into a global pass

2012-07-31 Thread Steven Bosscher
On Tue, Jul 31, 2012 at 4:06 PM, Bin.Cheng wrote: >> >> For the other PR you mentioned, that looks like a register allocation >> regression, that should be addresses in IRA rather than in regcprop. > > not sure whether this is a RA regression. Well, it worked before, and now it doesn't. Maybe RA

Re: RFC: extend cprop_hardreg into a global pass

2012-07-31 Thread Bin.Cheng
> > For the other PR you mentioned, that looks like a register allocation > regression, that should be addresses in IRA rather than in regcprop. not sure whether this is a RA regression. Though the two pseudo-regs are connected by reg-move insn and contains same value afterward, the two live range

Re: RFC: extend cprop_hardreg into a global pass

2012-07-25 Thread Steven Bosscher
On Wed, Jul 25, 2012 at 3:35 AM, Bin.Cheng wrote: > On Wed, Jul 25, 2012 at 2:14 AM, Steven Bosscher > wrote: >> Bin Cheng wrote: >>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44025 >> >> You could foster-parent and fix the attached patch to address this issue. >> (I'm not interested in pursui

Re: RFC: extend cprop_hardreg into a global pass

2012-07-24 Thread Bin.Cheng
On Wed, Jul 25, 2012 at 2:14 AM, Steven Bosscher wrote: > Bin Cheng wrote: >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44025 > > You could foster-parent and fix the attached patch to address this issue. > (I'm not interested in pursuing this further myself.) Thanks for your comments. I haven't

Re: RFC: extend cprop_hardreg into a global pass

2012-07-24 Thread Steven Bosscher
Bin Cheng wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44025 You could foster-parent and fix the attached patch to address this issue. (I'm not interested in pursuing this further myself.) Ciao! Steven cse_uncprop.diff Description: Binary data

Re: RFC: extend cprop_hardreg into a global pass

2012-07-24 Thread Steven Bosscher
Bin Cheng wrote: > I have already worked out an initial patch to extend the pass in two ways: > 1. extend it into a global pass; > 2. make it handle const propagation; You'll find this is not quite so easy as what you describe. Changing constants after reload is harder and less effective than befo

RFC: extend cprop_hardreg into a global pass

2012-07-24 Thread Bin.Cheng
Hi, Currently GCC does hard register forward propagation in pass_cprop_hardreg to remove as many dependencies as possible and delete redundant copies, but this pass is limited in each basic block so cannot do any global propagation. While as a fact, GCC does generate redundant copies/loads crossing