Commit dfa27ef1 by Richard Henderson Committed by Richard Henderson

tree.c (make_node): Call bzero instead of inline clear.

        * tree.c (make_node): Call bzero instead of inline clear.
        (copy_node, make_tree_vec, build1): Likewise.
        (get_identifier): Call strlen instead of inline count.
        (maybe_get_identifier): Likewise.

From-SVN: r24599
parent dfb31eec
Sat Jan 9 18:35:29 1999 Richard Henderson <rth@cygnus.com>
* tree.c (make_node): Call bzero instead of inline clear.
(copy_node, make_tree_vec, build1): Likewise.
(get_identifier): Call strlen instead of inline count.
(maybe_get_identifier): Likewise.
Sun Jan 10 14:04:51 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz> Sun Jan 10 14:04:51 1999 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.md: (in_annul_slot_3): Allow unarycc and binarycc * config/c4x/c4x.md: (in_annul_slot_3): Allow unarycc and binarycc
......
...@@ -1071,19 +1071,13 @@ make_node (code) ...@@ -1071,19 +1071,13 @@ make_node (code)
} }
t = (tree) obstack_alloc (obstack, length); t = (tree) obstack_alloc (obstack, length);
bzero (t, length);
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
tree_node_counts[(int)kind]++; tree_node_counts[(int)kind]++;
tree_node_sizes[(int)kind] += length; tree_node_sizes[(int)kind] += length;
#endif #endif
/* Clear a word at a time. */
for (i = (length / sizeof (int)) - 1; i >= 0; i--)
((int *) t)[i] = 0;
/* Clear any extra bytes. */
for (i = length / sizeof (int) * sizeof (int); i < length; i++)
((char *) t)[i] = 0;
TREE_SET_CODE (t, code); TREE_SET_CODE (t, code);
if (obstack == &permanent_obstack) if (obstack == &permanent_obstack)
TREE_PERMANENT (t) = 1; TREE_PERMANENT (t) = 1;
...@@ -1189,12 +1183,7 @@ copy_node (node) ...@@ -1189,12 +1183,7 @@ copy_node (node)
} }
t = (tree) obstack_alloc (current_obstack, length); t = (tree) obstack_alloc (current_obstack, length);
bzero (t, length);
for (i = (length / sizeof (int)) - 1; i >= 0; i--)
((int *) t)[i] = ((int *) node)[i];
/* Clear any extra bytes. */
for (i = length / sizeof (int) * sizeof (int); i < length; i++)
((char *) t)[i] = ((char *) node)[i];
/* EXPR_WITH_FILE_LOCATION must keep filename info stored in TREE_CHAIN */ /* EXPR_WITH_FILE_LOCATION must keep filename info stored in TREE_CHAIN */
if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION) if (TREE_CODE (node) != EXPR_WITH_FILE_LOCATION)
...@@ -1262,7 +1251,7 @@ get_identifier (text) ...@@ -1262,7 +1251,7 @@ get_identifier (text)
register int len, hash_len; register int len, hash_len;
/* Compute length of text in len. */ /* Compute length of text in len. */
for (len = 0; text[len]; len++); len = strlen (text);
/* Decide how much of that length to hash on */ /* Decide how much of that length to hash on */
hash_len = len; hash_len = len;
...@@ -1325,7 +1314,7 @@ maybe_get_identifier (text) ...@@ -1325,7 +1314,7 @@ maybe_get_identifier (text)
register int len, hash_len; register int len, hash_len;
/* Compute length of text in len. */ /* Compute length of text in len. */
for (len = 0; text[len]; len++); len = strlen (text);
/* Decide how much of that length to hash on */ /* Decide how much of that length to hash on */
hash_len = len; hash_len = len;
...@@ -1565,9 +1554,7 @@ make_tree_vec (len) ...@@ -1565,9 +1554,7 @@ make_tree_vec (len)
#endif #endif
t = (tree) obstack_alloc (obstack, length); t = (tree) obstack_alloc (obstack, length);
bzero (t, length);
for (i = (length / sizeof (int)) - 1; i >= 0; i--)
((int *) t)[i] = 0;
TREE_SET_CODE (t, TREE_VEC); TREE_SET_CODE (t, TREE_VEC);
TREE_VEC_LENGTH (t) = len; TREE_VEC_LENGTH (t) = len;
...@@ -3074,15 +3061,13 @@ build1 (code, type, node) ...@@ -3074,15 +3061,13 @@ build1 (code, type, node)
length = sizeof (struct tree_exp); length = sizeof (struct tree_exp);
t = (tree) obstack_alloc (obstack, length); t = (tree) obstack_alloc (obstack, length);
bzero (t, length);
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
tree_node_counts[(int)kind]++; tree_node_counts[(int)kind]++;
tree_node_sizes[(int)kind] += length; tree_node_sizes[(int)kind] += length;
#endif #endif
for (i = (length / sizeof (int)) - 1; i >= 0; i--)
((int *) t)[i] = 0;
TREE_TYPE (t) = type; TREE_TYPE (t) = type;
TREE_SET_CODE (t, code); TREE_SET_CODE (t, code);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment