public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: "gcc-patches@gcc.gnu.org >> gcc-patches" <gcc-patches@gcc.gnu.org>
Subject: [RFA][PATCH] Adding missing calls to bitmap_clear
Date: Mon, 21 Mar 2016 19:10:00 -0000	[thread overview]
Message-ID: <56F0461C.3070601@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]


As noted last week, find_removable_extensions initializes several 
bitmaps, but doesn't clear them.

This is not strictly a leak as the GC system should find dead data, but 
it's better to go ahead and clear the bitmaps.  That releases the 
elements back to the cache and presumably makes things easier for the GC 
system as well.

Bootstrapped and regression tested on x86_64-linux-gnu.

OK for the trunk?

Jeff

[-- Attachment #2: P --]
[-- Type: text/plain, Size: 375 bytes --]

	* ree.c (find_removable_extensions): Clear the local bitmaps.

diff --git a/gcc/ree.c b/gcc/ree.c
index 13a7a05..3dc180c 100644
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -1139,6 +1139,10 @@ find_removable_extensions (void)
     }
 
   XDELETEVEC (def_map);
+  bitmap_clear (&init);
+  bitmap_clear (&kill);
+  bitmap_clear (&gen);
+  bitmap_clear (&tmp);
 
   return insn_list;
 }

             reply	other threads:[~2016-03-21 19:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 19:10 Jeff Law [this message]
2016-03-21 19:39 ` Bernd Schmidt
2016-03-21 20:40   ` Jeff Law
2016-03-22 10:22     ` Richard Biener
2016-04-28 19:35       ` Jeff Law
2016-04-29  8:06         ` Richard Biener

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=56F0461C.3070601@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).