This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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).

> > ! 
> > ! /* 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).

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]