public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: Ulrich.Weigand@de.ibm.com, rth@redhat.com, gcc@gcc.gnu.org, aj@suse.de
Subject: Profiling on S390
Date: Fri, 18 Apr 2003 12:11:00 -0000	[thread overview]
Message-ID: <20030418104131.GL11098@kam.mff.cuni.cz> (raw)

Hi,
arc profiling on s390 is currently broken because of strcmp expander.
What it does is to emit:
      expand_end_loop ();

      emit_insn ((*gen_short) (op0, op1, convert_to_mode
	    (word_mode, count, 1)));
      emit_label (end_label);

      emit_insn ((*gen_result) (target));

Where gen_result expands into:
(insn 43 42 44 (nil) (set (reg:SI 44)
     (compare:SI (reg:CCS 33 %cc)
            (const_int 0 [0x0]))) -1 (nil)
	        (nil))
Where CC is intialized via the conditional jumps into the label.

It looks very unsafe for me - GCC assumes at many places that CC is not
live accross boundaries.  What happens is that profiler insert adddi on
the begining of BB clobberring the flags.  But in general gcc will
happily reverse the conditional when reordering basic blocks and do
other transformations that can break such construct.

What would be the best sollution?

Honza

             reply	other threads:[~2003-04-18 10:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-18 12:11 Jan Hubicka [this message]
2003-04-22 22:34 Ulrich Weigand
2003-04-22 23:13 ` Richard Henderson
2003-04-23 10:59   ` Jan Hubicka
2003-04-23 18:26     ` Richard Henderson
2003-04-23 19:18       ` Jan Hubicka
2003-04-23 19:56         ` Richard Henderson
2003-04-23 21:29           ` Jan Hubicka
2003-04-23 22:33             ` Richard Henderson
2003-04-25 17:01               ` Jan Hubicka
2003-04-23 12:19 Ulrich Weigand
2003-04-23 18:18 Ulrich Weigand
2003-04-23 21:50 Ulrich Weigand
2003-04-23 22:08 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030418104131.GL11098@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=aj@suse.de \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).