public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/114301] New: gimple_can_duplicate_bb_p check for returns twice can be moved to the check of the last statement
@ 2024-03-10 22:29 pinskia at gcc dot gnu.org
  2024-03-10 22:29 ` [Bug tree-optimization/114301] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-10 22:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114301

            Bug ID: 114301
           Summary: gimple_can_duplicate_bb_p check for returns twice can
                    be moved to the check of the last statement
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog, internal-improvement
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

It is the case that the returns twice function will always be the last
statement of the BB so the check for that can be moved up to the check of the
last statement part. This is a small optimization as gimple_call_flags (which
calls flags_from_decl_or_type) can call special_function_p and
special_function_p does string comparisons in the end. So removing as many
calls to gimple_call_flags  can speed up GCC slightly.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-15  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-10 22:29 [Bug tree-optimization/114301] New: gimple_can_duplicate_bb_p check for returns twice can be moved to the check of the last statement pinskia at gcc dot gnu.org
2024-03-10 22:29 ` [Bug tree-optimization/114301] " pinskia at gcc dot gnu.org
2024-05-14 15:53 ` pinskia at gcc dot gnu.org
2024-05-15  8:08 ` cvs-commit at gcc dot gnu.org
2024-05-15  8:09 ` pinskia 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).