public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux
@ 2020-12-17  0:50 jakub at gcc dot gnu.org
  2020-12-17  0:52 ` [Bug bootstrap/98338] " jakub at gcc dot gnu.org
                   ` (26 more replies)
  0 siblings, 27 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-17  0:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98338
           Summary: [11 Regression] profiledbootstrap failure on
                    x86_64-linux
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

r11-6148 fails profiledbootstrap on x86_64-linux, the error is:
during IPA pass: icf
../../gcc/range-op.cc:3444:1: internal compiler error: in compute_fn_summary,
at ipa-fnsummary.c:3138
0x1385f82 compute_fn_summary(cgraph_node*, bool)
../../gcc/ipa-fnsummary.c:3138
0x14092d3 ipa_merge_profiles(cgraph_node*, cgraph_node*, bool)
../../gcc/ipa-utils.c:750
0x28af067 ipa_icf::sem_function::merge(ipa_icf::sem_item*)
../../gcc/ipa-icf.c:1272
0x28b7290 ipa_icf::sem_item_optimizer::merge_classes(unsigned int, unsigned
int)
../../gcc/ipa-icf.c:3420
0x28b3b85 ipa_icf::sem_item_optimizer::execute()
../../gcc/ipa-icf.c:2460
0x28b7ab4 ipa_icf_driver
../../gcc/ipa-icf.c:3584
0x28ba37e ipa_icf::pass_ipa_icf::execute(function*)
../../gcc/ipa-icf.c:3631
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reduced testcase:
.../cc1plus -fpreprocessed range-op.ii -quiet -dumpbase range-op.cc
-dumpbase-ext .cc -mtune=generic -march=x86-64 -g -grecord-gcc-switches -O2
-Wformat-security -Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wno-error=format-diag -Wsuggest-attribute=format -Woverloaded-virtual
-Wpedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -version
-fno-PIE -fstack-clash-protection -fcf-protection=full -fprofile-use
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -o range-op.s

