Re: regcprop and REG_DEAD

2011-05-13 Thread Paul Koning
On May 13, 2011, at 8:56 PM, Andrew Pinski wrote: > On Fri, May 13, 2011 at 5:51 PM, Paul Koning wrote: >> I was using 4.5.1 which has the bug. I thought later ones have it too, but >> it looks like I misread the assembly output. (The fix makes a subtle >> change: beq becomes beql.) > > A g

Re: regcprop and REG_DEAD

2011-05-13 Thread Andrew Pinski
On Fri, May 13, 2011 at 5:51 PM, Paul Koning wrote: > I was using 4.5.1 which has the bug.  I thought later ones have it too, but > it looks like I misread the assembly output.  (The fix makes a subtle change: > beq becomes beql.) A good question is why does XLR have branch linkely enabled anyw

Re: regcprop and REG_DEAD

2011-05-13 Thread Paul Koning
On May 13, 2011, at 5:29 PM, Eric Botcazou wrote: >> rest_of_pass_free_cfg calls df_analyze but it doesn't call >> df_note_add_problem. Is that the issue? I see that some other passes >> (like regrename) do a sequence of df_xyz calls. > > It does now, you have outdated sources. I was using 4.

Re: regcprop and REG_DEAD

2011-05-13 Thread Eric Botcazou
> rest_of_pass_free_cfg calls df_analyze but it doesn't call > df_note_add_problem. Is that the issue? I see that some other passes > (like regrename) do a sequence of df_xyz calls. It does now, you have outdated sources. -- Eric Botcazou

Re: regcprop and REG_DEAD

2011-05-13 Thread Paul Koning
On May 13, 2011, at 5:30 PM, Paul Koning wrote: > > On May 13, 2011, at 4:57 PM, Eric Botcazou wrote: > >>> Question: that code doesn't appear to touch REG_DEAD notes at all. Is that >>> right? From the definition of REG_DEAD, it seems that rewriting a later >>> insns to use register x means

Re: regcprop and REG_DEAD

2011-05-13 Thread Eric Botcazou
> A later pass (machdep) relies on the notes, so the fact that the actual > register liveness no longer matches what the REG_DEAD notes imply seems to > be a problem. Again, if a pass consumes these notes, it must df_note_add_problem() on entry. For machine_reorg, this is too late because the CFG

Re: regcprop and REG_DEAD

2011-05-13 Thread Paul Koning
On May 13, 2011, at 4:57 PM, Eric Botcazou wrote: >> Question: that code doesn't appear to touch REG_DEAD notes at all. Is that >> right? From the definition of REG_DEAD, it seems that rewriting a later >> insns to use register x means that a preceding (REG_DEAD x) needs to be >> deleted. Or m

Re: regcprop and REG_DEAD

2011-05-13 Thread Paul Koning
On May 13, 2011, at 4:57 PM, Eric Botcazou wrote: >> Question: that code doesn't appear to touch REG_DEAD notes at all. Is that >> right? From the definition of REG_DEAD, it seems that rewriting a later >> insns to use register x means that a preceding (REG_DEAD x) needs to be >> deleted. Or m

Re: regcprop and REG_DEAD

2011-05-13 Thread Eric Botcazou
> Question: that code doesn't appear to touch REG_DEAD notes at all. Is that > right? From the definition of REG_DEAD, it seems that rewriting a later > insns to use register x means that a preceding (REG_DEAD x) needs to be > deleted. Or moved to the later insn, perhaps. If the pass doesn't co

regcprop and REG_DEAD

2011-05-13 Thread Paul Koning
In attempting to find out what's wrong in PR 48990 (wrong code for MIPS N32 -O1) it looks to me like the issue is that a register is marked dead, then still used afterwards. This causes the delay slot fill logic to make a wrong decision (it brings a load instruction that overwrites the "dead" r