public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Stump <mikestump@comcast.net>
To: tbsaunde+gcc@tbsaunde.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 5/8] always define HAVE_simple_return and HAVE_return
Date: Wed, 06 May 2015 01:13:00 -0000	[thread overview]
Message-ID: <445EB2C0-291E-4614-8484-08A920F80A63@comcast.net> (raw)
In-Reply-To: <1430114140-15817-6-git-send-email-tbsaunde+gcc@tbsaunde.org>

On Apr 26, 2015, at 10:55 PM, tbsaunde+gcc@tbsaunde.org wrote:
> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
> 
> gcc/ChangeLog:
> 
> 2015-04-27  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
> 
> 	* bb-reorder.c (HAVE_return): Don't check if its undefined.
> 	* defaults.h (gen_simple_return): New function.
> 	(gen_simple_return): Likewise.
> 	(HAVE_return): Add default definition to false.
> 	(HAVE_simple_return): Likewise.
> 	* cfgrtl.c (force_nonfallthru_and_redirect): Remove checks if
> 	HAVE_return and HAVE_simple_return are defined.
> 	* function.c (gen_return_pattern): Likewise.
> 	(convert_jumps_to_returns): Likewise.
> 	(thread_prologue_and_epilogue_insns): Likewise.
> 	* reorg.c (find_end_label): Likewise.
> 	(dbr_schedule): Likewise.
> 	* shrink-wrap.c: Likewise.
> 	* shrink-wrap.h: Likewise.

I’m seeing:

In file included from ./tm.h:30:0,
                 from ../../gcc/gcc/c-family/c-semantics.c:24:
../../gcc/gcc/defaults.h: In function ‘rtx_def* gen_simple_return()’:
../../gcc/gcc/defaults.h:1422:1: error: redefinition of ‘rtx_def* gen_simple_return()’
 gen_simple_return ()
 ^
In file included from ./tm.h:22:0,
                 from ../../gcc/gcc/c-family/c-semantics.c:24:
./insn-flags.h:1744:1: error: ‘rtx_def* gen_simple_return()’ previously defined here
 gen_simple_return(void)
 ^

in my port.

I have a simple_return and a return that is “0” enabled.

defaults.h has:

#ifndef HAVE_simple_return
#define HAVE_simple_return 0
static inline rtx
gen_simple_return ()
{
  gcc_unreachable ();
  return NULL;
}
#endif

and insn-flags.h has:

static inline rtx gen_simple_return                                      (void);
static inline rtx
gen_simple_return(void)
{
  return 0;
}

If I change the enable to “1” or “” then it compiles better.  Also, I can delete the pattern or change the name of the pattern and it works ok as well.

If they both did #ifndef HAVE_simple_return, and then insn-flags did #define HAVE_simple_return 0, I think it might work better.  I’ve not thought about it much.

  reply	other threads:[~2015-05-06  1:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  5:56 [PATCH 0/8] remove more conditional compilation tbsaunde+gcc
2015-04-27  5:56 ` [PATCH 3/8] add default for PCC_BITFIELD_TYPE_MATTERS tbsaunde+gcc
2015-04-29 13:18   ` Andreas Schwab
2015-04-29 21:54     ` Trevor Saunders
2015-04-29 22:00       ` Andreas Schwab
2015-04-29 22:26         ` Jeff Law
2015-04-29 22:30           ` Trevor Saunders
2015-04-29 22:33             ` Jeff Law
2015-04-30  1:45               ` Trevor Saunders
2015-04-30  3:24                 ` Trevor Saunders
2015-04-30  4:13                   ` Jeff Law
2015-04-30  7:13                   ` Andreas Schwab
2015-04-30 11:59                     ` Trevor Saunders
2015-04-30 12:17                       ` Jakub Jelinek
2015-04-30 12:22                       ` Andreas Schwab
2015-04-29 22:40             ` Jeff Law
2015-04-30  6:58             ` Andreas Schwab
2015-04-30 12:34               ` Trevor Saunders
2015-04-30 12:39                 ` Jakub Jelinek
2015-04-30 13:07                   ` Trevor Saunders
2015-04-30 17:50                   ` Joseph Myers
2015-05-01  0:01                     ` Trevor Saunders
2015-04-27  5:56 ` [PATCH 1/8] add default for NO_FUNCTION_CSE tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 7/8] always define ARGS_GROW_DOWNWARD tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 6/8] always define HAVE_epilogue tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 2/8] add default for HARD_REGNO_RENAME_OK tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 8/8] remove #if ARGS_GROW_DOWNWARD tbsaunde+gcc
2015-04-27  5:57 ` [PATCH 5/8] always define HAVE_simple_return and HAVE_return tbsaunde+gcc
2015-05-06  1:13   ` Mike Stump [this message]
2015-05-06  3:16     ` Trevor Saunders
2015-04-27  5:57 ` [PATCH 4/8] add default for EPILOGUE_USES tbsaunde+gcc

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=445EB2C0-291E-4614-8484-08A920F80A63@comcast.net \
    --to=mikestump@comcast.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tbsaunde+gcc@tbsaunde.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: 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).