public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl dot tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/34852] [4.3 Regression] Revision 131576 miscompiled 178.galgel Date: Sun, 20 Jan 2008 16:59:00 -0000 [thread overview] Message-ID: <20080120164223.11130.qmail@sourceware.org> (raw) In-Reply-To: <bug-34852-682@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from hjl dot tools at gmail dot com 2008-01-20 16:42 ------- Does this patch make any senses? --- regmove.c.freq 2008-01-17 07:31:56.000000000 -0800 +++ regmove.c 2008-01-20 08:40:34.000000000 -0800 @@ -1695,7 +1695,7 @@ fixup_match_1 (rtx insn, rtx set, rtx sr rtx p; rtx post_inc = 0, post_inc_set = 0, search_end = 0; int success = 0; - int num_calls = 0, s_num_calls = 0; + int num_calls = 0, freq_calls = 0, s_num_calls = 0, s_freq_calls = 0; enum rtx_code code = NOTE; HOST_WIDE_INT insn_const = 0, newconst = 0; rtx overlap = 0; /* need to move insn ? */ @@ -1887,10 +1887,13 @@ fixup_match_1 (rtx insn, rtx set, rtx sr break; num_calls++; + freq_calls += REG_FREQ_FROM_BB (BLOCK_FOR_INSN (p)); if (src_note) - s_num_calls++; - + { + s_num_calls++; + s_freq_calls += REG_FREQ_FROM_BB (BLOCK_FOR_INSN (p)); + } } } @@ -1939,7 +1942,7 @@ fixup_match_1 (rtx insn, rtx set, rtx sr { rtx note = find_reg_note (insn, REG_EQUAL, NULL_RTX); rtx q, set2 = NULL_RTX; - int num_calls2 = 0, s_length2 = 0; + int num_calls2 = 0, s_length2 = 0, freq_calls2 = 0; if (note && CONSTANT_P (XEXP (note, 0))) { @@ -1968,7 +1971,10 @@ fixup_match_1 (rtx insn, rtx set, rtx sr break; } if (CALL_P (p)) - num_calls2++; + { + num_calls2++; + freq_calls2 += REG_FREQ_FROM_BB (BLOCK_FOR_INSN (p)); + } } if (q && set2 && SET_DEST (set2) == src && CONSTANT_P (SET_SRC (set2)) && validate_change (insn, &SET_SRC (set), XEXP (note, 0), 0)) @@ -1976,6 +1982,7 @@ fixup_match_1 (rtx insn, rtx set, rtx sr delete_insn (q); INC_REG_N_SETS (REGNO (src), -1); REG_N_CALLS_CROSSED (REGNO (src)) -= num_calls2; + REG_FREQ_CALLS_CROSSED (REGNO (src)) -= freq_calls2; REG_LIVE_LENGTH (REGNO (src)) -= s_length2; insn_const = 0; } @@ -2044,12 +2051,14 @@ fixup_match_1 (rtx insn, rtx set, rtx sr REG_NOTES (p) = src_note; REG_N_CALLS_CROSSED (REGNO (src)) += s_num_calls; + REG_FREQ_CALLS_CROSSED (REGNO (src)) += s_freq_calls; } INC_REG_N_SETS (REGNO (src), 1); INC_REG_N_SETS (REGNO (dst), -1); REG_N_CALLS_CROSSED (REGNO (dst)) -= num_calls; + REG_FREQ_CALLS_CROSSED (REGNO (dst)) -= num_calls; REG_LIVE_LENGTH (REGNO (src)) += s_length; if (REG_LIVE_LENGTH (REGNO (dst)) >= 0) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34852
next prev parent reply other threads:[~2008-01-20 16:43 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-18 15:35 [Bug middle-end/34852] New: " hjl dot tools at gmail dot com 2008-01-18 16:11 ` [Bug middle-end/34852] " rguenth at gcc dot gnu dot org 2008-01-18 20:45 ` pinskia at gcc dot gnu dot org 2008-01-20 12:25 ` hubicka at gcc dot gnu dot org 2008-01-20 15:53 ` ubizjak at gmail dot com 2008-01-20 16:59 ` hjl dot tools at gmail dot com [this message] 2008-01-20 16:59 ` hjl dot tools at gmail dot com 2008-01-20 17:00 ` hjl dot tools at gmail dot com 2008-01-21 4:26 ` hjl dot tools at gmail dot com 2008-01-21 10:05 ` hubicka at ucw dot cz 2008-01-21 10:08 ` hubicka at ucw dot cz 2008-01-21 10:11 ` hubicka at ucw dot cz 2008-01-21 10:16 ` hubicka at ucw dot cz 2008-01-21 15:36 ` hjl dot tools at gmail dot com 2008-01-21 16:14 ` hjl dot tools at gmail dot com 2008-01-21 16:58 ` hubicka at ucw dot cz 2008-01-21 21:00 ` hjl dot tools at gmail dot com 2008-01-22 20:22 ` rguenth at gcc dot gnu dot org 2008-01-22 20:30 ` hubicka at ucw dot cz 2008-01-23 22:33 ` rguenth at gcc dot gnu dot org
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=20080120164223.11130.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).