Commit ca35b546 by Steven Bosscher

Fix messed up accidental commit.

From-SVN: r75368
parent c5d1156b
...@@ -147,20 +147,6 @@ ...@@ -147,20 +147,6 @@
2003-12-30 Steven Bosscher <steven@gcc.gnu.org> 2003-12-30 Steven Bosscher <steven@gcc.gnu.org>
* Makefile.in (graph.o): Add dependencies on TREE_H and langhooks.h
(gcse.c): Add dependency on langhooks.h
* function.h (struct function): Remove the `name' field.
(current_function_name): Do not define.
* function.c (allocate_struct_function): Don't initialize the `name'
field.
* gcse.c (gcse_main, one_classic_gcse_pass, one_cprop_pass,
one_pre_gcse_pass, bypass_jumps): Replace all occurences of
current_function_name with lang_hooks.decl_printable_name calls.
* graph.h (start_fct, start_bb, node_data, draw_edge, end_fct):
Likewise.
2003-12-30 Steven Bosscher <steven@gcc.gnu.org>
Backport from tree-ssa (relevant changes only): Backport from tree-ssa (relevant changes only):
2003-12-18 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 2003-12-18 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
......
...@@ -1322,7 +1322,7 @@ c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) ...@@ -1322,7 +1322,7 @@ c-convert.o : c-convert.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H)
c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \ c-pragma.o: c-pragma.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
function.h c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) gt-c-pragma.h function.h c-pragma.h toplev.h output.h $(GGC_H) $(TM_P_H) $(C_COMMON_H) gt-c-pragma.h
graph.o: graph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h flags.h output.h \ graph.o: graph.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h flags.h output.h \
$(RTL_H) function.h langhooks.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h $(TREE_H) $(RTL_H) function.h hard-reg-set.h $(BASIC_BLOCK_H) graph.h
sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \ sbitmap.o: sbitmap.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
hard-reg-set.h $(BASIC_BLOCK_H) hard-reg-set.h $(BASIC_BLOCK_H)
...@@ -1651,7 +1651,7 @@ web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ ...@@ -1651,7 +1651,7 @@ web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h flags.h $(BASIC_BLOCK_H) function.h output.h toplev.h df.h hard-reg-set.h flags.h $(BASIC_BLOCK_H) function.h output.h toplev.h df.h
gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h flags.h real.h insn-config.h $(GGC_H) $(RECOG_H) $(EXPR_H) \ hard-reg-set.h flags.h real.h insn-config.h $(GGC_H) $(RECOG_H) $(EXPR_H) \
$(BASIC_BLOCK_H) function.h langhooks.h output.h toplev.h $(TM_P_H) $(PARAMS_H) \ $(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) \
except.h gt-gcse.h $(TREE_H) except.h gt-gcse.h $(TREE_H)
sibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \ sibcall.o : sibcall.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
function.h hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) function.h hard-reg-set.h flags.h insn-config.h $(RECOG_H) $(BASIC_BLOCK_H)
......
...@@ -6408,6 +6408,8 @@ allocate_struct_function (tree fndecl) ...@@ -6408,6 +6408,8 @@ allocate_struct_function (tree fndecl)
DECL_SAVED_INSNS (fndecl) = cfun; DECL_SAVED_INSNS (fndecl) = cfun;
cfun->decl = fndecl; cfun->decl = fndecl;
current_function_name = (*lang_hooks.decl_printable_name) (fndecl, 2);
result = DECL_RESULT (fndecl); result = DECL_RESULT (fndecl);
if (aggregate_value_p (result, fndecl)) if (aggregate_value_p (result, fndecl))
{ {
......
...@@ -183,6 +183,9 @@ struct function GTY(()) ...@@ -183,6 +183,9 @@ struct function GTY(())
/* For function.c. */ /* For function.c. */
/* Name of this function. */
const char *name;
/* Points to the FUNCTION_DECL of this function. */ /* Points to the FUNCTION_DECL of this function. */
tree decl; tree decl;
...@@ -531,6 +534,7 @@ extern int virtuals_instantiated; ...@@ -531,6 +534,7 @@ extern int virtuals_instantiated;
extern int trampolines_created; extern int trampolines_created;
/* For backward compatibility... eventually these should all go away. */ /* For backward compatibility... eventually these should all go away. */
#define current_function_name (cfun->name)
#define current_function_pops_args (cfun->pops_args) #define current_function_pops_args (cfun->pops_args)
#define current_function_returns_struct (cfun->returns_struct) #define current_function_returns_struct (cfun->returns_struct)
#define current_function_returns_pcc_struct (cfun->returns_pcc_struct) #define current_function_returns_pcc_struct (cfun->returns_pcc_struct)
......
...@@ -161,7 +161,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -161,7 +161,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "basic-block.h" #include "basic-block.h"
#include "output.h" #include "output.h"
#include "function.h" #include "function.h"
#include "langhooks.h"
#include "expr.h" #include "expr.h"
#include "except.h" #include "except.h"
#include "ggc.h" #include "ggc.h"
...@@ -856,8 +855,7 @@ gcse_main (rtx f, FILE *file) ...@@ -856,8 +855,7 @@ gcse_main (rtx f, FILE *file)
if (file) if (file)
{ {
fprintf (file, "GCSE of %s: %d basic blocks, ", fprintf (file, "GCSE of %s: %d basic blocks, ",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, n_basic_blocks);
n_basic_blocks);
fprintf (file, "%d pass%s, %d bytes\n\n", fprintf (file, "%d pass%s, %d bytes\n\n",
pass, pass > 1 ? "es" : "", max_pass_bytes); pass, pass > 1 ? "es" : "", max_pass_bytes);
} }
...@@ -3616,8 +3614,7 @@ one_classic_gcse_pass (int pass) ...@@ -3616,8 +3614,7 @@ one_classic_gcse_pass (int pass)
{ {
fprintf (gcse_file, "\n"); fprintf (gcse_file, "\n");
fprintf (gcse_file, "GCSE of %s, pass %d: %d bytes needed, %d substs,", fprintf (gcse_file, "GCSE of %s, pass %d: %d bytes needed, %d substs,",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, pass, bytes_used, gcse_subst_count);
pass, bytes_used, gcse_subst_count);
fprintf (gcse_file, "%d insns created\n", gcse_create_count); fprintf (gcse_file, "%d insns created\n", gcse_create_count);
} }
...@@ -4689,8 +4686,7 @@ one_cprop_pass (int pass, int cprop_jumps, int bypass_jumps) ...@@ -4689,8 +4686,7 @@ one_cprop_pass (int pass, int cprop_jumps, int bypass_jumps)
if (gcse_file) if (gcse_file)
{ {
fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ", fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, pass, bytes_used);
pass, bytes_used);
fprintf (gcse_file, "%d const props, %d copy props\n\n", fprintf (gcse_file, "%d const props, %d copy props\n\n",
const_prop_count, copy_prop_count); const_prop_count, copy_prop_count);
} }
...@@ -5792,8 +5788,7 @@ one_pre_gcse_pass (int pass) ...@@ -5792,8 +5788,7 @@ one_pre_gcse_pass (int pass)
if (gcse_file) if (gcse_file)
{ {
fprintf (gcse_file, "\nPRE GCSE of %s, pass %d: %d bytes needed, ", fprintf (gcse_file, "\nPRE GCSE of %s, pass %d: %d bytes needed, ",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, pass, bytes_used);
pass, bytes_used);
fprintf (gcse_file, "%d substs, %d insns created\n", fprintf (gcse_file, "%d substs, %d insns created\n",
gcse_subst_count, gcse_create_count); gcse_subst_count, gcse_create_count);
} }
...@@ -8022,8 +8017,7 @@ bypass_jumps (FILE *file) ...@@ -8022,8 +8017,7 @@ bypass_jumps (FILE *file)
if (file) if (file)
{ {
fprintf (file, "BYPASS of %s: %d basic blocks, ", fprintf (file, "BYPASS of %s: %d basic blocks, ",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, n_basic_blocks);
n_basic_blocks);
fprintf (file, "%d bytes\n\n", bytes_used); fprintf (file, "%d bytes\n\n", bytes_used);
} }
......
...@@ -25,11 +25,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -25,11 +25,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "tm.h" #include "tm.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h"
#include "flags.h" #include "flags.h"
#include "output.h" #include "output.h"
#include "function.h" #include "function.h"
#include "langhooks.h"
#include "hard-reg-set.h" #include "hard-reg-set.h"
#include "basic-block.h" #include "basic-block.h"
#include "toplev.h" #include "toplev.h"
...@@ -57,8 +55,7 @@ start_fct (FILE *fp) ...@@ -57,8 +55,7 @@ start_fct (FILE *fp)
case vcg: case vcg:
fprintf (fp, "\ fprintf (fp, "\
graph: { title: \"%s\"\nfolding: 1\nhidden: 2\nnode: { title: \"%s.0\" }\n", graph: { title: \"%s\"\nfolding: 1\nhidden: 2\nnode: { title: \"%s.0\" }\n",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, current_function_name);
(*lang_hooks.decl_printable_name) (current_function_decl, 2));
break; break;
case no_graph: case no_graph:
break; break;
...@@ -74,8 +71,7 @@ start_bb (FILE *fp, int bb) ...@@ -74,8 +71,7 @@ start_bb (FILE *fp, int bb)
fprintf (fp, "\ fprintf (fp, "\
graph: {\ntitle: \"%s.BB%d\"\nfolding: 1\ncolor: lightblue\n\ graph: {\ntitle: \"%s.BB%d\"\nfolding: 1\ncolor: lightblue\n\
label: \"basic block %d", label: \"basic block %d",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, bb, bb);
bb, bb);
break; break;
case no_graph: case no_graph:
break; break;
...@@ -117,9 +113,8 @@ node_data (FILE *fp, rtx tmp_rtx) ...@@ -117,9 +113,8 @@ node_data (FILE *fp, rtx tmp_rtx)
case vcg: case vcg:
fprintf (fp, "\ fprintf (fp, "\
edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n", edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name,
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, XINT (tmp_rtx, 0));
XINT (tmp_rtx, 0));
break; break;
case no_graph: case no_graph:
break; break;
...@@ -131,8 +126,7 @@ edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n", ...@@ -131,8 +126,7 @@ edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n",
case vcg: case vcg:
fprintf (fp, "node: {\n title: \"%s.%d\"\n color: %s\n \ fprintf (fp, "node: {\n title: \"%s.%d\"\n color: %s\n \
label: \"%s %d\n", label: \"%s %d\n",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, XINT (tmp_rtx, 0),
XINT (tmp_rtx, 0),
GET_CODE (tmp_rtx) == NOTE ? "lightgrey" GET_CODE (tmp_rtx) == NOTE ? "lightgrey"
: GET_CODE (tmp_rtx) == INSN ? "green" : GET_CODE (tmp_rtx) == INSN ? "green"
: GET_CODE (tmp_rtx) == JUMP_INSN ? "darkgreen" : GET_CODE (tmp_rtx) == JUMP_INSN ? "darkgreen"
...@@ -184,11 +178,8 @@ draw_edge (FILE *fp, int from, int to, int bb_edge, int class) ...@@ -184,11 +178,8 @@ draw_edge (FILE *fp, int from, int to, int bb_edge, int class)
color = "color: green "; color = "color: green ";
fprintf (fp, fprintf (fp,
"edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s", "edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
(*lang_hooks.decl_printable_name) (current_function_decl, 2), current_function_name, from,
from, current_function_name, to, color);
(*lang_hooks.decl_printable_name) (current_function_decl, 2),
to,
color);
if (class) if (class)
fprintf (fp, "class: %d ", class); fprintf (fp, "class: %d ", class);
fputs ("}\n", fp); fputs ("}\n", fp);
...@@ -218,7 +209,7 @@ end_fct (FILE *fp) ...@@ -218,7 +209,7 @@ end_fct (FILE *fp)
{ {
case vcg: case vcg:
fprintf (fp, "node: { title: \"%s.999999\" label: \"END\" }\n}\n", fprintf (fp, "node: { title: \"%s.999999\" label: \"END\" }\n}\n",
(*lang_hooks.decl_printable_name) (current_function_decl, 2)); current_function_name);
break; break;
case no_graph: case no_graph:
break; break;
......
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