This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: combine question
- To: Denis Chertykov <denis at medo dot fov dot uni-mb dot si>
- Subject: Re: combine question
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Sat, 22 May 1999 15:00:55 -0600
- cc: egcs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199905221838.WAA19198@blizard.overta.ru>you write:
> Today I'm put `debug_rtx (*newpat)' to the top of `recog_for_combine'
> function.
> Then compile file:
>
> #include <stdarg.h>
> va_tst (va_list args)
> {
> foo_char (va_arg(args, char));
> foo_int (va_arg(args, int));
> }
>
> I get this pattern (and many others) in output:
> (parallel[
> (set (reg:QI 44)
> (mem:QI (reg/v:HI 40)))
> (set (reg/v:HI 40)
> (plus:HI (reg/v:HI 40)
> (const_int 1)))
> ] )
>
> Why combine do not reformat this pattern to:
> (set (reg) (mem (post-inc (reg)))) ?
Quite possibly nobody bothered. In theory this should have been
identified as a post-inc opportunity by flow.
You should find out why flow did not create an auto-inc addresing
mode for this case.
> Can I add simple code for reformatting to the `recog_for_combine'
> before `recog' called ?
>
> Must I update NOTES (add REG_INC NOTE) ?
I think your time would be better spent finding out why flow did
not do this. If you can get flow to do it, it will take care of the
REG_INC notes.
If you end up trying to do this in combine you will need to update/create
the REG_INC notes.
jeff