I'll attach range-op.ii and range-op.gcda

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
@ 2020-12-17  0:52 ` jakub at gcc dot gnu.org
  2020-12-17  0:53 ` jakub at gcc dot gnu.org
                   ` (25 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-17  0:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49781
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49781&action=edit
range-op.ii.xz

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux 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
                   ` (24 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-17  0:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49782
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49782&action=edit
range-op.gcda

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux 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
                   ` (23 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-12-17

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Reproduced, looking into it now.

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  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
                   ` (22 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at debian dot org

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 98045 has been marked as a duplicate of this bug. ***

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  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
                   ` (21 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 49785
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49785&action=edit
Reduced test-case

I reduced both the source file and the corresponding GCDA file.

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  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
                   ` (20 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
      Known to fail|                            |11.0
      Known to work|                            |10.2.0
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-5162-gd8cf89767492a41b0f76e0aa302dddee4e1b3434 where Honza
improved merging of OBJ_TYPE_REFs.

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  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
                   ` (19 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-17 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Doesn't that just enable the possibility of ICF optimization of those:
bool
operator_plus::op1_range (irange &r, tree type,
                          const irange &lhs,
                          const irange &op2) const
{
  return range_op_handler (MINUS_EXPR, type)->fold_range (r, type, lhs, op2);
}

bool
operator_plus::op2_range (irange &r, tree type,
                          const irange &lhs,
                          const irange &op1) const
{
  return range_op_handler (MINUS_EXPR, type)->fold_range (r, type, lhs, op1);
}
methods?

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-12-17 10:02 ` jakub at gcc dot gnu.org
@ 2020-12-17 10:06 ` marxin at gcc dot gnu.org
  2020-12-17 10:09 ` marxin at gcc dot gnu.org
                   ` (18 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17 10:06 UTC (permalink / raw)
  To: gcc-bugs

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?

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2020-12-17 10:06 ` marxin at gcc dot gnu.org
@ 2020-12-17 10:09 ` marxin at gcc dot gnu.org
  2021-01-04 15:45 ` rguenth at gcc dot gnu.org
                   ` (17 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #7)
> Doesn't that just enable the possibility of ICF optimization of those:
> bool
> operator_plus::op1_range (irange &r, tree type,
>                           const irange &lhs,
>                           const irange &op2) const
> {
>   return range_op_handler (MINUS_EXPR, type)->fold_range (r, type, lhs, op2);
> }
> 
> bool
> operator_plus::op2_range (irange &r, tree type,
>                           const irange &lhs,
>                           const irange &op1) const
> {
>   return range_op_handler (MINUS_EXPR, type)->fold_range (r, type, lhs, op1);
> }
> methods?

Yes. The problem is related to the speculative indirect call.

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  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
                   ` (16 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-04 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
           Priority|P3                          |P1

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  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
                   ` (15 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-28 16:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Honza, any ideas on this?

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  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
                   ` (14 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: hubicka at ucw dot cz @ 2021-01-28 21:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Jan Hubicka <hubicka at ucw dot cz> ---
> Honza, any ideas on this?
The comment on assert says
 /* In LTO mode we may have speculative edges set.  */
 gcc_assert (in_lto_p || size_info->size == size_info->self_size);             
Which seems expected because the speculative edges are not accounted by
self_size. So perhaps we simply want to track if there is speculative
edge and disable the sanity check inthat case.

Honza

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  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
                   ` (13 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: hubicka at ucw dot cz @ 2021-01-28 21:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jan Hubicka <hubicka at ucw dot cz> ---
> > Honza, any ideas on this?
> The comment on assert says
>  /* In LTO mode we may have speculative edges set.  */
>  gcc_assert (in_lto_p || size_info->size == size_info->self_size);             
> Which seems expected because the speculative edges are not accounted by
> self_size. So perhaps we simply want to track if there is speculative
> edge and disable the sanity check inthat case.
https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg01650.html
is the patch that intoduced the comment and it seems it does right
thing.  size_inf->self_size is normally computed from original function
body and if speculation is added it is not udpated, while
size_info->size contains size adjusted by all speculations and inline
decision, so in presence of speculatie edges we can not expect both to
match.

I will check tomorrow if it makes code to compile.

Honza
> 
> Honza

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  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
                   ` (12 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-29 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #5)
> Created attachment 49785 [details]
> Reduced test-case
> 
> I reduced both the source file and the corresponding GCDA file.

How do you reduce a gcda file together with the original source?
For testsuite, it would be best if we could turn it into a self-contained
runnable testcase which we could train and then ICE (or with fixed compiler
compile).

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  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
                   ` (11 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-01  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Martin Liška <marxin at gcc dot gnu.org> ---
> How do you reduce a gcda file together with the original source?

I did it in 2 steps. I first reduced the source file and then I wrote an
experimental binary reducer that removes GCDA function entries.

> For testsuite, it would be best if we could turn it into a self-contained
> runnable testcase which we could train and then ICE (or with fixed compiler
> compile).

Yes, that would be nice.

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

* [Bug bootstrap/98338] [11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-12 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.suse.com/s
                   |                            |how_bug.cgi?id=1182016

--- Comment #15 from Martin Liška <marxin at gcc dot gnu.org> ---
We likely have a crash report that points to GCC 10.

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2021-02-12 17:32 ` marxin at gcc dot gnu.org
@ 2021-02-12 17:33 ` marxin at gcc dot gnu.org
  2021-02-14 22:31 ` hubicka at gcc dot gnu.org
                   ` (9 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-02-12 17:33 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11 Regression]             |[10/11 Regression]
                   |profiledbootstrap failure   |profiledbootstrap failure
                   |on x86_64-linux             |on x86_64-linux
      Known to work|10.2.0                      |
      Known to fail|                            |10.2.0

--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> ---
> I will check tomorrow if it makes code to compile.

Honza, can you please take a look?

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-02-14 22:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
I am testing
diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index e32e69cd3ad..612880240dc 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -3137,11 +3137,18 @@ compute_fn_summary (struct cgraph_node *node, bool
early)
   info->estimated_stack_size = size_info->estimated_self_stack_size;

   /* Code above should compute exactly the same result as
-     ipa_update_overall_fn_summary but because computation happens in
-     different order the roundoff errors result in slight changes.  */
+     ipa_update_overall_fn_summary except for case when speculative
+     edges are present since these are accounted to size but not
+     self_size. Do not compare time since different order the roundoff
+     errors result in slight changes.  */
   ipa_update_overall_fn_summary (node);
-  /* In LTO mode we may have speculative edges set.  */
-  gcc_assert (in_lto_p || size_info->size == size_info->self_size);
+  if (flag_checking)
+    {
+      for (e = node->indirect_calls; e; e = e->next_callee)
+       if (e->speculative)
+         break;
+      gcc_assert (e || size_info->size == size_info->self_size);
+    }
 }

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-26 12:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Honza, any progress with this?
If you want, I can test the patch too...

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: hubicka at ucw dot cz @ 2021-02-26 17:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Jan Hubicka <hubicka at ucw dot cz> ---
> Honza, any progress with this?
> If you want, I can test the patch too...
Sorry, it bootstrapped, so I will commit it.

Honza

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  26 siblings, 1 reply; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-26 17:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
FYI, I have today bootstrapped it as well in rpm build on
{x86_64,i686,powerpc64le}-linux, both your patch and just trunk without the
workaround I've been using before.  The latter failed to bootstrap on i686
and passed it on x86_64 and powerpc64le, the former passed bootstrap on all
arches.  make check is still ongoing...

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

* Re: [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2021-02-26 17:36 ` jakub at gcc dot gnu.org
@ 2021-02-26 17:38   ` Jan Hubicka
  0 siblings, 0 replies; 29+ messages in thread
From: Jan Hubicka @ 2021-02-26 17:38 UTC (permalink / raw)
  To: jakub at gcc dot gnu.org; +Cc: gcc-bugs

> FYI, I have today bootstrapped it as well in rpm build on
> {x86_64,i686,powerpc64le}-linux, both your patch and just trunk without the
> workaround I've been using before.  The latter failed to bootstrap on i686
> and passed it on x86_64 and powerpc64le, the former passed bootstrap on all
> arches.  make check is still ongoing...
Good, so it fixes i686 bootstrap, right?

Honza


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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2021-02-26 17:36 ` jakub at gcc dot gnu.org
@ 2021-02-26 17:38 ` hubicka at ucw dot cz
  2021-02-26 17:42 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: hubicka at ucw dot cz @ 2021-02-26 17:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Jan Hubicka <hubicka at ucw dot cz> ---
> FYI, I have today bootstrapped it as well in rpm build on
> {x86_64,i686,powerpc64le}-linux, both your patch and just trunk without the
> workaround I've been using before.  The latter failed to bootstrap on i686
> and passed it on x86_64 and powerpc64le, the former passed bootstrap on all
> arches.  make check is still ongoing...
Good, so it fixes i686 bootstrap, right?

Honza

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-02-26 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yes.  https://kojipkgs.fedoraproject.org//work/tasks/2451/62722451/build.log
is the failed i686 bootstrap and
https://kojipkgs.fedoraproject.org//work/tasks/2553/62722553/build.log is one
with your patch.

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (22 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  26 siblings, 0 replies; 29+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-01 12:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The make check results also looked ok on all 3 arches.

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (23 preceding siblings ...)
  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
  26 siblings, 0 replies; 29+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-01 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:150bde36c119eff4b8a74667c9d728d6a8a5e8a1

commit r11-7440-g150bde36c119eff4b8a74667c9d728d6a8a5e8a1
Author: Jan Hubicka <jh@suse.cz>
Date:   Mon Mar 1 14:36:11 2021 +0100

    Fix ICE in compute_fn_summary

            PR ipa/98338
            * ipa-fnsummary.c (compute_fn_summary): Fix sanity check.

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (24 preceding siblings ...)
  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
  26 siblings, 0 replies; 29+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-03-01 13:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #25 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed. Sorry for the delay - next time I should not commit into a private
branch :(

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

* [Bug bootstrap/98338] [10/11 Regression] profiledbootstrap failure on x86_64-linux
  2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux jakub at gcc dot gnu.org
                   ` (25 preceding siblings ...)
  2021-03-01 13:38 ` hubicka at gcc dot gnu.org
@ 2021-03-02 14:54 ` cvs-commit at gcc dot gnu.org
  26 siblings, 0 replies; 29+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-02 14:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #26 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jan Hubicka
<hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:62125ef043e19c58780bc06d0e2f2221bbbf28f6

commit r10-9401-g62125ef043e19c58780bc06d0e2f2221bbbf28f6
Author: Jan Hubicka <jh@suse.cz>
Date:   Mon Mar 1 14:36:11 2021 +0100

    Fix ICE in compute_fn_summary

            PR ipa/98338
            * ipa-fnsummary.c (compute_fn_summary): Fix sanity check.

    (cherry picked from commit 150bde36c119eff4b8a74667c9d728d6a8a5e8a1)

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

end of thread, other threads:[~2021-03-02 14:54 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17  0:50 [Bug bootstrap/98338] New: [11 Regression] profiledbootstrap failure on x86_64-linux 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
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

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).