From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22089 invoked by alias); 31 Jan 2012 13:02:13 -0000 Received: (qmail 22074 invoked by uid 22791); 31 Jan 2012 13:02:12 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Jan 2012 13:01:59 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/52066] New: IRA and reginfo initialization too expensive Date: Tue, 31 Jan 2012 13:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: 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: 2012-01/txt/msg03670.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52066 Bug #: 52066 Summary: IRA and reginfo initialization too expensive Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org On compilation of an empty file, we spend almost half of the runtime on IRA and reginfo cost initialization. Inlining reg_class_subset_p and reg_classes_intersect_p gives us at least tiny part of compile time back, at the cost of some small code growth. For --enable-checking=release x86_64-linux cc1: ~/timing --drop 20 -c 2500 ./cc1.vanilla empty.c -quiet Strip out best and worst 500 realtime results minimum: 0.006243475 sec real / 0.000018634 sec CPU maximum: 0.032220578 sec real / 0.000203440 sec CPU average: 0.006542800 sec real / 0.000036352 sec CPU stdev : 0.000050402 sec real / 0.000004406 sec CPU ~/timing --drop 20 -c 2500 ./cc1 empty.c -quiet Strip out best and worst 500 realtime results minimum: 0.006115241 sec real / 0.000017569 sec CPU maximum: 0.033226603 sec real / 0.000197238 sec CPU average: 0.006384943 sec real / 0.000036349 sec CPU stdev : 0.000049180 sec real / 0.000004284 sec CPU readelf -WS cc1{.vanilla,} | grep '\text' [12] .text PROGBITS 00000000004b21a0 0b21a0 78e7b4 00 AX 0 0 16 [12] .text PROGBITS 00000000004b21a0 0b21a0 78ed34 00 AX 0 0 16