public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug analyzer/112655] New: analyzer/infinite-loop.cc:75: Possible performance problem ? @ 2023-11-21 18:41 dcb314 at hotmail dot com 2023-12-12 21:03 ` [Bug analyzer/112655] " dmalcolm at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: dcb314 at hotmail dot com @ 2023-11-21 18:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112655 Bug ID: 112655 Summary: analyzer/infinite-loop.cc:75: Possible performance problem ? Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Static analyser cppcheck finds this problem: analyzer/infinite-loop.cc:75:38: performance: Function parameter 'eedges' should be passed by const reference. [passedByValue] Source code is struct infinite_loop { infinite_loop (const exploded_node &enode, location_t loc, std::vector<const exploded_edge *> eedges, logger *logger) Some other potential problems found by cppcheck for the analyzer: trunk.year/gcc/analyzer/sm-file.cc:282:3: performance: Variable 'm_unchecked' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] trunk.year/gcc/analyzer/sm-sensitive.cc:170:3: performance: Variable 'm_sensitive' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] trunk.year/gcc/analyzer/sm-signal.cc:190:3: performance: Variable 'm_in_signal_handler' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] trunk.year/gcc/analyzer/sm-taint.cc:869:3: performance: Variable 'm_tainted' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] trunk.year/gcc/analyzer/region-model.cc:6976:5: performance: Variable 'm_x_field' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] trunk.year/gcc/analyzer/varargs.cc:247:3: performance: Variable 'm_started' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList] ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/112655] analyzer/infinite-loop.cc:75: Possible performance problem ? 2023-11-21 18:41 [Bug analyzer/112655] New: analyzer/infinite-loop.cc:75: Possible performance problem ? dcb314 at hotmail dot com @ 2023-12-12 21:03 ` dmalcolm at gcc dot gnu.org 2023-12-14 14:12 ` cvs-commit at gcc dot gnu.org 2023-12-14 14:15 ` dmalcolm at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: dmalcolm at gcc dot gnu.org @ 2023-12-12 21:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112655 David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2023-12-12 --- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Thanks! Am working on a fix. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/112655] analyzer/infinite-loop.cc:75: Possible performance problem ? 2023-11-21 18:41 [Bug analyzer/112655] New: analyzer/infinite-loop.cc:75: Possible performance problem ? dcb314 at hotmail dot com 2023-12-12 21:03 ` [Bug analyzer/112655] " dmalcolm at gcc dot gnu.org @ 2023-12-14 14:12 ` cvs-commit at gcc dot gnu.org 2023-12-14 14:15 ` dmalcolm at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-12-14 14:12 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112655 --- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>: https://gcc.gnu.org/g:8cf5afba5dc482fe7063654720bfb0c45354998c commit r14-6549-g8cf5afba5dc482fe7063654720bfb0c45354998c Author: David Malcolm <dmalcolm@redhat.com> Date: Thu Dec 14 09:10:10 2023 -0500 analyzer: cleanups [PR112655] Avoid copying eedges in infinite_loop::infinite_loop. Use initializer lists in the various places reported in PR analyzer/112655 (apart from coord_test's ctor, which would require nontrivial refactoring). gcc/analyzer/ChangeLog: PR analyzer/112655 * infinite-loop.cc (infinite_loop::infinite_loop): Pass eedges via rvalue reference rather than by value. (starts_infinite_loop_p): Move eedges when constructing an infinite_loop instance. * sm-file.cc (fileptr_state_machine::fileptr_state_machine): Use initializer list for states. * sm-sensitive.cc (sensitive_state_machine::sensitive_state_machine): Likewise. * sm-signal.cc (signal_state_machine::signal_state_machine): Likewise. * sm-taint.cc (taint_state_machine::taint_state_machine): Likewise. * varargs.cc (va_list_state_machine::va_list_state_machine): Likewise. Signed-off-by: David Malcolm <dmalcolm@redhat.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug analyzer/112655] analyzer/infinite-loop.cc:75: Possible performance problem ? 2023-11-21 18:41 [Bug analyzer/112655] New: analyzer/infinite-loop.cc:75: Possible performance problem ? dcb314 at hotmail dot com 2023-12-12 21:03 ` [Bug analyzer/112655] " dmalcolm at gcc dot gnu.org 2023-12-14 14:12 ` cvs-commit at gcc dot gnu.org @ 2023-12-14 14:15 ` dmalcolm at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: dmalcolm at gcc dot gnu.org @ 2023-12-14 14:15 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112655 David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Should be fixed by the above patch. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-14 14:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-11-21 18:41 [Bug analyzer/112655] New: analyzer/infinite-loop.cc:75: Possible performance problem ? dcb314 at hotmail dot com 2023-12-12 21:03 ` [Bug analyzer/112655] " dmalcolm at gcc dot gnu.org 2023-12-14 14:12 ` cvs-commit at gcc dot gnu.org 2023-12-14 14:15 ` dmalcolm 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).