From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A0C693851C0C; Fri, 22 May 2020 09:44:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0C693851C0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1590140678; bh=tAcqibeq0TFfConn+9BfVMB4uBygfbDjSjJGzEYYAG0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VYkhmk+gFW1aAxIwwKEV3CEO1MYTRnmwqX52hZN2bszQlVMcDXU23hLcM2hwQWJvA 9I3q4l0mRJZNSAUaXyMDO4hWh6eYxAUTademNv5aehL2h1lK4Q2iy1ybu+1hfIINVn Mtf+OFTmsz8RV5xEoZ2cJCCx9w0YhBFr50c4Jxsw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95264] Infinite Loop When Compiling Templated C++ code at -O1 and above Date: Fri, 22 May 2020 09:44:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: bug_status cf_reconfirmed_on everconfirmed 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: Fri, 22 May 2020 09:44:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95264 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2020-05-22 Ever confirmed|0 |1 --- Comment #3 from Richard Biener --- So with the [[gnu::flatten]] attributes removed -O1 needs 80 seconds to com= pile and about 3GB of memory, -O2 needs around 2 minutes (same memory), -O3 is the same as -O2. Maybe instead of [[gnu::flatten]] you want to bump --param inline-unit-grow= th or --param large-function-growth more moderately in case you can measure an effect on runtime. Note multiple [[gnu::flatten]] can really exponentially grow program size since it is not appearant which functions might be used from another translation unit until you can use -fwhole-program (single CU program) or -flto (but there [[gnu::flatten]] is applied to early to avoid such growth - sth we might want to fix). Placing things not used from outside in anonymous namespaces might help.=