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]

Re: ia32: genrecog & peep2


> > (define_peephole2
> >   [(match_scratch:SI 6 "r")
> >    (set (match_operand:SI 0 "register_operand" "")
> >         (match_operand:SI 1 "general_operand" ""))
> >    (match_scratch:SI 7 "r")
> >    (set (match_operand:SI 2 "register_operand" "")
> >         (match_operand:SI 3 "register_operand" ""))
> >    (match_dup 7)
> >    (match_scratch:SI 8 "r")
> >    (match_dup 6)
> >    (set (match_operand:SI 4 "register_operand" "")
> >         (match_operand:SI 5 "register_operand" ""))]
> 
> I see what you're after.  Yes, this does seem necessary.  Do you 
> think it would be clearer to use
> 
> 	(clobber (match_scratch:SI 6 "r"))
> and
> 	(use (match_dup 6))
> 
> in the sequence?

I'm not sure whether it's clearer.  My problem with that is that it looks
too much like a "real" insn or part of one.  I've thought about adding new
rtx codes like "allocate" and "deallocate"; however I decided against it
because it's kind of overkill.  It would make the thing easier to read,
though.

> Good eyes.  Another thing I just thought of is that while we can
> match a CALL_INSN, we can't if we've crossed an EH boundary.

How can we recognize a CALL_INSN that may throw?  By checking whether it has
a REG_EH_REGION note?

Another problem which seems unrelated: while experimenting with the
peephole2 pass I managed to get the compiler to blow up in update_flow_info
because it didn't know what to do with a REG_NOALIAS note.  That is probably
not a new or an immediate problem, but should be fixed.  Should we just
remove the note?

Bernd


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