From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EE30D3858C2D; Thu, 2 Feb 2023 10:34:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EE30D3858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675334056; bh=LP3sFkya6ZjivNO4gAh6bxedeO7JJIdF9Q158VPYBo4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kyJU86BES0dt9w6uipHFMaDtKluw/fIsHqffM1+MZ5jbwkQ8Gs8JIwCwUcBMo80Db sO9r0Qa527lRCgncBT7//+SEHoJKSeLD9VZjUMK+YrYR5zIJtlXHU70jgh1aoBKS4o Ppao5Qu0wzg6dqOxrqo+UIvVYjgg+ocZAPLUhJhI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108500] [11/12 Regression] -O -finline-small-functions results in "internal compiler error: Segmentation fault" on a very large program (700k function calls) Date: Thu, 02 Feb 2023 10:34:16 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: compile-time-hog, ice-on-valid-code, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D108500 --- Comment #15 from Richard Biener --- To not look at "nothing" (after successful SRA it should indeed become almo= st nothing) I've added a store to a volatile 'x' global variable to the end of main: ... s2 =3D f(s1,s2); x =3D s2; return 0; } not using main but a function returning a struct would probably work as wel= l. Otherwise DCE/DSE will remove all code. Doing that reveals that RTL DSE (more specifically rtx_equal_for_cselib_1) is very slow (via dse_step1 calling cselib_process_insn). I do wonder if you can share the "real" testcase? It doesn't need to be able to link, preprocessed source would be enough.=