public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chen Gang <xili_gchen_5257@hotmail.com>
To: Bernd Schmidt <bernds@codesourcery.com>,
	Jeff Law <law@redhat.com>,  Richard Henderson <rth@redhat.com>,
	jzhang918@gmail.com
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] config/bfin/bfin.c (hwloop_optimize): Use return false instead of gcc_assert for checking jump_insn.
Date: Wed, 01 Jul 2015 15:26:00 -0000	[thread overview]
Message-ID: <BLU437-SMTP3467213F571FF59E9208E4B9A80@phx.gbl> (raw)
In-Reply-To: <5593F08D.6090107@codesourcery.com>

On 7/1/15 21:52, Bernd Schmidt wrote:
> On 07/01/2015 03:04 AM, Chen Gang wrote:
> 
>> For me, the more details are:
>>
>>   - The insns have 2 loops which can be lsetup optimized.
>>
>>   - After hwloop_optimize finishes 1st lsetup optimization, it generates
>>     new lsetup insn which appends to jump insn in the basic block (which
>>     causes the insns are not 'standard' but OK for code generation).
> 
> The problem is that you can't append anything to a basic block after a jump. You need to create a new one. This problem doesn't usually show up since nothing ever looks at the basic block again, unless both directions from the conditional branch happen to branch to lsetup candidate loops.
>

OK, thanks. What you said sound reasonable to me.
 
> Below is a patch. Can you test this with anything you have beyond the testsuite?
> 

It can fix this issue (Bug66620), let the insns standard, and can build
the bfin kernel with allmodconfig successfully (although for bfin kernel
members, they stick to allmodconfig is not a good idea for bfin kernel).

It finished lsetup optimization for one loop, but still left the other (
get the same .s as my original fix). for 2nd times in hwloop_optimize, it
return false. And welcome any additional ideas for it.

For me, my original fix is incorrect: it still remains the insns in the
incorrect state (although my fix can generate the correct .s, and can
build bfin kernel with allmodconfig successfully).


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

  reply	other threads:[~2015-07-01 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-28 14:42 Chen Gang
2015-06-29 20:06 ` Bernd Schmidt
2015-07-01  1:04   ` Chen Gang
2015-07-01 13:52     ` Bernd Schmidt
2015-07-01 15:26       ` Chen Gang [this message]
2015-07-03  2:13         ` Chen Gang
2015-07-06 12:51           ` Bernd Schmidt
2015-07-06 22:08             ` Chen Gang
2015-07-11 22:54               ` Chen Gang

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=BLU437-SMTP3467213F571FF59E9208E4B9A80@phx.gbl \
    --to=xili_gchen_5257@hotmail.com \
    --cc=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jzhang918@gmail.com \
    --cc=law@redhat.com \
    --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).