This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix memory leak in predict.c


The problem is that we were not freeing a bitmap because we called
scev_reset which just emptied the bitmap and did not free it.
We should call scev_finalize instead.

OK? Bootstrapped and tested on powerpc-darwin with no regressions.

Thanks,
Andrew Pinski

ChangeLog:
	* predict.c (predict_loops): Call scev_finalize instead of
	scev_reset.

Index: predict.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/predict.c,v
retrieving revision 1.128
diff -u -p -r1.128 predict.c
--- predict.c	28 Sep 2004 07:59:48 -0000	1.128
+++ predict.c	12 Oct 2004 14:39:45 -0000
@@ -695,7 +695,7 @@ predict_loops (struct loops *loops_info,
     }

if (!rtlsimpleloops)
- scev_reset ();
+ scev_finalize ();
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]