Roman Zippel wrote:
> Hi,
>
> On Wed, 20 Jun 2007, Paolo Bonzini wrote:
>
>   
>>> This is one of the places where i slavishly copied what flow did.  if
>>> you want to change this, go test it on at least 7 platforms and fix all
>>> of the problems that it causes.
>>>       
>> I see. Can one of you recap how it relates to the m68k problem, though? :-)
>>     
>
> I have basically this sequence of instructions:
>
> (call_insn 1 (set (%d0) (call ...)))
>
> (insn 2 (set (x) (%d0)))
>
> (call_insn 3 (set (%a0) (call ...)))
>
> ... 
>
> (call_insn/j 5 (set (%a0) (call ...)))
>
> The immediate problem is that there is no REG_DEAD note generated for insn 
> 2. reload calls the code in caller-save.c, because some other call 
> clobbered register is associated with a pseudo and needs to be preserved 
> across a call. It builds live information based on the REG_DEAD notes and 
> is confused that %d0 doesn't die in insn 3.
>
> There is one problem that the live out information in this block is 
> incorrect, as it includes the return register, but the function is exited 
> via sibcall and there is no code to set the return register. This is made 
> a little more complex, as on m68k the return value here is returned in 
> %d0/%a0, so %d0 is live at the end of the block.
> One possible fix is to clear the uses at the edge to the exit (what the 
> small patch previously posted does).
>
> The second problem (and the one in discussion right now) is that I think 
> %d0 should have been clobbered already by any of the later calls, which is 
> at least what reload and many other passes assume, they had to manually 
> add this information, if they wanted to use the dataflow information.
>
> bye, Roman
>   
I am going to plead insanity here and throw myself on the mercy of the
court.
there is a bug in generating reg dead notes. 

i will get a fix out soon.

kenny

Reply via email to