public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* ssa bootstrap problem on x86 (cmpstrsi_1 pattern)
@ 2000-07-22 21:24 Geoff Keating
  2000-07-23  0:50 ` Mark Mitchell
  0 siblings, 1 reply; 20+ messages in thread
From: Geoff Keating @ 2000-07-22 21:24 UTC (permalink / raw)
  To: gcc, mark

Hi Mark,

I've looked at the SSA bootstrap problem.  It's caused by an insn
in the x86 backend which looks like:

(define_insn "cmpstrsi_1"
  [(set (reg:CC 17)
	(if_then_else:CC (ne (match_operand:SI 2 "register_operand" "c")
			     (const_int 0))
	  (compare:SI (mem:BLK (match_operand:SI 0 "address_operand" "S"))
		      (mem:BLK (match_operand:SI 1 "address_operand" "D")))
	  (const_int 0)))
   (use (match_operand:SI 3 "immediate_operand" "i"))
   (use (reg:CC 17))
   (use (reg:SI 19))
   (clobber (match_dup 0))
   (clobber (match_dup 1))
   (clobber (match_dup 2))]
...)

The problem here is the match_dups.  IMHO, it would be much better if
these were written as match_scratch with '0', '1', and '2'
constraints.

Alternatively, we could detect this case in ssa.c and rewrite the insn
using a SEQUENCE, copying the first three operands.  We should do this
detection only when the MD file contains constructs that make it
necessary (specifically if an insn in the .md file has a MATCH_DUP
between something it uses and something it sets), as there's likely to
be a significant performance penalty.  And it'll be ugly.

Alternatively, we could declare that this pattern is inherently
incompatible with SSA and disable its use if SSA is requested.
-- 
- Geoffrey Keating <geoffk@cygnus.com>

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

end of thread, other threads:[~2000-07-27 18:31 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-22 21:24 ssa bootstrap problem on x86 (cmpstrsi_1 pattern) Geoff Keating
2000-07-23  0:50 ` Mark Mitchell
2000-07-24 11:51   ` Geoff Keating
2000-07-25  3:20     ` Richard Earnshaw
2000-07-26 22:55     ` Mark Mitchell
2000-07-27 12:50       ` Geoff Keating
2000-07-27 13:10         ` Mark Mitchell
2000-07-27 14:48           ` Richard Henderson
2000-07-27 15:13             ` Mark Mitchell
2000-07-27 15:14               ` Richard Henderson
2000-07-27 15:28                 ` Mark Mitchell
2000-07-27 15:35                   ` Richard Henderson
2000-07-27 15:42                     ` Mark Mitchell
2000-07-27 15:46               ` Geoff Keating
2000-07-27 15:44           ` Geoff Keating
2000-07-27 16:01             ` Mark Mitchell
2000-07-27 16:59               ` Joern Rennecke
2000-07-27 17:22                 ` Mark Mitchell
2000-07-27 17:57                   ` Michael Meissner
2000-07-27 18:31                     ` Mark Mitchell

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