From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 264BA3887034; Thu, 17 Dec 2020 10:06:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 264BA3887034 From: "marxin at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 10:06:20 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98338 --- Comment #8 from Martin Li=C5=A1ka --- 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)=20 Referring:=20 Availability: available Profile id: 1426567252 Function flags: count:15202 (precise) first_run:5548 body hot Called by:=20 Calls: _ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0 (speculative) (15202 (adjusted),1.00 per call)=20 Polymorphic indirect call of type const struct range_operator token:0(speculative) (0 (adjusted),0.00 per call) num speculative call targ= ets: 1 Outer type (dynamic):struct range_operator (or a derived type) offset 0 bool operator_plus::op1_range (const struct operator_plus * const this, str= uct irange & r, struct tree_node * type, const struct irange & lhs, const struct irange & op2) { [count: 15202]: range_op_handler_type_0_0.1_4 =3D range_op_handler_type_0_0; if (range_op_handler_type_0_0.1_4 =3D=3D 1) goto ; [0.00%] else goto ; [100.00%] [count: 0]: _11 =3D pointer_tree_table.m_range_tree[2]; goto ; [100.00%] [count: 15202]: if (range_op_handler_type_0_0.1_4 !=3D 0) goto ; [100.00%] else goto ; [0.00%] [count: 15202]: _12 =3D integral_tree_table.m_range_tree[2]; [count: 15202]: # _13 =3D PHI <_11(3), 0B(4), _12(5)> _1 =3D _13->_vptr.range_operator; _2 =3D *_1; _10 =3D 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 =3D 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)=20 Referring:=20 Availability: available Profile id: 1031185534 Function flags: count:15141 (precise) first_run:6411 body icf_merged hot Called by:=20 Calls: _ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0 (speculative) (15141 (adjusted),1.00 per call)=20 Polymorphic indirect call of type const struct range_operator token:0(speculative) (0 (adjusted),0.00 per call) num speculative call targ= ets: 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, str= uct irange & r, struct tree_node * type, const struct irange & lhs, const struct irange & op1) { [count: 15141]: range_op_handler_type_0_0.1_4 =3D range_op_handler_type_0_0; if (range_op_handler_type_0_0.1_4 =3D=3D 1) goto ; [0.00%] else goto ; [100.00%] [count: 0]: _11 =3D pointer_tree_table.m_range_tree[2]; goto ; [100.00%] [count: 15141]: if (range_op_handler_type_0_0.1_4 !=3D 0) goto ; [100.00%] else goto ; [0.00%] [count: 15141]: _12 =3D integral_tree_table.m_range_tree[2]; [count: 15141]: # _13 =3D PHI <_11(3), 0B(4), _12(5)> _1 =3D _13->_vptr.range_operator; _2 =3D *_1; _10 =3D 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 =3D 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)=20 Referring:=20 Availability: available Profile id: 1426567252 Function flags: count:30343 (precise) first_run:5548 body icf_merged hot Called by:=20 Calls: _ZNK14range_operator10fold_rangeER6irangeP9tree_nodeRKS0_S5_/0 (speculative) (30343 (adjusted),1.00 per call)=20 Polymorphic indirect call of type const struct range_operator token:0(speculative) (0 (adjusted),0.00 per call) num speculative call targ= ets: 1 Outer type (dynamic):struct range_operator (or a derived type) offset 0 $30 =3D void (gdb) p debug_function(dst->decl, 0) bool operator_plus::op1_range (const struct operator_plus * const this, str= uct irange & r, struct tree_node * type, const struct irange & lhs, const struct irange & op2) { [count: 30343]: range_op_handler_type_0_0.1_4 =3D range_op_handler_type_0_0; if (range_op_handler_type_0_0.1_4 =3D=3D 1) goto ; [0.00%] else goto ; [100.00%] [count: 0]: _11 =3D pointer_tree_table.m_range_tree[2]; goto ; [INV] [count: 30343]: if (range_op_handler_type_0_0.1_4 !=3D 0) goto ; [100.00%] else goto ; [0.00%] [count: 30343]: _12 =3D integral_tree_table.m_range_tree[2]; [count: 30343]: # _13 =3D PHI <_11(3), 0B(4), _12(5)> _1 =3D _13->_vptr.range_operator; _2 =3D *_1; _10 =3D 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 =3D { estimated_self_stack_size =3D 0, self_size =3D 21, size =3D 30 } @Honza: Can you please take a look?=