From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32472 invoked by alias); 27 Nov 2012 16:01:07 -0000 Received: (qmail 32368 invoked by uid 22791); 27 Nov 2012 16:01:03 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 16:00:55 +0000 Received: from bonzini by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TdNaf-0001w5-Nr; Tue, 27 Nov 2012 11:00:53 -0500 From: Paolo Bonzini To: gcc-patches@gcc.gnu.org Cc: stevenb.gcc@gmail.com Subject: [PATCH] Fix allocation of reg_known_value Date: Tue, 27 Nov 2012 16:01:00 -0000 Message-Id: <1354032036-32387-1-git-send-email-bonzini@gnu.org> Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg02225.txt.bz2 When changing reg_known_value to a VEC, Steven sneaked in a small semantic change. That change has the advantage of improving compilation time substantially on some testcases (including PR55489), but it is a bit heavy-handed: it also makes set_known_reg_value a no-op, while get_known_reg_value will always return NULL. This patch fixes the VEC usage. Bootstrap/regtest in progress, but I'm going to commit this as obvious as soon as bootstrapping finishes. Paolo 2012-11-26 Paolo Bonzini * alias.c (init_alias_analysis): Fix allocation of reg_known_value. Index: ../../gcc/alias.c =================================================================== --- ../../gcc/alias.c (revisione 193853) +++ ../../gcc/alias.c (copia locale) @@ -2808,7 +2808,7 @@ init_alias_analysis (void) timevar_push (TV_ALIAS_ANALYSIS); - vec_alloc (reg_known_value, maxreg - FIRST_PSEUDO_REGISTER); + vec_safe_grow_cleared (reg_known_value, maxreg - FIRST_PSEUDO_REGISTER); reg_known_equiv_p = sbitmap_alloc (maxreg - FIRST_PSEUDO_REGISTER); /* If we have memory allocated from the previous run, use it. */