[patch] tree-phinodes.c: Speed up remove_phi_arg_num.
Kazu Hirata
kazu@cs.umass.edu
Sat Oct 30 06:07:00 GMT 2004
Hi,
Attached is a patch to speed up remove_phi_arg_num by removing
unnecessary zeroing.
Now that the garbage collector no longer scans the array of PHI
arguments beyond num_args, we do not need to zero the PHI argument
that's being removed.
Note that all of these fields are properly set in add_phi_arg. In
other words, add_phi_arg does not do things like leaving
PHI_ARG_NONZERO as is, expecting it to be set to false in
remove_phi_arg_num.
Tested on i686-pc-linux-gnu. OK to apply?
Kazu Hirata
2004-10-30 Kazu Hirata <kazu@cs.umass.edu>
* tree-phinodes.c (remove_phi_arg_num): Do not zero the
element that's being removed.
Index: tree-phinodes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-phinodes.c,v
retrieving revision 2.14
diff -u -d -p -r2.14 tree-phinodes.c
--- tree-phinodes.c 29 Oct 2004 21:41:30 -0000 2.14
+++ tree-phinodes.c 29 Oct 2004 22:13:05 -0000
@@ -401,9 +401,6 @@ remove_phi_arg_num (tree phi, int i)
}
/* Shrink the vector and return. */
- SET_PHI_ARG_DEF (phi, num_elem - 1, NULL_TREE);
- PHI_ARG_EDGE (phi, num_elem - 1) = NULL;
- PHI_ARG_NONZERO (phi, num_elem - 1) = false;
PHI_NUM_ARGS (phi)--;
}
More information about the Gcc-patches
mailing list