public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hkzhang455 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/111672] Inappropriate function splitting during pass_split_functions
Date: Wed, 04 Oct 2023 02:00:33 +0000	[thread overview]
Message-ID: <bug-111672-4-0QHF0W9NTN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111672-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Hanke Zhang <hkzhang455 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> I cannot reproduce this on the trunk (or even in 12.3.0):
> 
> Split point at BB 3
>   header time: 1393.311190 header size: 33
>   split time: 2.226400 split size: 2
>   bbs: 3
>   SSA names to pass:
>   Refused: split size is smaller than call overhead
> found articulation at bb 7
> Split point at BB 7
>   header time: 1395.537590 header size: 35
>   split time: 0.000000 split size: 0
>   bbs: 7
>   SSA names to pass:
>   Refused: split size is smaller than call overhead

It's still the same bug in my place, and I'm trying to compile on another
computer, and the same happens. Note that, my host is x86_64-linux-gnu. Here is
part of my output infomation about function splitting optimization.

  gcc -O3 -flto -fdumo-tree-fnsplit test.c
  cat a-test.c.050t.fnsplit

;; Function printf (printf, funcdef_no=15, decl_uid=964, cgraph_uid=16,
symbol_order=15)

Not splitting: disregarding inline limits.
__attribute__((artificial, gnu_inline, always_inline))
__attribute__((nonnull (1), format (printf, 1, 2)))
int printf (const char * restrict __fmt)
{
  int _4;

  <bb 2> [local count: 1073741824]:
  _4 = __printf_chk (1, __fmt_2(D), __builtin_va_arg_pack ());
  return _4;

}



;; Function test_split_write (test_split_write, funcdef_no=39, decl_uid=3184,
cgraph_uid=40, symbol_order=43)



Splitting function at:
Split point at BB 3
  header time: 1393.311190 header size: 33
  split time: 2.428800 split size: 3
  bbs: 3
  SSA names to pass:
;; 1 loops found
;;
;; Loop 0
;;  header 0, latch 1
;;  depth 0, outer -1
;;  nodes: 0 1
Introduced new external node (puts/53).

Symbols to be put in SSA form
{ D.3222 }
Incremental SSA update started at block: 0
Number of blocks in CFG: 5
Number of blocks to update: 4 ( 80%)


;; 1 loops found
;;
;; Loop 0
;;  header 0, latch 1
;;  depth 0, outer -1
;;  nodes: 0 1 4 2 3
;; 4 succs { 2 }
;; 2 succs { 3 }
;; 3 succs { 1 }
int test_split_write.part.0 ()

  parent reply	other threads:[~2023-10-04  2:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  9:41 [Bug c/111672] New: " hkzhang455 at gmail dot com
2023-10-03 16:37 ` [Bug ipa/111672] " pinskia at gcc dot gnu.org
2023-10-04  2:00 ` hkzhang455 at gmail dot com [this message]
2023-10-04  2:04 ` pinskia at gcc dot gnu.org
2023-10-04  2:08 ` hkzhang455 at gmail dot com
2023-10-04  5:24 ` pinskia at gcc dot gnu.org
2023-10-04  5:25 ` pinskia at gcc dot gnu.org
2023-10-04 13:48 ` hkzhang455 at gmail dot com
2023-10-04 13:49 ` hkzhang455 at gmail dot com
2023-10-04 23:58 ` pinskia at gcc dot gnu.org
2023-10-05  0:03 ` pinskia at gcc dot gnu.org
2023-10-06  2:48 ` hkzhang455 at gmail dot com
2023-10-06  2:59 ` pinskia at gcc dot gnu.org
2023-10-06 16:16 ` hkzhang455 at gmail dot com

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-111672-4-0QHF0W9NTN@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: link
Be 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).