diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-18 16:21:08 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-18 16:21:08 +0000 |
commit | dadb7503551583adb76c5115920d7d2e8b13481e (patch) | |
tree | 84b63c6bdefa887d08218dba3084880c6484eaaf /gcc/tree-pretty-print.c | |
parent | d872f90cc4807e8130a3f412885a67904f61fe22 (diff) | |
download | gcc-dadb7503551583adb76c5115920d7d2e8b13481e.tar.gz |
Add memory reuse to virtual operands in the operand scanner.
2006-12-18 Andrew MacLeod <amacleod@redhat.com>
* tree-ssa-operands.h (struct vdef_optype_d): Rename to voptype_d.
(struct vuse_optype_d): Delete.
(SSA_OPERAND_MEMORY_SIZE): Delete.
(struct ssa_operand_memory_d): Change mem array to size one.
(NUM_VOP_FREE_BUCKETS): Define.
(free_vuses, free_vdefs): Replace with vop_free_buckets array.
(vdef_ops, vuse_ops, struct ssa_operand_iterator_d): Use voptype_d type.
* tree-pretty-print.c (dump_vops): Use voptype_d type.
* tree-ssa-operands.c (vop_free_bucket_size): New. Number of operands
which fit into a chunk of memory from a specific bucket.
(vop_free_bucket_index): New. Find correct size memory bucket.
(init_vop_buckets): New. Initialize VOP free memory buckets.
(add_vop_to_freelist): New. Add a VOP to the correct free list.
(ssa_operand_mem_size): New. Current size of an operand memory chunk.
(init_ssa_operands): Initialize operand memory and free lists.
(fini_ssa_operands): Remove references to free_vuses and free_vdefs.
(ssa_operand_alloc): Use graduated size memory allocation.
(APPEND_OP_AFTER, MOVE_HEAD_AFTER, MOVE_HEAD_TO_FREELIST,
INITIALIZE_USE): Remove.
(alloc_vop): New. Allocate a virtual operand.
(alloc_vdef, alloc_vuse): Delete.
(add_def_op, add_use_op): Directly setup pointers.
(add_vop): New. Add a virtual operand.
(add_vuse_op, add_vdef_op): Call add_vop.
(realloc_vop): New. Reallocate a virtual operand.
(realloc_vdef, realloc_vuse): Call realloc_vop.
(finalize_ssa_def_ops): Delete. Move content to finalize_ssa_defs.
(finalize_ssa_defs): Optimize for common case, remove code based on
sorted pointers which was a waste of time.
(finalize_ssa_use_ops): Delete. Move content to finalize_ssa_uses.
(finalize_ssa_uses): Update last pointer.
(finalize_ssa_vdef_ops): Delete. Move content to finalize_ssa_vdefs.
(finalize_ssa_vdefs, finalize_ssa_vuse_ops): Use voptype_d and
directly manipulate pointers.
(copy_virtual_operands): Use voptype_d, and no need to update pointers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index e78b95c4f3b..e4f85c13275 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -2692,8 +2692,8 @@ newline_and_indent (pretty_printer *buffer, int spc) static void dump_vops (pretty_printer *buffer, tree stmt, int spc, int flags) { - struct vdef_optype_d *vdefs; - struct vuse_optype_d *vuses; + struct voptype_d *vdefs; + struct voptype_d *vuses; int i, n; if (!ssa_operands_active () || !stmt_references_memory_p (stmt)) |