we are handling tcc_unary.
* print_tree.c (print_node): Remove code to handle RTL
appearing as a part of a tree node.
* tree-gimple.c (recalculate_side_effects): Rename fro as len.
* tree.c (build1_stat): Don't check TREE_CODE_LENGTH.
(PROCESS_ARG): Don't refer to fro.
(build2_stat, build3_stat, build4_stat): Don't compute fro.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91855
138bc75d-0d04-0410-961f-
82ee72b054a4
+2004-12-08 Kazu Hirata <kazu@cs.umass.edu>
+
+ * c-common.c (verify_tree): Don't check code length if we know
+ we are handling tcc_unary.
+ * print_tree.c (print_node): Remove code to handle RTL
+ appearing as a part of a tree node.
+ * tree-gimple.c (recalculate_side_effects): Rename fro as len.
+ * tree.c (build1_stat): Don't check TREE_CODE_LENGTH.
+ (PROCESS_ARG): Don't refer to fro.
+ (build2_stat, build3_stat, build4_stat): Don't compute fro.
+
2004-12-07 Roger Sayle <roger@eyesopen.com>
PR middle-end/18293
Other non-expressions need not be processed. */
if (cl == tcc_unary)
{
- if (TREE_CODE_LENGTH (code) == 0)
- return;
x = TREE_OPERAND (x, 0);
writer = 0;
goto restart;
enum machine_mode mode;
enum tree_code_class class;
int len;
- int first_rtl;
int i;
expanded_location xloc;
len = TREE_CODE_LENGTH (TREE_CODE (node));
- /* Some nodes contain rtx's, not trees,
- after a certain point. Print the rtx's as rtx's. */
- first_rtl = TREE_CODE_LENGTH (TREE_CODE (node));
-
for (i = 0; i < len; i++)
{
- if (i >= first_rtl)
- {
- indent_to (file, indent + 4);
- fprintf (file, "rtl %d ", i);
- if (TREE_OPERAND (node, i))
- print_rtl (file, (rtx) TREE_OPERAND (node, i));
- else
- fprintf (file, "(nil)");
- fprintf (file, "\n");
- }
- else
- {
- char temp[10];
+ char temp[10];
- sprintf (temp, "arg %d", i);
- print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
- }
+ sprintf (temp, "arg %d", i);
+ print_node (file, temp, TREE_OPERAND (node, i), indent + 4);
}
print_node (file, "chain", TREE_CHAIN (node), indent + 4);
recalculate_side_effects (tree t)
{
enum tree_code code = TREE_CODE (t);
- int fro = TREE_CODE_LENGTH (code);
+ int len = TREE_CODE_LENGTH (code);
int i;
switch (TREE_CODE_CLASS (code))
case tcc_binary: /* a binary arithmetic expression */
case tcc_reference: /* a reference */
TREE_SIDE_EFFECTS (t) = TREE_THIS_VOLATILE (t);
- for (i = 0; i < fro; ++i)
+ for (i = 0; i < len; ++i)
{
tree op = TREE_OPERAND (t, i);
if (op && TREE_SIDE_EFFECTS (op))
TREE_COMPLEXITY (t) = 0;
TREE_OPERAND (t, 0) = node;
TREE_BLOCK (t) = NULL_TREE;
- if (node && !TYPE_P (node) && TREE_CODE_LENGTH (code) != 0)
+ if (node && !TYPE_P (node))
{
TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (node);
TREE_READONLY (t) = TREE_READONLY (node);
#define PROCESS_ARG(N) \
do { \
TREE_OPERAND (t, N) = arg##N; \
- if (arg##N &&!TYPE_P (arg##N) && fro > N) \
+ if (arg##N &&!TYPE_P (arg##N)) \
{ \
if (TREE_SIDE_EFFECTS (arg##N)) \
side_effects = 1; \
{
bool constant, read_only, side_effects, invariant;
tree t;
- int fro;
gcc_assert (TREE_CODE_LENGTH (code) == 2);
result based on those same flags for the arguments. But if the
arguments aren't really even `tree' expressions, we shouldn't be trying
to do this. */
- fro = TREE_CODE_LENGTH (code);
/* Expressions without side effects may be constant if their
arguments are as well. */
{
bool constant, read_only, side_effects, invariant;
tree t;
- int fro;
gcc_assert (TREE_CODE_LENGTH (code) == 3);
t = make_node_stat (code PASS_MEM_STAT);
TREE_TYPE (t) = tt;
- fro = TREE_CODE_LENGTH (code);
-
side_effects = TREE_SIDE_EFFECTS (t);
PROCESS_ARG(0);
{
bool constant, read_only, side_effects, invariant;
tree t;
- int fro;
gcc_assert (TREE_CODE_LENGTH (code) == 4);
t = make_node_stat (code PASS_MEM_STAT);
TREE_TYPE (t) = tt;
- fro = TREE_CODE_LENGTH (code);
-
side_effects = TREE_SIDE_EFFECTS (t);
PROCESS_ARG(0);