[llvm-commits] r64000 breaks PIC16

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Tue Feb 17 10:14:17 PST 2009


Hi Chris,
I was busy with some other stuff and just now got to try this...
The flag SDNPOutFlag is set for subfw but the sinker does not look at
it. I have to also set the flag SDNPSideEffect for it to work correctly.
Now the question is SDNPOutFlag not a reason for keeping the instruction
in its place? Or there may be need to for some corrections in the
sinker?

Thanks
Ali

> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Chris Lattner
> Sent: Wednesday, February 11, 2009 11:09 PM
> To: Commit Messages and Patches for LLVM
> Subject: Re: [llvm-commits] r64000 breaks PIC16
> 
> On Feb 11, 2009, at 4:08 PM, Alireza.Moshtaghi at microchip.com wrote:
> 
> > Looks like the problem is in sinking stuff; I disabled them and it
> > worked.
> > Too me it seems like sinker does not check if the instruction to
> > sink is
> > providing a flag to a successor, if so it shouldn't move the
> > instruction.
> > In our case, blt is linked to subwf only through a flag (no register
> > is
> > used... ) blt is kept in place and subwf is sinked, followed by all
> > instructions that provided to it.
> > How can we check if an instruction is used by a successor through a
> > flag?
> 
> Hi Alireza,
> 
> It looks like subfw isn't declared to implicitly set the flags
> register.  On X86 for example, all the instructions that mutate the
> flags are defined to implicitly set FLAGS, and all instructions that
> read the flags implicitly read FLAGS.  This prevents code motion from
> moving the instructions around.
> 
> -Chris
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list