public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem
@ 2020-04-20 11:35 dcb314 at hotmail dot com
2020-04-20 12:13 ` [Bug c/94669] libcc1: 4 " dcb314 at hotmail dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-04-20 11:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
Bug ID: 94669
Summary: libcc1/libcc1.cc; 2 * minor performance problem
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
cppcheck says:
1.
trunk.git/libcc1/libcc1.cc:112:57: performance: Function parameter
'driver_filename' should be passed by const reference. [passedByValue]
Source code is
compiler_driver_filename (libcc1 *self, std::string driver_filename)
Maybe better code
compiler_driver_filename (libcc1 *self, const std::string &
driver_filename)
2.
trunk.git/libcc1/libcc1.cc:96:56: performance: Function parameter
'triplet_regexp' should be passed by const reference. [passedByValue]
compiler_driver_filename (libcc1 *self, std::string driver_filename)
Duplicate.
In a similar position:
trunk.git/libcc1/libcp1.cc:114:57: performance: Function parameter
'driver_filename' should be passed by const reference. [passedByValue]
and
trunk.git/libcc1/libcp1.cc:98:56: performance: Function parameter
'triplet_regexp' should be passed by const reference. [passedByValue]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
@ 2020-04-20 12:13 ` dcb314 at hotmail dot com
2020-04-20 18:23 ` jan.kratochvil at redhat dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-04-20 12:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jan.kratochvil at redhat dot com
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
>From git blame, adding original author.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
2020-04-20 12:13 ` [Bug c/94669] libcc1: 4 " dcb314 at hotmail dot com
@ 2020-04-20 18:23 ` jan.kratochvil at redhat dot com
2020-04-20 18:33 ` dcb314 at hotmail dot com
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jan.kratochvil at redhat dot com @ 2020-04-20 18:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
Jan Kratochvil <jan.kratochvil at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu.org
--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> ---
These fixes are very simple, maybe you can check it in as obvious?
BTW the file was written by Alexandre Oliva, I wrote no single line there.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
2020-04-20 12:13 ` [Bug c/94669] libcc1: 4 " dcb314 at hotmail dot com
2020-04-20 18:23 ` jan.kratochvil at redhat dot com
@ 2020-04-20 18:33 ` dcb314 at hotmail dot com
2020-04-21 15:35 ` egallager at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2020-04-20 18:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Jan Kratochvil from comment #2)
> These fixes are very simple, maybe you can check it in as obvious?
Sorry no, I have no checkin permission.
> BTW the file was written by Alexandre Oliva, I wrote no single line there.
git blame seems to think you wrote it. Maybe it is in error.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
` (2 preceding siblings ...)
2020-04-20 18:33 ` dcb314 at hotmail dot com
@ 2020-04-21 15:35 ` egallager at gcc dot gnu.org
2021-01-22 23:05 ` tromey at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: egallager at gcc dot gnu.org @ 2020-04-21 15:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |89863
See Also|https://gcc.gnu.org/bugzill |
|a/show_bug.cgi?id=89863 |
CC| |egallager at gcc dot gnu.org
--- Comment #4 from Eric Gallager <egallager at gcc dot gnu.org> ---
moving the cppcheck meta-bug from the "See Also" field to the "Blocks" field
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89863
[Bug 89863] [meta-bug] Issues in gcc that other static analyzers (cppcheck,
clang-static-analyzer, PVS-studio) find that gcc misses
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
` (3 preceding siblings ...)
2020-04-21 15:35 ` egallager at gcc dot gnu.org
@ 2021-01-22 23:05 ` tromey at gcc dot gnu.org
2021-05-05 6:10 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tromey at gcc dot gnu.org @ 2021-01-22 23:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
Tom Tromey <tromey at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |tromey at gcc dot gnu.org
--- Comment #5 from Tom Tromey <tromey at gcc dot gnu.org> ---
I have a patch for these.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
` (4 preceding siblings ...)
2021-01-22 23:05 ` tromey at gcc dot gnu.org
@ 2021-05-05 6:10 ` cvs-commit at gcc dot gnu.org
2022-01-05 10:24 ` dcb314 at hotmail dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-05 6:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@gcc.gnu.org>:
https://gcc.gnu.org/g:96deddca2e535d09db1d244a96a1efc20e24b673
commit r12-473-g96deddca2e535d09db1d244a96a1efc20e24b673
Author: Tom Tromey <tom@tromey.com>
Date: Tue May 4 15:26:58 2021 -0600
libcc1: avoid extra string copies
PR c/94669 points out that a couple of spots in libcc1 take a
std::string where a reference would do. This changes these spots to
take a const char *, to reduce the number of copies.
libcc1
PR c/94669
* compiler.hh (compiler_driver_filename): Take const char *.
(compiler_triplet_regexp): Likewise.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
` (5 preceding siblings ...)
2021-05-05 6:10 ` cvs-commit at gcc dot gnu.org
@ 2022-01-05 10:24 ` dcb314 at hotmail dot com
2022-01-05 18:22 ` tromey at gcc dot gnu.org
2022-01-05 18:26 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: dcb314 at hotmail dot com @ 2022-01-05 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
--- Comment #7 from David Binderman <dcb314 at hotmail dot com> ---
Could this bug be marked as fixed, then ?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
` (6 preceding siblings ...)
2022-01-05 10:24 ` dcb314 at hotmail dot com
@ 2022-01-05 18:22 ` tromey at gcc dot gnu.org
2022-01-05 18:26 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: tromey at gcc dot gnu.org @ 2022-01-05 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
--- Comment #8 from Tom Tromey <tromey at gcc dot gnu.org> ---
(In reply to David Binderman from comment #7)
> Could this bug be marked as fixed, then ?
Yes, but I don't really know the GCC rules about closing reports
any more, so someone else probably ought to handle it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/94669] libcc1: 4 * minor performance problem
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
` (7 preceding siblings ...)
2022-01-05 18:22 ` tromey at gcc dot gnu.org
@ 2022-01-05 18:26 ` redi at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-05 18:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94669
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
Target Milestone|--- |12.0
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I don't think this needs to be backported, so it can just be closed as fixed
for GCC 12.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-01-05 18:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 11:35 [Bug c/94669] New: libcc1/libcc1.cc; 2 * minor performance problem dcb314 at hotmail dot com
2020-04-20 12:13 ` [Bug c/94669] libcc1: 4 " dcb314 at hotmail dot com
2020-04-20 18:23 ` jan.kratochvil at redhat dot com
2020-04-20 18:33 ` dcb314 at hotmail dot com
2020-04-21 15:35 ` egallager at gcc dot gnu.org
2021-01-22 23:05 ` tromey at gcc dot gnu.org
2021-05-05 6:10 ` cvs-commit at gcc dot gnu.org
2022-01-05 10:24 ` dcb314 at hotmail dot com
2022-01-05 18:22 ` tromey at gcc dot gnu.org
2022-01-05 18:26 ` redi at gcc dot gnu.org
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).