Makefile.in: Add rules for regrename.o

* Makefile.in: Add rules for regrename.o
	* regrename.c: New file.
	* rtl.h (regrename_optimize): Add prototype.
	* toplev.c (rename_registers_dump, flag_rename_registers): New variables
	(compile_file, decode_d_option): Add support for -frename-registers.
	(rest_of_compilation): Call regrename_optimize.
	* config/ia64/ia64.h (HARD_REGNO_RENAME_OK, RENAME_EXTENDED_BLOCKS):
	New macros.

From-SVN: r32916
This commit is contained in:
Stan Cox 2000-04-05 00:32:45 +00:00 committed by Stan Cox
parent 501a481953
commit 7b82b5da01
6 changed files with 1109 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2000-04-04 Stan Cox <scox@cygnus.com>
* Makefile.in: Add rules for regrename.o
* regrename.c: New file.
* rtl.h (regrename_optimize): Add prototype.
* toplev.c (rename_registers_dump, flag_rename_registers): New variables
(compile_file, decode_d_option): Add support for -frename-registers.
(rest_of_compilation): Call regrename_optimize.
* config/ia64/ia64.h (HARD_REGNO_RENAME_OK, RENAME_EXTENDED_BLOCKS):
New macros.
2000-04-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* Makefile (gccbug): New target.

View File

@ -675,7 +675,7 @@ OBJS = diagnostic.o \
dbxout.o sdbout.o dwarfout.o dwarf2out.o xcoffout.o bitmap.o alias.o gcse.o \
integrate.o jump.o cse.o loop.o unroll.o flow.o combine.o varray.o \
regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \
insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o \
insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o regrename.o \
insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o \
profile.o insn-attrtab.o $(out_object_file) $(EXTRA_OBJS) convert.o \
mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o \
@ -1653,6 +1653,10 @@ bb-reorder.o : bb-reorder.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
$(RECOG_H) insn-flags.h function.h except.h $(EXPR_H)
regrename.o : regrename.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h \
$(RECOG_H) function.h resource.h
$(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) ggc.h \
$(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
insn-flags.h output.h insn-attr.h insn-codes.h system.h toplev.h function.h

View File

@ -2589,6 +2589,25 @@ do { \
/* Define to enable software floating point emulation. */
#define REAL_ARITHMETIC
/* Register Renaming Parameters. */
/* A C expression that is nonzero if hard register number REGNO2 can be
considered for use as a rename register for REGNO1 */
#define HARD_REGNO_RENAME_OK(REGNO1,REGNO2) \
((! PR_REGNO_P (REGNO1) && ! PR_REGNO_P (REGNO2)) \
? (!call_fixed_regs [REGNO1] && !call_fixed_regs [REGNO2]) \
? 1 : 0 \
: ((REGNO2) > 256 && ((REGNO2 & 1) == 0)) \
? 1 : 0)
/* Define this macro if the compiler should use extended basic blocks
when renaming registers. Define this macro if the target has predicate
registers. */
#define RENAME_EXTENDED_BLOCKS
/* Miscellaneous Parameters. */

1050
gcc/regrename.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1798,4 +1798,8 @@ extern void convert_from_ssa PARAMS ((void));
extern rtx stack_limit_rtx;
/* In regrename.c */
extern void regrename_optimize PARAMS ((void));
#endif /* _RTL_H */

View File

@ -270,6 +270,7 @@ enum dump_file_index
DFI_peephole2,
DFI_sched2,
DFI_bbro,
DFI_rnreg,
DFI_jump2,
DFI_mach,
DFI_dbr,
@ -302,6 +303,7 @@ struct dump_file_info dump_file[DFI_MAX] =
{ "peephole2", 'z', 1, 0, 0 },
{ "sched2", 'R', 1, 0, 0 },
{ "bbro", 'B', 1, 0, 0 },
{ "rnreg", 'n', 1, 0, 0 },
{ "jump2", 'J', 1, 0, 0 },
{ "mach", 'M', 1, 0, 0 },
{ "dbr", 'd', 0, 0, 0 },
@ -423,6 +425,10 @@ int flag_branch_probabilities = 0;
int flag_reorder_blocks = 0;
/* Nonzero if registers should be renamed */
int flag_rename_registers = 0;
/* Nonzero for -pedantic switch: warn about anything
that standard spec forbids. */
@ -1019,6 +1025,8 @@ lang_independent_options f_options[] =
"Use profiling information for branch probabilities" },
{"reorder-blocks", &flag_reorder_blocks, 1,
"Reorder basic blocks to improve code placement" },
{"rename-registers", &flag_rename_registers, 1,
"Do the register renaming optimization pass"},
{"fast-math", &flag_fast_math, 1,
"Improve FP speed by violating ANSI & IEEE rules" },
{"common", &flag_no_common, 0,
@ -1415,6 +1423,7 @@ int peephole2_time;
int sched2_time;
int dbr_sched_time;
int reorder_blocks_time;
int rename_registers_time;
int shorten_branch_time;
int stack_reg_time;
int final_time;
@ -2164,6 +2173,7 @@ compile_file (name)
sched2_time = 0;
dbr_sched_time = 0;
reorder_blocks_time = 0;
rename_registers_time = 0;
shorten_branch_time = 0;
stack_reg_time = 0;
final_time = 0;
@ -2572,6 +2582,7 @@ compile_file (name)
print_time ("dbranch", dbr_sched_time);
#endif
print_time ("bbro", reorder_blocks_time);
print_time ("rnreg", rename_registers_time);
print_time ("shorten-branch", shorten_branch_time);
#ifdef STACK_REGS
print_time ("stack-reg", stack_reg_time);
@ -3421,6 +3432,15 @@ rest_of_compilation (decl)
close_dump_file (DFI_bbro, print_rtl_with_bb, insns);
}
if (optimize > 0 && flag_rename_registers)
{
open_dump_file (DFI_rnreg, decl);
TIMEVAR (rename_registers_time, regrename_optimize ());
close_dump_file (DFI_rnreg, print_rtl_with_bb, insns);
}
/* One more attempt to remove jumps to .+1 left by dead-store elimination.
Also do cross-jumping this time and delete no-op move insns. */