public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
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	[thread overview]
Message-ID: <1354032036-32387-1-git-send-email-bonzini@gnu.org> (raw)

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  <pbonzini@redhat.com>

	* 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.  */

             reply	other threads:[~2012-11-27 16:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27 16:01 Paolo Bonzini [this message]
2012-11-27 16:32 ` Steven Bosscher
2012-11-29 22:51 Uros Bizjak
2012-11-30 10:43 ` Paolo Bonzini
2012-11-30 10:43   ` Steven Bosscher
2012-11-30 12:34     ` Uros Bizjak
2012-11-30 13:17       ` Uros Bizjak
2012-11-30 14:54       ` Steven Bosscher
2012-11-30 15:10         ` Steven Bosscher
2012-11-30 15:57         ` Uros Bizjak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354032036-32387-1-git-send-email-bonzini@gnu.org \
    --to=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=stevenb.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).