[PATCH ggc] fix ggc_alloc_rtvec_resized
Liang Wang
netcasper@gmail.com
Tue Aug 16 12:00:00 GMT 2011
Current implementation of ggc_alloc_rtvec_resized allocates more
spaces for rtvec. This patch uses original formula to compute size
for rtvec. Bootstrap on x86_64 successfully.
OK for trunk?
By the way, I don't have write access to SVN repository yet. Could
you please help commit it after approval?
Liang.
2011-08-16 Liang Wang <lwang1@marvell.com>
* ggc.h (ggc_alloc_rtvec_sized): Change arguments of
ggc_alloc_zone_vec_rtvec_def.
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 7f2144c..07f0dda 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -266,8 +266,9 @@ extern struct alloc_zone tree_zone;
extern struct alloc_zone tree_id_zone;
#define ggc_alloc_rtvec_sized(NELT) \
- (ggc_alloc_zone_vec_rtvec_def (sizeof (rtx), \
- sizeof (struct rtvec_def) + ((NELT) - 1), \
+ (ggc_alloc_zone_vec_rtvec_def (1, \
+ sizeof (struct rtvec_def) \
+ + ((NELT) - 1) * sizeof (rtx), \
&rtl_zone))
#if defined (GGC_ZONE) && !defined (GENERATOR_FILE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: changelog
Type: application/octet-stream
Size: 132 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110816/9133ffb3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ggc.patch
Type: application/octet-stream
Size: 719 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110816/9133ffb3/attachment-0001.obj>
More information about the Gcc-patches
mailing list