From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17701 invoked by alias); 6 Mar 2013 12:23:46 -0000 Received: (qmail 17626 invoked by uid 55); 6 Mar 2013 12:23:22 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55135] Segfault of gcc on a big file Date: Wed, 06 Mar 2013 12:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: compile-time-hog, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg00491.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55135 --- Comment #29 from rguenther at suse dot de 2013-03-06 12:23:21 UTC --- On Wed, 6 Mar 2013, steven at gcc dot gnu.org wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55135 > > --- Comment #28 from Steven Bosscher 2013-03-06 12:18:01 UTC --- > (In reply to comment #22) > > Posted for discussion here: > > http://gcc.gnu.org/ml/gcc-patches/2013-03/msg00193.html > > OT: Another trivial speed-up for bitmaps used as regsets (and probably > in general) is to look at head->first if head->current is not the element > containing the sought bit, and *not* update head->current if head->first > is the right element. This speeds up regsets because a common access > pattern is to look at sets containing both pseudos and hardregs, and on > most targets all hardregs are in head->first. Not updating head->current > preserves a pointer to the latest accessed pseudos. > > I'll implement this idea and come back with some timings. Indeed a nice idea ;) I suppose ->current should only be updated if its new distance to head->first is bigger than (and zero is of course an obvious one)