Hi Segher,

On Tue, Mar 31, 2020 at 04:49:53PM -0500, Segher Boessenkool wrote:
> Hi Jozef,
> 
> On Thu, Mar 26, 2020 at 12:33:38PM +0000, Jozef Lawrynowicz wrote:
> > In some cases, I can fix the CFA offset by marking these epilogue insns as
> > frame_related anyway, and adding reg notes which describe the stack pointer
> > operations. For some other epilogue insns, marking them frame_related 
> > results in
> > an ICE, which I'm assuming comes back to the fact that epilogue insns 
> > shouldn't
> > be marked frame related.
> 
> > What is the standard way for updating the CFA offset in the epilogue?
> 
> What you already say you do: add notes, and often frame_related is set
> as well.  I agree that shouldn't be done, but it often is harmless.
> 
> You need reg_notes for more than just the stack updates: importantly,
> also for the restores of any saved register.

Thanks for the advice, indeed the reason I was having problems was
because not all stack operations were properly annotated with reg notes.

The reason I was seeing the ICE was because of unspec insns which were marked
as frame related but didn't have accompanything reg notes, of course it
is now clear that stack modifications in an unspec need to be explicitly
described.

(Apologies for the late response, but I figure I may as well document
the conclusion came to with this.)

Jozef

> 
> 
> Segher

Reply via email to