This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[match-and-simplify] out of memory allocation error
- From: Prathamesh Kulkarni <bilbotheelffriend at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, gcc <gcc at gcc dot gnu dot org>
- Date: Tue, 11 Nov 2014 16:03:46 +0530
- Subject: [match-and-simplify] out of memory allocation error
- Authentication-results: sourceware.org; auth=none
I moved definition of simplify::simplify outside the class (as in the
attached patch),
and I get following error during stage1 build:
out of memory allocating 16301357976 bytes after a total of 2026800 bytes
make[2]: *** [s-match] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2
Why does moving definition of simplify constructor outside the class cause
out of memory allocation ?
Thanks,
Prathamesh
Index: genmatch.c
===================================================================
--- genmatch.c (revision 217303)
+++ genmatch.c (working copy)
@@ -549,11 +549,7 @@
simplify (operand *match_, source_location match_location_,
struct operand *result_, source_location result_location_,
vec<if_or_with> ifexpr_vec_, vec<vec<user_id *> > for_vec_,
- cid_map_t *capture_ids_)
- : match (match_), match_location (match_location_),
- result (result_), result_location (result_location_),
- ifexpr_vec (ifexpr_vec_), for_vec (for_vec_),
- capture_ids (capture_ids_), capture_max (capture_ids_->elements () - 1) {}
+ cid_map_t *capture_ids_);
/* The expression that is matched against the GENERIC or GIMPLE IL. */
operand *match;
@@ -574,6 +570,20 @@
int capture_max;
};
+simplify::simplify (operand *match_, source_location match_location_,
+ operand *result_, source_location result_location_,
+ vec<if_or_with> ifexpr_vec_, vec< vec<user_id *> > for_vec_,
+ cid_map_t *capture_ids_)
+{
+ match = match_;
+ match_location = match_location_;
+ result = result_;
+ result_location = result_location_;
+ ifexpr_vec = ifexpr_vec_;
+ for_vec = for_vec_;
+ capture_ids = capture_ids_;
+}
+
/* Debugging routines for dumping the AST. */
DEBUG_FUNCTION void