implicit-zee.c: New file.

* implicit-zee.c: New file.
	* tree-pass.h (pass_implicit_zee): Declare.
	* passes.c (init_optimization_passes): Add zee pass.
	* common.opt (fzee): New flag.
	* timevar.def (TV_ZEE): Define.
	* config/i386/i386.c (optimization_options): Turn on ZEE for level 2
	and beyond.
	* Makefile.in (implicit-zee.o): Add new build file.
	* gcc.target/i386/zee.c: New file.

From-SVN: r159342
This commit is contained in:
Sriraman Tallam 2010-05-12 21:15:19 +00:00 committed by Sriraman Tallam
parent 01f0a9dccc
commit 87a0ebfd20
10 changed files with 1049 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2010-05-12 Sriraman Tallam <tmsriram@google.com>
* implicit-zee.c: New file.
* tree-pass.h (pass_implicit_zee): Declare.
* passes.c (init_optimization_passes): Add zee pass.
* common.opt (fzee): New flag.
* timevar.def (TV_ZEE): Define.
* config/i386/i386.c (optimization_options): Turn on ZEE for level 2
and beyond.
* Makefile.in (implicit-zee.o): Add new build file.
2010-05-12 Kazu Hirata <kazu@codesourcery.com>
Nathan Froyd <froydnj@codesourcery.com>

View File

@ -1229,6 +1229,7 @@ OBJS-common = \
haifa-sched.o \
hooks.o \
ifcvt.o \
implicit-zee.o \
init-regs.o \
integrate.o \
intl.o \
@ -2977,6 +2978,11 @@ fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
insn-config.h $(RECOG_H) $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H)
implicit-zee.o : implicit-zee.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h \
$(DF_H) $(TIMEVAR_H) tree-pass.h $(RECOG_H) $(EXPR_H) \
$(REGS_H) $(TREE_H) $(TM_P_H) insn-config.h $(INSN_ATTR_H) $(REAL_H) $(TOPLEV_H) \
$(TARGET_H) $(OPTABS_H) insn-codes.h rtlhooks-def.h $(PARAMS_H) $(CGRAPH_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) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \

View File

@ -1147,6 +1147,10 @@ fsee
Common
Does nothing. Preserved for backward compatibility.
fzee
Common Report Var(flag_zee) Init(0)
Eliminate redundant zero extensions on targets that support implicit extensions.
fshow-column
Common C ObjC C++ ObjC++ Report Var(flag_show_column) Init(1)
Show column numbers in diagnostics, when available. Default on

View File

@ -4289,6 +4289,10 @@ optimization_options (int level, int size ATTRIBUTE_UNUSED)
flag_schedule_insns = 0;
#endif
/* For -O2 and beyond, turn on -fzee for x86_64 target. */
if (level > 1 && TARGET_64BIT)
flag_zee = 1;
if (TARGET_MACHO)
/* The Darwin libraries never set errno, so we might as well
avoid calling them when that's the only reason we would. */

1002
gcc/implicit-zee.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1031,6 +1031,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_postreload_cse);
NEXT_PASS (pass_gcse2);
NEXT_PASS (pass_split_after_reload);
NEXT_PASS (pass_implicit_zee);
NEXT_PASS (pass_branch_target_load_optimize1);
NEXT_PASS (pass_thread_prologue_and_epilogue);
NEXT_PASS (pass_rtl_dse2);

View File

@ -1,3 +1,7 @@
2010-05-12 Sriraman Tallam <tmsriram@google.com>
* gcc.target/i386/zee.c: New file.
2010-05-12 Jason Merrill <jason@redhat.com>
* g++.dg/conversion/op1.C: Expect template candidate message.

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-options "-O2 -fzee -S" } */
/* { dg-final { scan-assembler-not "mov\[\\t \]+\(%\[\^,\]+\),\[\\t \]*\\1" } } */
int mask[100];
int foo(unsigned x)
{
if (x < 10)
x = x * 45;
else
x = x * 78;
return mask[x];
}

View File

@ -1,6 +1,7 @@
/* This file contains the definitions for timing variables used to
measure run-time performance of the compiler.
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009, 2010
Free Software Foundation, Inc.
Contributed by Alex Samuel <samuel@codesourcery.com>
@ -207,6 +208,7 @@ DEFTIMEVAR (TV_RELOAD , "reload")
DEFTIMEVAR (TV_RELOAD_CSE_REGS , "reload CSE regs")
DEFTIMEVAR (TV_SEQABSTR , "sequence abstraction")
DEFTIMEVAR (TV_GCSE_AFTER_RELOAD , "load CSE after reload")
DEFTIMEVAR (TV_ZEE , "zee")
DEFTIMEVAR (TV_THREAD_PROLOGUE_AND_EPILOGUE, "thread pro- & epilogue")
DEFTIMEVAR (TV_IFCVT2 , "if-conversion 2")
DEFTIMEVAR (TV_COMBINE_STACK_ADJUST , "combine stack adjustments")

View File

@ -515,6 +515,7 @@ extern struct rtl_opt_pass pass_stack_ptr_mod;
extern struct rtl_opt_pass pass_initialize_regs;
extern struct rtl_opt_pass pass_combine;
extern struct rtl_opt_pass pass_if_after_combine;
extern struct rtl_opt_pass pass_implicit_zee;
extern struct rtl_opt_pass pass_partition_blocks;
extern struct rtl_opt_pass pass_match_asm_constraints;
extern struct rtl_opt_pass pass_regmove;