ado@elsie.UUCP (Arthur David Olson) (06/08/89)
I've attached changes to the gcc 1.35 version of flow.c that let you use gcc to compile XV11R3 (in particular, to compile "server/ddx/cfbbitblt.c") on a Sun386i. On the Sun386i running SunOS 4.0.1, the stack size limit is an unchangeable 2048K; compiling "cfbbitblt.c" needs more than this amount of space in allocated memory. The changes arrange things so that the big amounts of storage needed for the flow analysis bit maps are taken from data space (by way of "xmalloc") rather than from stack spacse (by way of "alloca") to avoid overruning the limit. The folks at 1-800-USA-4SUN are aware of the stack size limit unchangeability bug, but don't know when a fix will be available. In the meantime. . . -- Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex. *** 1.1/flow.c Thu Jun 8 09:40:41 1989 --- 1.2/flow.c Thu Jun 8 09:40:41 1989 *************** *** 592,608 **** Their meanings are documented above, with their declarations. */ basic_block_live_at_end = (regset *) alloca (n_basic_blocks * sizeof (regset)); ! tem = (regset) alloca (n_basic_blocks * regset_bytes); bzero (tem, n_basic_blocks * regset_bytes); init_regset_vector (basic_block_live_at_end, tem, n_basic_blocks, regset_bytes); basic_block_new_live_at_end = (regset *) alloca (n_basic_blocks * sizeof (regset)); ! tem = (regset) alloca (n_basic_blocks * regset_bytes); bzero (tem, n_basic_blocks * regset_bytes); init_regset_vector (basic_block_new_live_at_end, tem, n_basic_blocks, regset_bytes); basic_block_significant = (regset *) alloca (n_basic_blocks * sizeof (regset)); ! tem = (regset) alloca (n_basic_blocks * regset_bytes); bzero (tem, n_basic_blocks * regset_bytes); init_regset_vector (basic_block_significant, tem, n_basic_blocks, regset_bytes); --- 592,608 ---- Their meanings are documented above, with their declarations. */ basic_block_live_at_end = (regset *) alloca (n_basic_blocks * sizeof (regset)); ! tem = (regset) xmalloc (n_basic_blocks * regset_bytes); bzero (tem, n_basic_blocks * regset_bytes); init_regset_vector (basic_block_live_at_end, tem, n_basic_blocks, regset_bytes); basic_block_new_live_at_end = (regset *) alloca (n_basic_blocks * sizeof (regset)); ! tem = (regset) xmalloc (n_basic_blocks * regset_bytes); bzero (tem, n_basic_blocks * regset_bytes); init_regset_vector (basic_block_new_live_at_end, tem, n_basic_blocks, regset_bytes); basic_block_significant = (regset *) alloca (n_basic_blocks * sizeof (regset)); ! tem = (regset) xmalloc (n_basic_blocks * regset_bytes); bzero (tem, n_basic_blocks * regset_bytes); init_regset_vector (basic_block_significant, tem, n_basic_blocks, regset_bytes); *************** *** 806,811 **** --- 806,814 ---- alloca (0); #endif } + free(basic_block_live_at_end[0]); + free(basic_block_new_live_at_end[0]); + free(basic_block_significant[0]); } /* Subroutines of life analysis. */