This is the mail archive of the
mailing list for the GCC project.
Re: Fix two more memory leaks in threader
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 May 2015 15:39:42 -0600
- Subject: Re: Fix two more memory leaks in threader
- Authentication-results: sourceware.org; auth=none
- References: <555CB809 dot 7020308 at redhat dot com> <20150520164135 dot GM1751 at tucnak dot redhat dot com>
On 05/20/2015 10:41 AM, Jakub Jelinek wrote:
On Wed, May 20, 2015 at 10:36:25AM -0600, Jeff Law wrote:
These fix the remaining leaks in the threader that I'm aware of. We failed
to properly clean-up when we had to cancel certain jump threading
opportunities. So thankfully this wasn't a big leak.
Bootstrapped and regression tested on x86_64-unknown-linux-gnu. Installed on
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fe4dfc4..27435c6 100644
@@ -1,3 +1,9 @@
+2015-05-20 Jeff Law <email@example.com>
+ * tree-ssa-threadupdate.c (mark_threaded_blocks): Properly
+ dispose of the jump thread path when the jump threading
+ opportunity is cancelled.
2015-05-20 Manuel López-Ibáñez <firstname.lastname@example.org>
* diagnostic.c (diagnostic_print_caret_line): Fix off-by-one error
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index c5b78a4..4bccad0 100644
@@ -2159,9 +2159,16 @@ mark_threaded_blocks (bitmap threaded_blocks)
/* Attach the path to the starting edge if none is yet recorded. */
if ((*path)->e->aux == NULL)
- (*path)->e->aux = path;
- else if (dump_file && (dump_flags & TDF_DETAILS))
- dump_jump_thread_path (dump_file, *path, false);
+ (*path)->e->aux = path;
Why the braces around single stmt if body?
To match what was happening in the else clause. I always find
even more stuff
more painful to parse because of the mis-matched indentation than
even more stuff
It's purely a style thing and if you'd prefer not to have the extra
braces, I wouldn't lose any sleep over removing them.
Looks like spaces vs tabs issue. I'll do a pass over
tree-ssa-threadedge.c and fix them all up at once.
Also, the indentation seems to be weird.