Message ID | AANLkTineaveLOAvCqTOSz8Zy_lEGHIkFHZwgM9t9Y8oo@mail.gmail.com |
---|---|
State | New |
Headers | show |
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>
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.
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.
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
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.
On Mon, 28 Jun 2010, Manuel López-Ibáñez wrote: > 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. > Looks like this patch broke building cris-elf: gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -o cc1-dummy c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o \ dummy-checksum.o main.o tree-browser.o libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./gmp/.libs -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./mpfr/.libs -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./mpc/src/.libs -lmpc -lmpfr -lgmp -ldl -L../zlib -lz -lelf libbackend.a(recog.o): In function `constrain_operands': /tmp/hpautotest-gcc1/gcc/gcc/recog.c:2616: undefined reference to `exact_log2' libbackend.a(recog.o): In function `asm_operand_ok': /tmp/hpautotest-gcc1/gcc/gcc/recog.c:1756: undefined reference to `exact_log2' libbackend.a(reload.o): In function `find_reloads': /tmp/hpautotest-gcc1/gcc/gcc/reload.c:3363: undefined reference to `exact_log2' collect2: ld returned 1 exit status with "warning: implicit declaration of function 'exact_log2'" when compiling reload.c and recog.c, probably due to exact_log2 being used in CONST_OK_FOR_CONSTRAINT_P. I'm lost in this new scheme of moving includes around, but you should know. What's the best course of action besides moving to constraints.md? brgds, H-P
On 1 July 2010 00:05, Hans-Peter Nilsson <hp@bitrange.com> wrote: > On Mon, 28 Jun 2010, Manuel López-Ibáñez wrote: >> 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. >> > > Looks like this patch broke building cris-elf: > gcc -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall > -Wwrite-strings -Wcast-qual -Wstrict-prototypes > -Wmissing-prototypes -Wmissing-format-attribute -pedantic > -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings > -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H > -o cc1-dummy c-lang.o c-family/stub-objc.o attribs.o c-errors.o > c-decl.o c-typeck.o c-convert.o c-aux-info.o c-objc-common.o > c-parser.o tree-mudflap.o c-family/c-common.o > c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o > c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o > c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o > c-family/c-pragma.o c-family/c-pretty-print.o > c-family/c-semantics.o c-family/c-ada-spec.o \ > dummy-checksum.o main.o tree-browser.o libbackend.a > ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a > ../libcpp/libcpp.a ../libiberty/libiberty.a > ../libdecnumber/libdecnumber.a > -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./gmp/.libs > -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./mpfr/.libs > -L/tmp/hpautotest-gcc1/cris-elf/gccobj/./mpc/src/.libs -lmpc > -lmpfr -lgmp -ldl -L../zlib -lz -lelf > libbackend.a(recog.o): In function `constrain_operands': > /tmp/hpautotest-gcc1/gcc/gcc/recog.c:2616: undefined reference > to `exact_log2' > libbackend.a(recog.o): In function `asm_operand_ok': > /tmp/hpautotest-gcc1/gcc/gcc/recog.c:1756: undefined reference > to `exact_log2' > libbackend.a(reload.o): In function `find_reloads': > /tmp/hpautotest-gcc1/gcc/gcc/reload.c:3363: undefined reference > to `exact_log2' > collect2: ld returned 1 exit status > > with "warning: implicit declaration of function 'exact_log2'" > when compiling reload.c and recog.c, probably due to exact_log2 > being used in CONST_OK_FOR_CONSTRAINT_P. > > I'm lost in this new scheme of moving includes around, but you > should know. What's the best course of action besides moving to > constraints.md? For every file that produces such error, just include toplev.h #include "toplev.h" /* exact_log2 */ after everything else. I will do it for you if you give me the list of files affected. Manuel.
On Thu, 1 Jul 2010, Manuel López-Ibáñez wrote: > On 1 July 2010 00:05, Hans-Peter Nilsson <hp@bitrange.com> wrote: > > libbackend.a(recog.o): In function `constrain_operands': > > /tmp/hpautotest-gcc1/gcc/gcc/recog.c:2616: undefined reference > > to `exact_log2' > > libbackend.a(recog.o): In function `asm_operand_ok': > > /tmp/hpautotest-gcc1/gcc/gcc/recog.c:1756: undefined reference > > to `exact_log2' > > libbackend.a(reload.o): In function `find_reloads': > > /tmp/hpautotest-gcc1/gcc/gcc/reload.c:3363: undefined reference > > to `exact_log2' > > collect2: ld returned 1 exit status > > > > with "warning: implicit declaration of function 'exact_log2'" > > when compiling reload.c and recog.c, probably due to exact_log2 > > being used in CONST_OK_FOR_CONSTRAINT_P. > > > > I'm lost in this new scheme of moving includes around, but you > > should know. What's the best course of action besides moving to > > constraints.md? > > For every file that produces such error, just include toplev.h > > #include "toplev.h" /* exact_log2 */ > > after everything else. I will do it for you if you give me the list of > files affected. Thanks, the list seen in the quoted buildlog above is complete. brgds, H-P
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"