From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0F0603858421; Fri, 26 May 2023 20:03:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F0603858421 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685131430; bh=44m0mnHJzTE3acMrxoOvJ5wtmEhEQO2vRz/6xZdSl/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DHTzfftgsbogDUoqtMr94pmAWkhrZcBWGgj7Cg8tGVniEJEcqiuZiyyi2DaOQvXOg g6oZZanTWo6a8yaiPUrV5QcR0/KHt/bGRmlR4HqByqOHQOd9h509B69hdbOibeVtP7 xv1OABDfnRQSdnXaSlyBcCkF3475Qz23m3N+YaFQ= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/109983] [12/13/14 regression] Wireshark compilation hangs with -O2 -fipa-pta Date: Fri, 26 May 2023 20:03:49 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: compile-time-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109983 --- Comment #7 from Sergei Trofimovich --- Original packet-rnsap.c.i.xz takes 27 minutes to compile for me. The hack below cuts this time down to 9 minutes (slashes 60% of runtime).=20 The considerable amount of time is spent looking up the bitmaps for graph e= dges to extract and solve PT facts. I'd say there is a room for micro-optimization to turn bitmap to something slightly smarter than a linked list. It will not improve the runtime too mu= ch. Another option could be to put a limit on edge count (say, controlled by a `param`) which `gcc` could use to fallback on conservative value. --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -283,7 +283,7 @@ typedef unsigned long BITMAP_WORD; /* Number of words to use for each element in the linked list. */ #ifndef BITMAP_ELEMENT_WORDS -#define BITMAP_ELEMENT_WORDS ((128 + BITMAP_WORD_BITS - 1) / BITMAP_WORD_B= ITS) +#define BITMAP_ELEMENT_WORDS ((8192 + BITMAP_WORD_BITS - 1) / BITMAP_WORD_BITS) #endif /* Number of bits in each actual element of a bitmap. */=