This is the mail archive of the
mailing list for the GCC project.
[patch] tree-cfg.c: Reduce the amount of memory allocated inthread_jumps.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 02 Dec 2004 10:26:39 -0500 (EST)
- Subject: [patch] tree-cfg.c: Reduce the amount of memory allocated inthread_jumps.
Attached is a patch to reduce the amount of memory allocated in
In thread_jumps, we make sure that no duplicate basic block is entered
into WORKLIST. We never put ENTRY_BLOCK_PTR or EXIT_BLOCK_PTR,
either, so WORKLIST with N_BASIC_BLOCKS entries is big enough.
Tested on i686-pc-linux-gnu. OK to apply?
This patch is also a part of Zdenek's patch to fix PR 18601.
2004-12-02 Kazu Hirata <firstname.lastname@example.org>
* tree-cfg.c (thread_jumps): Reduce the size of WORKLIST.
RCS file: /cvs/gcc/gcc/gcc/tree-cfg.c,v
retrieving revision 2.129
diff -u -d -p -r2.129 tree-cfg.c
--- tree-cfg.c 30 Nov 2004 03:52:37 -0000 2.129
+++ tree-cfg.c 1 Dec 2004 21:12:47 -0000
@@ -4107,7 +4107,7 @@ thread_jumps (void)
bool retval = false;
- basic_block *worklist = xmalloc (sizeof (basic_block) * last_basic_block);
+ basic_block *worklist = xmalloc (sizeof (basic_block) * n_basic_blocks);
basic_block *current = worklist;