public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53061] [C/ObjC/C++/ObjC++] cleanup diagnostics initialization Date: Sun, 26 Oct 2014 21:35:00 -0000 [thread overview] Message-ID: <bug-53061-4-QyJMdDR5vO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53061-4@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 8148 bytes --] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53061 --- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- Author: manu Date: Sun Oct 26 21:21:58 2014 New Revision: 216720 URL: https://gcc.gnu.org/viewcvs?rev=216720&root=gcc&view=rev Log: In cp/error.c, I separate the initialization of the diagnostic context from the initialization of the scratch pretty-printer (cxx_pp). This was suggested by Gabriel in the last review of the patch and now I realize it was a good idea. Now cxx_initialize_diagnostics is the equivalent version of c_initialize_diagnostics. To avoid having to make extern a bunch of functions, I moved it from cp-objcp-common.c to error.c. I moved the setting of diagnostic_format_decoder (global_dc) = c_tree_printer, from c_objc_common_init to c_initialize_diagnostics, and right after c_common_diagnostics_set_defaults. This mimics what is done in cxx_initialize_diagnostics. Moreover, in both c_initialize_diagnostics and cxx_initialize_diagnostics, the FE-specific pretty-printer is initialized first and then other settings are applied. This does not make a difference right now, but if in the future one wishes to touch something in the pretty-printer, it will not get overriden immediately. In fact, the code I removed in c_common_initialize_diagnostics, which sets line_cutoff to 80, is useless because the pretty-printer created here is actually never used, but overriden by the FE-specific pretty-printers. This also means that doc/invoke.texi was wrong. Finally, it is useless to set the maximum line length to 0 in the constructor of cxx_pretty_printer. It is the default anyway. gcc/c/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * c-objc-common.c (c_objc_common_init): Do not do diagnostics initialization here... (c_initialize_diagnostics): ... but here. Set defaults after building pretty-printer. gcc/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * doc/invoke.texi (fmessage-length): Update text to match reality. gcc/cp/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * cp-objcp-common.c: Do not include new. (cxx_initialize_diagnostics): Move from here to ... * error.c (cxx_initialize_diagnostics): : ... here. Move diagnostics initialization here from init_error. (cxx_pp): Use a real pointer not a macro. (init_error): Just initialize cxx_pp. * cxx-pretty-print.c (cxx_pretty_printer::cxx_pretty_printer): Do not set maximum line length. gcc/c-family/ChangeLog: 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org> PR c++/53061 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from c_common_initialize_diagnostics. * c-common.h: Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c-common.h trunk/gcc/c-family/c-opts.c trunk/gcc/c/ChangeLog trunk/gcc/c/c-objc-common.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-objcp-common.c trunk/gcc/cp/cxx-pretty-print.c trunk/gcc/cp/error.c trunk/gcc/doc/invoke.texi >From gcc-bugs-return-465017-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Oct 26 21:35:50 2014 Return-Path: <gcc-bugs-return-465017-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 21824 invoked by alias); 26 Oct 2014 21:35:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 21800 invoked by uid 48); 26 Oct 2014 21:35:46 -0000 From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53061] [C/ObjC/C++/ObjC++] cleanup diagnostics initialization Date: Mon, 27 Oct 2014 00:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: diagnostic, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: <bug-53061-4-TqrrLqORcV@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-53061-4@http.gcc.gnu.org/bugzilla/> References: <bug-53061-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02038.txt.bz2 Content-length: 476 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53061 Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- Fixed in GCC 5.0! >From gcc-bugs-return-465018-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Oct 27 00:40:20 2014 Return-Path: <gcc-bugs-return-465018-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 12274 invoked by alias); 27 Oct 2014 00:40:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 12212 invoked by uid 48); 27 Oct 2014 00:40:15 -0000 From: "kkojima at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55212] [SH] Switch to LRA Date: Mon, 27 Oct 2014 00:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kkojima at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: <bug-55212-4-1kr3OPl9Vf@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-55212-4@http.gcc.gnu.org/bugzilla/> References: <bug-55212-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-10/txt/msg02039.txt.bz2 Content-length: 865 https://gcc.gnu.org/bugzilla/show_bug.cgi?idU212 --- Comment #78 from Kazumoto Kojima <kkojima at gcc dot gnu.org> --- Created attachment 33813 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3813&actioníit a trial patch for the issue c#76 With it, the generated code for c#76 test case looks similar with the one with non LRA compiler. The total code size regression for CSiBE is reduced to 0.43%. The patch introduces a new targetm function legitimize_address_display. I've tested it on arm thumb with adding a similar new targetm function to arm.c. There is only one CSiBE test of which code size is changed from 400 to 396 at -Os and there are no size changes at -O2 on thumb. Although arm thumb is better than SH about those base+display addressing because of 8-bit display for stack pointer register and no R0-ness, it's a bit surprising to me.
prev parent reply other threads:[~2014-10-26 21:22 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-21 12:47 [Bug c++/53061] New: " manu at gcc dot gnu.org 2012-04-21 12:56 ` [Bug c++/53061] " manu at gcc dot gnu.org 2014-10-26 21:35 ` manu at gcc dot gnu.org [this message]
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=bug-53061-4-QyJMdDR5vO@http.gcc.gnu.org/bugzilla/ \ --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).