public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* peephole2 and insn question
@ 2002-10-22  9:50 Dmitry
  2002-10-22 12:12 ` Richard Henderson
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry @ 2002-10-22  9:50 UTC (permalink / raw)
  To: gcc

HI Folks,

Just faced with some problem:
If I define peephole2 and use 'insn' variable in condition, to which 
instruction parrern in a sequence 'insn' refers?

From gccint.info (Node: define_peephole) follows, that insn refers to the last 
insn being matched. 
How about peephole2 ?  

If I stick on a condition in a debugger I see that in p2 'insn' refers to the 
first insn being matched.

Am I wrong?

cheers,
Dmitry.
 
/********************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild      UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise Information Sys 
      (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky prospekt,   20 / 44
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,   Russia
   (il),-''  (li),'  ((!.-'             +7 (812)  3468202, 5585314
 ********************************************************************/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: peephole2 and insn question
  2002-10-22  9:50 peephole2 and insn question Dmitry
@ 2002-10-22 12:12 ` Richard Henderson
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2002-10-22 12:12 UTC (permalink / raw)
  To: Dmitry; +Cc: gcc

On Tue, Oct 22, 2002 at 04:51:33PM +0400, Dmitry wrote:
> If I define peephole2 and use 'insn' variable in condition, to which 
> instruction parrern in a sequence 'insn' refers?

I don't remember; I think the first.

Use peep2_next_insn(i), 0 <= i < n, to refer to the
N instructions of the sequence.


r~

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-22 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22  9:50 peephole2 and insn question Dmitry
2002-10-22 12:12 ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).