public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
Date: Thu, 17 Dec 2020 10:06:19 +0000	[thread overview]
Message-ID: <bug-98338-4-OcxnqCNw4U@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98338-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
So the following 2 functions are merged:

(gdb) p original->debug()
_ZNK13operator_plus9op1_rangeER6irangeP9tree_nodeRKS0_S5_/1 (bool
operator_plus::op1_range(irange&, tree, const irange&, const irange&) const)
@0x7ffff756b000
  Type: function definition analyzed
  Visibility: externally_visible public
  References: range_op_handler_type_0_0/6 (read) pointer_tree_table/5 (read)
integral_tree_table/4 (read)
_ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0 (addr)
(speculative) 
  Referring: 
  Availability: available
  Profile id: 1426567252
  Function flags: count:15202 (precise) first_run:5548 body hot
  Called by: 
  Calls: _ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0
(speculative) (15202 (adjusted),1.00 per call) 
   Polymorphic indirect call of type const struct range_operator
token:0(speculative) (0 (adjusted),0.00 per call) num speculative call targets:
1
    Outer type (dynamic):struct range_operator (or a derived type) offset 0

bool operator_plus::op1_range (const struct operator_plus * const this, struct
irange & r, struct tree_node * type, const struct irange & lhs, const struct
irange & op2)
{
  <bb 2> [count: 15202]:
  range_op_handler_type_0_0.1_4 = range_op_handler_type_0_0;
  if (range_op_handler_type_0_0.1_4 == 1)
    goto <bb 3>; [0.00%]
  else
    goto <bb 4>; [100.00%]

  <bb 3> [count: 0]:
  _11 = pointer_tree_table.m_range_tree[2];
  goto <bb 6>; [100.00%]

  <bb 4> [count: 15202]:
  if (range_op_handler_type_0_0.1_4 != 0)
    goto <bb 5>; [100.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 5> [count: 15202]:
  _12 = integral_tree_table.m_range_tree[2];

  <bb 6> [count: 15202]:
  # _13 = PHI <_11(3), 0B(4), _12(5)>
  _1 = _13->_vptr.range_operator;
  _2 = *_1;
  _10 = OBJ_TYPE_REF(_2;(const struct range_operator)_13->0) (_13, r_5(D),
type_6(D), lhs_7(D), op2_8(D));
  return _10;

}

$26 = void
(gdb) p alias->debug()
_ZNK13operator_plus9op2_rangeER6irangeP9tree_nodeRKS0_S5_/2 (bool
operator_plus::op2_range(irange&, tree, const irange&, const irange&) const)
@0x7ffff756b110
  Type: function definition analyzed
  Visibility: externally_visible public
  References: range_op_handler_type_0_0/6 (read) pointer_tree_table/5 (read)
integral_tree_table/4 (read)
_ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0 (addr)
(speculative) 
  Referring: 
  Availability: available
  Profile id: 1031185534
  Function flags: count:15141 (precise) first_run:6411 body icf_merged hot
  Called by: 
  Calls: _ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0
(speculative) (15141 (adjusted),1.00 per call) 
   Polymorphic indirect call of type const struct range_operator
token:0(speculative) (0 (adjusted),0.00 per call) num speculative call targets:
1
    Outer type (dynamic):struct range_operator (or a derived type) offset 0

(gdb) p debug_function(alias->decl, 0)
bool operator_plus::op2_range (const struct operator_plus * const this, struct
irange & r, struct tree_node * type, const struct irange & lhs, const struct
irange & op1)
{
  <bb 2> [count: 15141]:
  range_op_handler_type_0_0.1_4 = range_op_handler_type_0_0;
  if (range_op_handler_type_0_0.1_4 == 1)
    goto <bb 3>; [0.00%]
  else
    goto <bb 4>; [100.00%]

  <bb 3> [count: 0]:
  _11 = pointer_tree_table.m_range_tree[2];
  goto <bb 6>; [100.00%]

  <bb 4> [count: 15141]:
  if (range_op_handler_type_0_0.1_4 != 0)
    goto <bb 5>; [100.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 5> [count: 15141]:
  _12 = integral_tree_table.m_range_tree[2];

  <bb 6> [count: 15141]:
  # _13 = PHI <_11(3), 0B(4), _12(5)>
  _1 = _13->_vptr.range_operator;
  _2 = *_1;
  _10 = OBJ_TYPE_REF(_2;(const struct range_operator)_13->0) (_13, r_5(D),
type_6(D), lhs_7(D), op1_8(D));
  return _10;

}

As seen both have a speculative indirect call. That's properly merged into:

$29 = void
(gdb) p dst->debug()
_ZNK13operator_plus9op1_rangeER6irangeP9tree_nodeRKS0_S5_/1 (bool
operator_plus::op1_range(irange&, tree, const irange&, const irange&) const)
@0x7ffff756b000
  Type: function definition analyzed
  Visibility: externally_visible public
  References: range_op_handler_type_0_0/6 (read) pointer_tree_table/5 (read)
integral_tree_table/4 (read)
_ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0 (addr)
(speculative) 
  Referring: 
  Availability: available
  Profile id: 1426567252
  Function flags: count:30343 (precise) first_run:5548 body icf_merged hot
  Called by: 
  Calls: _ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0
(speculative) (30343 (adjusted),1.00 per call) 
   Polymorphic indirect call of type const struct range_operator
token:0(speculative) (0 (adjusted),0.00 per call) num speculative call targets:
1
    Outer type (dynamic):struct range_operator (or a derived type) offset 0
$30 = void
(gdb) p debug_function(dst->decl, 0)
bool operator_plus::op1_range (const struct operator_plus * const this, struct
irange & r, struct tree_node * type, const struct irange & lhs, const struct
irange & op2)
{
  <bb 2> [count: 30343]:
  range_op_handler_type_0_0.1_4 = range_op_handler_type_0_0;
  if (range_op_handler_type_0_0.1_4 == 1)
    goto <bb 3>; [0.00%]
  else
    goto <bb 4>; [100.00%]

  <bb 3> [count: 0]:
  _11 = pointer_tree_table.m_range_tree[2];
  goto <bb 6>; [INV]

  <bb 4> [count: 30343]:
  if (range_op_handler_type_0_0.1_4 != 0)
    goto <bb 5>; [100.00%]
  else
    goto <bb 6>; [0.00%]

  <bb 5> [count: 30343]:
  _12 = integral_tree_table.m_range_tree[2];

  <bb 6> [count: 30343]:
  # _13 = PHI <_11(3), 0B(4), _12(5)>
  _1 = _13->_vptr.range_operator;
  _2 = *_1;
  _10 = OBJ_TYPE_REF(_2;(const struct range_operator)_13->0) (_13, r_5(D),
type_6(D), lhs_7(D), op2_8(D));
  return _10;

}

which seems fine. But we end up with an inliner checking error:

(gdb) p *size_info
$33 = {
  estimated_self_stack_size = 0,
  self_size = 21,
  size = 30
}

@Honza: Can you please take a look?

  parent reply	other threads:[~2020-12-17 10:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  0:50 [Bug bootstrap/98338] New: " jakub at gcc dot gnu.org
2020-12-17  0:52 ` [Bug bootstrap/98338] " jakub at gcc dot gnu.org
2020-12-17  0:53 ` jakub at gcc dot gnu.org
2020-12-17  8:31 ` marxin at gcc dot gnu.org
2020-12-17  9:03 ` marxin at gcc dot gnu.org
2020-12-17  9:50 ` marxin at gcc dot gnu.org
2020-12-17  9:51 ` marxin at gcc dot gnu.org
2020-12-17 10:02 ` jakub at gcc dot gnu.org
2020-12-17 10:06 ` marxin at gcc dot gnu.org [this message]
2020-12-17 10:09 ` marxin at gcc dot gnu.org
2021-01-04 15:45 ` rguenth at gcc dot gnu.org
2021-01-28 16:08 ` jakub at gcc dot gnu.org
2021-01-28 21:26 ` hubicka at ucw dot cz
2021-01-28 21:34 ` hubicka at ucw dot cz
2021-01-29 17:16 ` jakub at gcc dot gnu.org
2021-02-01  8:26 ` marxin at gcc dot gnu.org
2021-02-12 17:32 ` marxin at gcc dot gnu.org
2021-02-12 17:33 ` [Bug bootstrap/98338] [10/11 " marxin at gcc dot gnu.org
2021-02-14 22:31 ` hubicka at gcc dot gnu.org
2021-02-26 12:21 ` jakub at gcc dot gnu.org
2021-02-26 17:07 ` hubicka at ucw dot cz
2021-02-26 17:36 ` jakub at gcc dot gnu.org
2021-02-26 17:38   ` Jan Hubicka
2021-02-26 17:38 ` hubicka at ucw dot cz
2021-02-26 17:42 ` jakub at gcc dot gnu.org
2021-03-01 12:25 ` jakub at gcc dot gnu.org
2021-03-01 13:37 ` cvs-commit at gcc dot gnu.org
2021-03-01 13:38 ` hubicka at gcc dot gnu.org
2021-03-02 14:54 ` cvs-commit at gcc dot gnu.org

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-98338-4-OcxnqCNw4U@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).