From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6188 invoked by alias); 7 May 2012 12:38:02 -0000 Received: (qmail 5922 invoked by uid 22791); 7 May 2012 12:38:00 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED 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; Mon, 07 May 2012 12:37:48 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/29442] insn-attrtab has grown too large Date: Mon, 07 May 2012 12:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: compile-time-hog, memory-hog, patch X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED 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: 2012-05/txt/msg00740.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29442 --- Comment #19 from Jakub Jelinek 2012-05-07 12:36:21 UTC --- (In reply to comment #18) > (In reply to comment #15) > Meanwhile Jakub implemented a different mean which doesn't call the get_attr_ > functions dynamically more often (which my approach potentially does), but > which as result isn't nearly as effective in reducing size and compile and > generation time. For reducing compile time (but not size/generation), we could just use the cache vars with some magic unset value (probably the cache vars would need to be int instead of enum for that). Then if genattrtab finds out that there is no dominating call to the get_attr_* function, but still potentially for one insn the same get_attr_* might be called more than once in certain code path, then for that code path it could just use (cache_FOO != -1 ? (enum ...) cache_FOO : (cache_FOO = get_attr_FOO (...))).