print-tree.c (50617) | print-tree.c (52521) |
---|---|
1/* Prints out tree in human readable form - GNU C-compiler | 1/* Prints out tree in human readable form - GNU C-compiler |
2 Copyright (C) 1990, 91, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. | 2 Copyright (C) 1990, 91, 93-97, 1998 Free Software Foundation, Inc. |
3 4This file is part of GNU CC. 5 6GNU CC is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 2, or (at your option) 9any later version. 10 11GNU CC is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GNU CC; see the file COPYING. If not, write to 18the Free Software Foundation, 59 Temple Place - Suite 330, 19Boston, MA 02111-1307, USA. */ 20 | 3 4This file is part of GNU CC. 5 6GNU CC is free software; you can redistribute it and/or modify 7it under the terms of the GNU General Public License as published by 8the Free Software Foundation; either version 2, or (at your option) 9any later version. 10 11GNU CC is distributed in the hope that it will be useful, 12but WITHOUT ANY WARRANTY; without even the implied warranty of 13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14GNU General Public License for more details. 15 16You should have received a copy of the GNU General Public License 17along with GNU CC; see the file COPYING. If not, write to 18the Free Software Foundation, 59 Temple Place - Suite 330, 19Boston, MA 02111-1307, USA. */ 20 |
21/* $FreeBSD: head/contrib/gcc/print-tree.c 52521 1999-10-26 09:17:58Z obrien $ */ |
|
21 | 22 |
23 |
|
22#include "config.h" 23#include "system.h" 24#include "tree.h" 25 26extern char *mode_name[]; 27 28void print_node (); 29void indent_to (); --- 29 unchanged lines hidden (view full) --- 59 fprintf (stderr, "\n"); 60} 61 62/* Print a node in brief fashion, with just the code, address and name. */ 63 64void 65print_node_brief (file, prefix, node, indent) 66 FILE *file; | 24#include "config.h" 25#include "system.h" 26#include "tree.h" 27 28extern char *mode_name[]; 29 30void print_node (); 31void indent_to (); --- 29 unchanged lines hidden (view full) --- 61 fprintf (stderr, "\n"); 62} 63 64/* Print a node in brief fashion, with just the code, address and name. */ 65 66void 67print_node_brief (file, prefix, node, indent) 68 FILE *file; |
67 char *prefix; | 69 const char *prefix; |
68 tree node; 69 int indent; 70{ 71 char class; 72 73 if (node == 0) 74 return; 75 --- 95 unchanged lines hidden (view full) --- 171} 172 173/* Print the node NODE in full on file FILE, preceded by PREFIX, 174 starting in column INDENT. */ 175 176void 177print_node (file, prefix, node, indent) 178 FILE *file; | 70 tree node; 71 int indent; 72{ 73 char class; 74 75 if (node == 0) 76 return; 77 --- 95 unchanged lines hidden (view full) --- 173} 174 175/* Print the node NODE in full on file FILE, preceded by PREFIX, 176 starting in column INDENT. */ 177 178void 179print_node (file, prefix, node, indent) 180 FILE *file; |
179 char *prefix; | 181 const char *prefix; |
180 tree node; 181 int indent; 182{ 183 int hash; 184 struct bucket *b; 185 enum machine_mode mode; 186 char class; 187 int len; --- 211 unchanged lines hidden (view full) --- 399 if (TREE_CODE (node) != FUNCTION_DECL) 400 fprintf (file, " align %d", DECL_ALIGN (node)); 401 else if (DECL_INLINE (node)) 402 fprintf (file, " frame_size %d", DECL_FRAME_SIZE (node)); 403 else if (DECL_BUILT_IN (node)) 404 fprintf (file, " built-in code %d", DECL_FUNCTION_CODE (node)); 405 if (TREE_CODE (node) == FIELD_DECL) 406 print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4); | 182 tree node; 183 int indent; 184{ 185 int hash; 186 struct bucket *b; 187 enum machine_mode mode; 188 char class; 189 int len; --- 211 unchanged lines hidden (view full) --- 401 if (TREE_CODE (node) != FUNCTION_DECL) 402 fprintf (file, " align %d", DECL_ALIGN (node)); 403 else if (DECL_INLINE (node)) 404 fprintf (file, " frame_size %d", DECL_FRAME_SIZE (node)); 405 else if (DECL_BUILT_IN (node)) 406 fprintf (file, " built-in code %d", DECL_FUNCTION_CODE (node)); 407 if (TREE_CODE (node) == FIELD_DECL) 408 print_node (file, "bitpos", DECL_FIELD_BITPOS (node), indent + 4); |
409 if (DECL_POINTER_ALIAS_SET_KNOWN_P (node)) 410 fprintf (file, " alias set %d", DECL_POINTER_ALIAS_SET (node)); |
|
407 print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4); 408 print_node_brief (file, "machine_attributes", DECL_MACHINE_ATTRIBUTES (node), indent + 4); 409 print_node_brief (file, "abstract_origin", 410 DECL_ABSTRACT_ORIGIN (node), indent + 4); 411 412 print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4); 413 print_node (file, "result", DECL_RESULT (node), indent + 4); 414 print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4); --- 112 unchanged lines hidden (view full) --- 527 case 'b': 528 print_node (file, "vars", BLOCK_VARS (node), indent + 4); 529 print_node (file, "tags", BLOCK_TYPE_TAGS (node), indent + 4); 530 print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), indent + 4); 531 print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4); 532 print_node (file, "chain", BLOCK_CHAIN (node), indent + 4); 533 print_node (file, "abstract_origin", 534 BLOCK_ABSTRACT_ORIGIN (node), indent + 4); | 411 print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4); 412 print_node_brief (file, "machine_attributes", DECL_MACHINE_ATTRIBUTES (node), indent + 4); 413 print_node_brief (file, "abstract_origin", 414 DECL_ABSTRACT_ORIGIN (node), indent + 4); 415 416 print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4); 417 print_node (file, "result", DECL_RESULT (node), indent + 4); 418 print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4); --- 112 unchanged lines hidden (view full) --- 531 case 'b': 532 print_node (file, "vars", BLOCK_VARS (node), indent + 4); 533 print_node (file, "tags", BLOCK_TYPE_TAGS (node), indent + 4); 534 print_node (file, "supercontext", BLOCK_SUPERCONTEXT (node), indent + 4); 535 print_node (file, "subblocks", BLOCK_SUBBLOCKS (node), indent + 4); 536 print_node (file, "chain", BLOCK_CHAIN (node), indent + 4); 537 print_node (file, "abstract_origin", 538 BLOCK_ABSTRACT_ORIGIN (node), indent + 4); |
535 return; | 539 break; |
536 537 case 'e': 538 case '<': 539 case '1': 540 case '2': 541 case 'r': 542 case 's': 543 if (TREE_CODE (node) == BIND_EXPR) 544 { 545 print_node (file, "vars", TREE_OPERAND (node, 0), indent + 4); 546 print_node (file, "body", TREE_OPERAND (node, 1), indent + 4); 547 print_node (file, "block", TREE_OPERAND (node, 2), indent + 4); | 540 541 case 'e': 542 case '<': 543 case '1': 544 case '2': 545 case 'r': 546 case 's': 547 if (TREE_CODE (node) == BIND_EXPR) 548 { 549 print_node (file, "vars", TREE_OPERAND (node, 0), indent + 4); 550 print_node (file, "body", TREE_OPERAND (node, 1), indent + 4); 551 print_node (file, "block", TREE_OPERAND (node, 2), indent + 4); |
548 return; | 552 break; |
549 } 550 551 len = tree_code_length[(int) TREE_CODE (node)]; 552 /* Some nodes contain rtx's, not trees, 553 after a certain point. Print the rtx's as rtx's. */ 554 first_rtl = first_rtl_op (TREE_CODE (node)); 555 for (i = 0; i < len; i++) 556 { --- 138 unchanged lines hidden --- | 553 } 554 555 len = tree_code_length[(int) TREE_CODE (node)]; 556 /* Some nodes contain rtx's, not trees, 557 after a certain point. Print the rtx's as rtx's. */ 558 first_rtl = first_rtl_op (TREE_CODE (node)); 559 for (i = 0; i < len; i++) 560 { --- 138 unchanged lines hidden --- |