From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43927 invoked by alias); 29 Mar 2019 14:46:19 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 43687 invoked by uid 48); 29 Mar 2019 14:46:15 -0000 From: "vries at gcc dot gnu.org" To: dwz@sourceware.org Subject: [Bug default/24399] Dead code in partition_dups_1 Date: Tue, 01 Jan 2019 00:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q1/txt/msg00159.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D24399 --- Comment #1 from Tom de Vries --- I think this fixes it: ... diff --git a/dwz.c b/dwz.c index 6b6a33e..9728400 100644 --- a/dwz.c +++ b/dwz.c @@ -5347,7 +5347,7 @@ partition_dups_1 (dw_die_ref *arr, size_t vec_size, the same set of referrers, try to see if we can put also those into the partial unit. They can be put there only if they don't refer to DIEs that won't be put into partial units. */ - if (second_phase && force && force < j - k) + if (second_phase && force && force < j - i) { /* First optimistically assume all such DIEs can be put there, thus mark all such DIEs as going to be included, so that ... Note: j - i is the size of the partition [i,j). The intention of the test 'force < j - k' is to test whether there are any unforced dies in the partition. If all dies in the partition are forced, th= an there's no need to enter this clause. So overall, the code tests whether in the second phase, there are some forc= ed dies (force > 0) and some unforced dies (force < j - i). If there are no fo= rced dies, we're done. If there are only forced dies, we're also done. If there = are some forced and unforced dies, try to add unforced dies to the partial unit already assigned the forced dies. --=20 You are receiving this mail because: You are on the CC list for the bug.