* [RTL] move rtl diagnostics out of toplev.h
@ 2010-06-28 9:02 Manuel López-Ibáñez
2010-06-28 9:09 ` Andrew Pinski
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Manuel López-Ibáñez @ 2010-06-28 9:02 UTC (permalink / raw)
To: Gcc Patch List, Steven Bosscher
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
What the subject says. Bootstrapped on x86_64-linux-gnu. I move the
fatal* declarations to rtl.h because they are used by targets, they
don't require anything from diagnostics-core.h and I didn't want to
add rtl-error.h to every target file. If moving them to rtl-error.h is
desirable for some reason, they could always be moved in a follow-up
patch.
toplev.h is now free of diagnostic and rtl stuff, so it should be
possible to not include it anymore in many places.
OK?
Manuel.
2010-06-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
* toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations
to rtl.h.
(error_for_asm, warning_for_asm): Move declarations to rtl-error.h.
* rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations
here.
* rtl-error.h: New.
* regrename.c: Do not include toplev.h. Include rtl-error.h.
* rtl-error.c: Likewise.
* reload.c: Likewise.
* recog.c: Likewise.
* sel-sched.c: Likewise.
* function.c: Likewise.
* reg-stack.c: Likewise.
* cfgrtl.c: Likewise.
* reload1.c: Likewise.
* final.c: Include rtl-error.
[-- Attachment #2: rtl-error.diff --]
[-- Type: text/plain, Size: 10249 bytes --]
Index: gcc/regrename.c
===================================================================
--- gcc/regrename.c (revision 161471)
+++ gcc/regrename.c (working copy)
@@ -20,11 +20,11 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
#include "addresses.h"
#include "hard-reg-set.h"
@@ -32,11 +32,10 @@
#include "reload.h"
#include "output.h"
#include "function.h"
#include "recog.h"
#include "flags.h"
-#include "toplev.h"
#include "obstack.h"
#include "timevar.h"
#include "tree-pass.h"
#include "df.h"
Index: gcc/rtl-error.c
===================================================================
--- gcc/rtl-error.c (revision 161471)
+++ gcc/rtl-error.c (working copy)
@@ -20,15 +20,14 @@ along with GCC; see the file COPYING3.
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "insn-attr.h"
#include "insn-config.h"
#include "input.h"
-#include "toplev.h"
#include "intl.h"
#include "diagnostic.h"
static location_t location_for_asm (const_rtx);
static void diagnostic_for_asm (const_rtx, const char *, va_list *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2,0);
Index: gcc/rtl-error.h
===================================================================
--- gcc/rtl-error.h (revision 0)
+++ gcc/rtl-error.h (revision 0)
@@ -0,0 +1,24 @@
+/* RTL specific diagnostic subroutines for GCC
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+#include "rtl.h"
+#include "diagnostic-core.h"
+
+extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
+extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
Index: gcc/reload.c
===================================================================
--- gcc/reload.c (revision 161471)
+++ gcc/reload.c (working copy)
@@ -92,11 +92,11 @@ a register with any other reload. */
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"
#include "expr.h"
#include "optabs.h"
#include "recog.h"
@@ -106,11 +106,10 @@ a register with any other reload. */
#include "addresses.h"
#include "hard-reg-set.h"
#include "flags.h"
#include "output.h"
#include "function.h"
-#include "toplev.h"
#include "params.h"
#include "target.h"
#include "ira.h"
/* True if X is a constant that can be forced into the constant pool. */
Index: gcc/final.c
===================================================================
--- gcc/final.c (revision 161471)
+++ gcc/final.c (working copy)
@@ -60,11 +60,12 @@ along with GCC; see the file COPYING3.
#include "flags.h"
#include "hard-reg-set.h"
#include "output.h"
#include "except.h"
#include "function.h"
-#include "toplev.h"
+#include "rtl-error.h"
+#include "toplev.h" /* exact_log2, floor_log2 */
#include "reload.h"
#include "intl.h"
#include "basic-block.h"
#include "target.h"
#include "debug.h"
Index: gcc/toplev.h
===================================================================
--- gcc/toplev.h (revision 161471)
+++ gcc/toplev.h (working copy)
@@ -30,31 +30,19 @@ along with GCC; see the file COPYING3.
#define skip_leading_substring(whole, part) \
(strncmp (whole, part, strlen (part)) ? NULL : whole + strlen (part))
extern int toplev_main (int, char **);
extern void strip_off_ending (char *, int);
-extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *)
- ATTRIBUTE_NORETURN;
-
-#define fatal_insn(msgid, insn) \
- _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__)
-#define fatal_insn_not_found(insn) \
- _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
-
extern void rest_of_decl_compilation (tree, int, int);
extern void rest_of_type_compilation (tree, int);
extern void tree_rest_of_compilation (tree);
extern void init_optimization_passes (void);
extern void finish_optimization_passes (void);
extern bool enable_rtl_dump_file (void);
extern void announce_function (tree);
-extern void error_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
-extern void warning_for_asm (const_rtx, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3);
extern void warn_deprecated_use (tree, tree);
extern bool parse_optimize_options (tree, bool);
#ifdef BUFSIZ
extern void output_quoted_string (FILE *, const char *);
Index: gcc/sel-sched.c
===================================================================
--- gcc/sel-sched.c (revision 161471)
+++ gcc/sel-sched.c (working copy)
@@ -19,21 +19,19 @@ along with GCC; see the file COPYING3.
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "toplev.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "hard-reg-set.h"
#include "regs.h"
#include "function.h"
#include "flags.h"
#include "insn-config.h"
#include "insn-attr.h"
#include "except.h"
-#include "toplev.h"
#include "recog.h"
#include "params.h"
#include "target.h"
#include "output.h"
#include "timevar.h"
Index: gcc/recog.c
===================================================================
--- gcc/recog.c (revision 161471)
+++ gcc/recog.c (working copy)
@@ -22,22 +22,21 @@ along with GCC; see the file COPYING3.
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "insn-config.h"
#include "insn-attr.h"
#include "hard-reg-set.h"
#include "recog.h"
#include "regs.h"
#include "addresses.h"
#include "expr.h"
#include "function.h"
#include "flags.h"
-#include "toplev.h"
#include "basic-block.h"
#include "output.h"
#include "reload.h"
#include "target.h"
#include "timevar.h"
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 161471)
+++ gcc/function.c (working copy)
@@ -35,11 +35,11 @@ along with GCC; see the file COPYING3.
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tree.h"
#include "flags.h"
#include "except.h"
#include "function.h"
#include "expr.h"
@@ -49,11 +49,10 @@ along with GCC; see the file COPYING3.
#include "hard-reg-set.h"
#include "insn-config.h"
#include "recog.h"
#include "output.h"
#include "basic-block.h"
-#include "toplev.h"
#include "hashtab.h"
#include "ggc.h"
#include "tm_p.h"
#include "integrate.h"
#include "langhooks.h"
Index: gcc/rtl.h
===================================================================
--- gcc/rtl.h (revision 161471)
+++ gcc/rtl.h (working copy)
@@ -2438,6 +2438,19 @@ extern void set_curr_insn_block (tree);
extern tree get_curr_insn_block (void);
extern int curr_insn_locator (void);
extern bool optimize_insn_for_size_p (void);
extern bool optimize_insn_for_speed_p (void);
+/* rtl-error.c */
+extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *)
+ ATTRIBUTE_NORETURN;
+extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *)
+ ATTRIBUTE_NORETURN;
+
+#define fatal_insn(msgid, insn) \
+ _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__)
+#define fatal_insn_not_found(insn) \
+ _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
+
+
+
#endif /* ! GCC_RTL_H */
Index: gcc/reg-stack.c
===================================================================
--- gcc/reg-stack.c (revision 161471)
+++ gcc/reg-stack.c (working copy)
@@ -154,18 +154,17 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "function.h"
#include "insn-config.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "flags.h"
-#include "toplev.h"
#include "recog.h"
#include "output.h"
#include "basic-block.h"
#include "cfglayout.h"
#include "reload.h"
Index: gcc/cfgrtl.c
===================================================================
--- gcc/cfgrtl.c (revision 161471)
+++ gcc/cfgrtl.c (working copy)
@@ -40,19 +40,18 @@ along with GCC; see the file COPYING3.
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
-#include "rtl.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "regs.h"
#include "flags.h"
#include "output.h"
#include "function.h"
#include "except.h"
-#include "toplev.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "obstack.h"
#include "insn-attr.h"
#include "insn-config.h"
#include "cfglayout.h"
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c (revision 161471)
+++ gcc/reload1.c (working copy)
@@ -24,11 +24,11 @@ along with GCC; see the file COPYING3.
#include "coretypes.h"
#include "tm.h"
#include "machmode.h"
#include "hard-reg-set.h"
-#include "rtl.h"
+#include "rtl-error.h"
#include "tm_p.h"
#include "obstack.h"
#include "insn-config.h"
#include "flags.h"
#include "function.h"
@@ -39,11 +39,10 @@ along with GCC; see the file COPYING3.
#include "basic-block.h"
#include "df.h"
#include "reload.h"
#include "recog.h"
#include "output.h"
-#include "toplev.h"
#include "except.h"
#include "tree.h"
#include "ira.h"
#include "target.h"
#include "emit-rtl.h"
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RTL] move rtl diagnostics out of toplev.h
2010-06-28 9:02 [RTL] move rtl diagnostics out of toplev.h Manuel López-Ibáñez
@ 2010-06-28 9:09 ` Andrew Pinski
2010-06-28 9:47 ` Manuel López-Ibáñez
2010-06-30 14:01 ` Diego Novillo
[not found] ` <alpine.BSF.2.00.1006301757390.89382@dair.pair.com>
2 siblings, 1 reply; 8+ messages in thread
From: Andrew Pinski @ 2010-06-28 9:09 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Steven Bosscher
On Jun 27, 2010, at 11:29 PM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> What the subject says. Bootstrapped on x86_64-linux-gnu. I move the
> fatal* declarations to rtl.h because they are used by targets, they
> don't require anything from diagnostics-core.h and I didn't want to
> add rtl-error.h to every target file. If moving them to rtl-error.h is
> desirable for some reason, they could always be moved in a follow-up
> patch.
>
> toplev.h is now free of diagnostic and rtl stuff, so it should be
> possible to not include it anymore in many places.
>
> OK?
Looks like you missed updating the dependencies in the makefile.
>
> Manuel.
>
> 2010-06-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
>
> * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations
> to rtl.h.
> (error_for_asm, warning_for_asm): Move declarations to rtl-
> error.h.
> * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations
> here.
> * rtl-error.h: New.
> * regrename.c: Do not include toplev.h. Include rtl-error.h.
> * rtl-error.c: Likewise.
> * reload.c: Likewise.
> * recog.c: Likewise.
> * sel-sched.c: Likewise.
> * function.c: Likewise.
> * reg-stack.c: Likewise.
> * cfgrtl.c: Likewise.
> * reload1.c: Likewise.
> * final.c: Include rtl-error.
> <rtl-error.diff>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RTL] move rtl diagnostics out of toplev.h
2010-06-28 9:09 ` Andrew Pinski
@ 2010-06-28 9:47 ` Manuel López-Ibáñez
0 siblings, 0 replies; 8+ messages in thread
From: Manuel López-Ibáñez @ 2010-06-28 9:47 UTC (permalink / raw)
To: Andrew Pinski; +Cc: Gcc Patch List, Steven Bosscher
On 28 June 2010 08:36, Andrew Pinski <pinskia@gmail.com> wrote:
>
>
> On Jun 27, 2010, at 11:29 PM, Manuel López-Ibáñez <lopezibanez@gmail.com>
> wrote:
>
>> What the subject says. Bootstrapped on x86_64-linux-gnu. I move the
>> fatal* declarations to rtl.h because they are used by targets, they
>> don't require anything from diagnostics-core.h and I didn't want to
>> add rtl-error.h to every target file. If moving them to rtl-error.h is
>> desirable for some reason, they could always be moved in a follow-up
>> patch.
>>
>> toplev.h is now free of diagnostic and rtl stuff, so it should be
>> possible to not include it anymore in many places.
>>
>> OK?
>
>
> Looks like you missed updating the dependencies in the makefile.
Which files need manual updating? Anyway, since that is mostly
mechanical, I will not send another patch+changelog for just that. I
can do it before commit.
Cheers,
Manuel.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RTL] move rtl diagnostics out of toplev.h
2010-06-28 9:02 [RTL] move rtl diagnostics out of toplev.h Manuel López-Ibáñez
2010-06-28 9:09 ` Andrew Pinski
@ 2010-06-30 14:01 ` Diego Novillo
2010-06-30 16:05 ` Paolo Bonzini
[not found] ` <alpine.BSF.2.00.1006301757390.89382@dair.pair.com>
2 siblings, 1 reply; 8+ messages in thread
From: Diego Novillo @ 2010-06-30 14:01 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List, Steven Bosscher
On 10-06-28 02:29 , Manuel López-Ibáñez wrote:
> 2010-06-28 Manuel López-Ibáñez<manu@gcc.gnu.org>
Two spaces before '<'.
>
> * toplev.h (_fatal_insn_not_found, _fatal_insn): Move declarations
> to rtl.h.
> (error_for_asm, warning_for_asm): Move declarations to rtl-error.h.
> * rtl.h (_fatal_insn_not_found, _fatal_insn): Move declarations
> here.
> * rtl-error.h: New.
> * regrename.c: Do not include toplev.h. Include rtl-error.h.
> * rtl-error.c: Likewise.
> * reload.c: Likewise.
> * recog.c: Likewise.
> * sel-sched.c: Likewise.
> * function.c: Likewise.
> * reg-stack.c: Likewise.
> * cfgrtl.c: Likewise.
> * reload1.c: Likewise.
> * final.c: Include rtl-error.
OK after updating the Makefile.in entries for all the affected .c files.
Diego.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RTL] move rtl diagnostics out of toplev.h
2010-06-30 14:01 ` Diego Novillo
@ 2010-06-30 16:05 ` Paolo Bonzini
2010-06-30 16:09 ` Paolo Bonzini
2010-06-30 16:22 ` Diego Novillo
0 siblings, 2 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-06-30 16:05 UTC (permalink / raw)
To: Diego Novillo
Cc: Manuel López-Ibáñez, Gcc Patch List, Steven Bosscher
On 06/30/2010 02:16 PM, Diego Novillo wrote:
> On 10-06-28 02:29 , Manuel López-Ibáñez wrote:
>
>> 2010-06-28 Manuel López-Ibáñez<manu@gcc.gnu.org>
>
> Two spaces before '<'.
The spaces were there, you're hitting
https://bugzilla.mozilla.org/show_bug.cgi?id=571502
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RTL] move rtl diagnostics out of toplev.h
2010-06-30 16:05 ` Paolo Bonzini
@ 2010-06-30 16:09 ` Paolo Bonzini
2010-06-30 16:22 ` Diego Novillo
1 sibling, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2010-06-30 16:09 UTC (permalink / raw)
To: gcc-patches
Cc: Manuel López-Ibáñez, Gcc Patch List, Steven Bosscher
On 06/30/2010 02:16 PM, Diego Novillo wrote:
> On 10-06-28 02:29 , Manuel López-Ibáñez wrote:
>
>> 2010-06-28 Manuel López-Ibáñez<manu@gcc.gnu.org>
>
> Two spaces before '<'.
The spaces were there, you're hitting
https://bugzilla.mozilla.org/show_bug.cgi?id=571502
Paolo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RTL] move rtl diagnostics out of toplev.h
2010-06-30 16:05 ` Paolo Bonzini
2010-06-30 16:09 ` Paolo Bonzini
@ 2010-06-30 16:22 ` Diego Novillo
1 sibling, 0 replies; 8+ messages in thread
From: Diego Novillo @ 2010-06-30 16:22 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Manuel López-Ibáñez, Gcc Patch List, Steven Bosscher
On Wed, Jun 30, 2010 at 10:07, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 06/30/2010 02:16 PM, Diego Novillo wrote:
>>
>> On 10-06-28 02:29 , Manuel López-Ibáñez wrote:
>>
>>> 2010-06-28 Manuel López-Ibáñez<manu@gcc.gnu.org>
>>
>> Two spaces before '<'.
>
> The spaces were there, you're hitting
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=571502
Wow. Thanks. It did seem strange that Manuel would miss that.
Diego.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: breaking cris-elf build with "Re: [RTL] move rtl diagnostics out of toplev.h"
[not found] ` <AANLkTikWdqpG7-PCMAwYD4KlurgBWrGwlXl5RE9RS3uw@mail.gmail.com>
@ 2010-07-01 13:48 ` Hans-Peter Nilsson
0 siblings, 0 replies; 8+ messages in thread
From: Hans-Peter Nilsson @ 2010-07-01 13:48 UTC (permalink / raw)
To: Manuel López-Ibáñez; +Cc: Gcc Patch List
[-- Attachment #1: Type: TEXT/PLAIN, Size: 447 bytes --]
On Thu, 1 Jul 2010, Manuel López-Ibáñez wrote:
> Richard, can I commit the following patch to fix the breakage or you
> want me to wait until the merge is over?
Richi ok'd this on IRC, so I verified that it fixed the
build problem and committed it on behalf of you. Thanks.
> 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
>
> * reload.c: Include toplev.h.
> * recog.c: Likewise.
> * Makefile.in: Adjust dependencies.
brgds, H-P
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-07-01 13:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-28 9:02 [RTL] move rtl diagnostics out of toplev.h Manuel López-Ibáñez
2010-06-28 9:09 ` Andrew Pinski
2010-06-28 9:47 ` Manuel López-Ibáñez
2010-06-30 14:01 ` Diego Novillo
2010-06-30 16:05 ` Paolo Bonzini
2010-06-30 16:09 ` Paolo Bonzini
2010-06-30 16:22 ` Diego Novillo
[not found] ` <alpine.BSF.2.00.1006301757390.89382@dair.pair.com>
[not found] ` <AANLkTikLHfQQBvRPI6m_CkCykppw6s1neXtfXC-umvFF@mail.gmail.com>
[not found] ` <alpine.BSF.2.00.1006301905290.72189@dair.pair.com>
[not found] ` <AANLkTikWdqpG7-PCMAwYD4KlurgBWrGwlXl5RE9RS3uw@mail.gmail.com>
2010-07-01 13:48 ` breaking cris-elf build with "Re: [RTL] move rtl diagnostics out of toplev.h" Hans-Peter Nilsson
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).