This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [CFG] Simple loop reckognition improvement
> Hello.
>
> > > + /* Marks registers that have just single simple set in BBS; the relevant
> > > + insn is returned in REGS. */
> > > + static void
> > > + blocks_single_set_registers (bbs, nbbs, regs)
> >
> > Hmm, what exactly this is usefull for?
>
> When we look up the induction variable, we use this (we want it to be
> incremented/decremented exactly once in the loop).
I see, thanks.
Interestingly enought I wasn't able to find the usage of it, but
probably I simply didn't looked enought.
>
> > > !
> > > ! /* Checks that EXPR is invariant provided that INVARIANT_REGS are invariant. */
> > > ! static bool
> > > ! invariant_rtx_wrto_regs_p (expr, invariant_regs)
> > > ! rtx expr;
> > > ! sbitmap invariant_regs;
> > > ! {
> ...
> > > ! return TEST_BIT (invariant_regs, REGNO (expr));
> >
> > How do you handle the unstable expressions, like volatile asm
> > statements/calls?
>
> I don't know :-( The code is mostly stolen from rtlanal.c (modified_between_p).
I guess that then you will need to care UNSPEC_VOLATILE and ASM_OPERANDS
and disqualify these (ASMOPERANDS only with the volatile bit set)
Honza
>
> Zdenek