Commit ea900239 by Daniel Berlin Committed by Kenneth Zadeck

Makefile.in: Added rules for ipa-pure-const.c...

2005-07-16  Danny Berlin <dberlin@dberlin.org>
	    Kenneth Zadeck <zadeck@naturalbridge.com>

	* Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c,
	ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c,
	ipa-type-escape.h, tree-promote-statics.c
	* ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c,
	ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h,
	tree-promote-statics.c: new files.
	* alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p,
	nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1,
	int nonlocal_set_p, mark_constant_function): Deleted.
	(rest_of_handle_cfg): Removed call to mark_constant_function.
        (nonoverlapping_component_refs_p): Added calls to support
	type based aliasing.
        * tree-ssa-alias.c (may_alias_p,
	compute_flow_insensitive_aliasing): Ditto.
	* calls.c (flags_from_decl_or_type): Removed reference to
	cgraph_rtl_info.
	(flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute.
	* c-common.c (handle_pointer_no_capture_attribute): New function
	and added pointer_no_capture attribute.
      	* c-typeck.c (convert_arguments): Make builtins tolerant of having
	too many arguments.  This is necessary for Spec 2000.
	* cgraph.h (const_function, pure_function): Removed.
	* common.opt: Added "fipa-pure-const", "fipa-reference",
	"fipa-type-escape", and "ftree-promote-static".
	* opts.c: Ditto.
	* passes.c: Added ipa and tree-promote-statics passes.
	* timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE,
	TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS.
	* tree.h: Support ECF_POINTER_NO_CAPTURE attribute.
	* tree-dfa.c (referenced_var_lookup_if_exists): New function.
	* tree-flow.h: Added exposed sra calls and addition of
	reference_vars_info field for FUNCTION_DECLS.
	* tree-pass.h: Added passes.
	* tree-sra.c: (sra_init_cache): New function.
	(sra_insert_before, sra_insert_after) Made public.
	(type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p
	and made public.
	* tree-ssa-alias.c (dump_alias_stats): Added stats for type based
	aliasing. (may_alias_p): Added code to use type escape analysis to
	improve alias sets.
	* tree-ssa-operands.c (add_call_clobber_ops): Added parameter and
	code to prune clobbers of static variables based on information
	produced in ipa-reference pass.  Changed call clobbering so that
	statics are not marked as clobbered if the call does not clobber
	them.


2005-07-16  Danny Berlin <dberlin@dberlin.org>
	    Kenneth Zadeck <zadeck@naturalbridge.com>

	* gcc.dg/tree-ssa/ssa-dce-2.c: Changed dg-options to run at -O2
	since pure const detection cannot run at -O1 in c compiler.
	* gcc.dg/tree-ssa/20030714-1.c Changed scanning patterns because we
	can now optimize this case properly.
	* gcc.dg/tree-ssa/sra-2.c: Changed to -O3 and removed xfail
	because we now pass.
	* gcc.dg/vect/vect-92.c: Removed out of bounds array access.

Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>

From-SVN: r102098
parent 8f59c51b
2005-07-16 Danny Berlin <dberlin@dberlin.org>
Kenneth Zadeck <zadeck@naturalbridge.com>
* Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c,
ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c,
ipa-type-escape.h, tree-promote-statics.c
* ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c,
ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h,
tree-promote-statics.c: new files.
* alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p,
nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1,
int nonlocal_set_p, mark_constant_function): Deleted.
(rest_of_handle_cfg): Removed call to mark_constant_function.
(nonoverlapping_component_refs_p): Added calls to support
type based aliasing.
* tree-ssa-alias.c (may_alias_p,
compute_flow_insensitive_aliasing): Ditto.
* calls.c (flags_from_decl_or_type): Removed reference to
cgraph_rtl_info.
(flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute.
* c-common.c (handle_pointer_no_capture_attribute): New function
and added pointer_no_capture attribute.
* c-typeck.c (convert_arguments): Make builtins tolerant of having
too many arguments. This is necessary for Spec 2000.
* cgraph.h (const_function, pure_function): Removed.
* common.opt: Added "fipa-pure-const", "fipa-reference",
"fipa-type-escape", and "ftree-promote-static".
* opts.c: Ditto.
* passes.c: Added ipa and tree-promote-statics passes.
* timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE,
TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS.
* tree.h: Support ECF_POINTER_NO_CAPTURE attribute.
* tree-dfa.c (referenced_var_lookup_if_exists): New function.
* tree-flow.h: Added exposed sra calls and addition of
reference_vars_info field for FUNCTION_DECLS.
* tree-pass.h: Added passes.
* tree-sra.c: (sra_init_cache): New function.
(sra_insert_before, sra_insert_after) Made public.
(type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p
and made public.
* tree-ssa-alias.c (dump_alias_stats): Added stats for type based
aliasing. (may_alias_p): Added code to use type escape analysis to
improve alias sets.
* tree-ssa-operands.c (add_call_clobber_ops): Added parameter and
code to prune clobbers of static variables based on information
produced in ipa-reference pass. Changed call clobbering so that
statics are not marked as clobbered if the call does not clobber
them.
2005-07-16 Kelley Cook <kcook@gcc.gnu.org> 2005-07-16 Kelley Cook <kcook@gcc.gnu.org>
* all files: Update FSF address. * all files: Update FSF address.
......
...@@ -729,6 +729,9 @@ SCHED_INT_H = sched-int.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H) ...@@ -729,6 +729,9 @@ SCHED_INT_H = sched-int.h $(INSN_ATTR_H) $(BASIC_BLOCK_H) $(RTL_H)
INTEGRATE_H = integrate.h varray.h INTEGRATE_H = integrate.h varray.h
CFGLAYOUT_H = cfglayout.h $(BASIC_BLOCK_H) CFGLAYOUT_H = cfglayout.h $(BASIC_BLOCK_H)
CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) $(RTL_H) CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) $(RTL_H)
IPA_UTILS_H = ipa-utils.h $(TREE_H) $(CGRAPH_H)
IPA_REFERENCE_H = ipa-reference.h bitmap.h $(TREE_H)
IPA_TYPE_ESCAPE_H = ipa-type-escape.h $(TREE_H)
CGRAPH_H = cgraph.h tree.h CGRAPH_H = cgraph.h tree.h
DF_H = df.h bitmap.h sbitmap.h $(BASIC_BLOCK_H) DF_H = df.h bitmap.h sbitmap.h $(BASIC_BLOCK_H)
DDG_H = ddg.h sbitmap.h $(DF_H) DDG_H = ddg.h sbitmap.h $(DF_H)
...@@ -750,7 +753,7 @@ TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H) ...@@ -750,7 +753,7 @@ TREE_DUMP_H = tree-dump.h $(SPLAY_TREE_H)
TREE_GIMPLE_H = tree-gimple.h tree-iterator.h TREE_GIMPLE_H = tree-gimple.h tree-iterator.h
TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \ TREE_FLOW_H = tree-flow.h tree-flow-inline.h tree-ssa-operands.h \
bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h $(TREE_GIMPLE_H) \ bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h $(TREE_GIMPLE_H) \
$(HASHTAB_H) $(CGRAPH_H) $(HASHTAB_H) $(CGRAPH_H) $(IPA_REFERENCE_H)
TREE_SSA_LIVE_H = tree-ssa-live.h $(PARTITION_H) TREE_SSA_LIVE_H = tree-ssa-live.h $(PARTITION_H)
PRETTY_PRINT_H = pretty-print.h input.h $(OBSTACK_H) PRETTY_PRINT_H = pretty-print.h input.h $(OBSTACK_H)
DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H) DIAGNOSTIC_H = diagnostic.h diagnostic.def $(PRETTY_PRINT_H)
...@@ -945,7 +948,7 @@ OBJS-common = \ ...@@ -945,7 +948,7 @@ OBJS-common = \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \ integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
loop.o mode-switching.o modulo-sched.o optabs.o options.o opts.o \ loop.o mode-switching.o modulo-sched.o optabs.o options.o opts.o \
params.o postreload.o postreload-gcse.o predict.o \ params.o postreload.o postreload-gcse.o predict.o \
insn-preds.o pointer-set.o \ insn-preds.o pointer-set.o tree-promote-statics.o \
print-rtl.o print-tree.o profile.o value-prof.o var-tracking.o \ print-rtl.o print-tree.o profile.o value-prof.o var-tracking.o \
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \ real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \ reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
...@@ -962,7 +965,8 @@ OBJS-common = \ ...@@ -962,7 +965,8 @@ OBJS-common = \
OBJS-md = $(out_object_file) OBJS-md = $(out_object_file)
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) tree-inline.o \ OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) tree-inline.o \
cgraph.o cgraphunit.o tree-nomudflap.o ipa.o ipa-inline.o cgraph.o cgraphunit.o tree-nomudflap.o ipa.o ipa-inline.o \
ipa-utils.o ipa-reference.o ipa-pure-const.o ipa-type-escape.o
OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive) OBJS = $(OBJS-common) $(out_object_file) $(OBJS-archive)
...@@ -1837,11 +1841,12 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ ...@@ -1837,11 +1841,12 @@ tree-dfa.o : tree-dfa.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
tree-inline.h $(HASHTAB_H) pointer-set.h $(FLAGS_H) function.h \ tree-inline.h $(HASHTAB_H) pointer-set.h $(FLAGS_H) function.h \
$(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h $(TREE_DUMP_H) \ $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h $(TREE_DUMP_H) \
tree-pass.h $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \ tree-pass.h $(PARAMS_H) $(CGRAPH_H) $(BASIC_BLOCK_H) hard-reg-set.h \
$(TREE_GIMPLE_H) $(TREE_GIMPLE_H)
tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-ssa-operands.o : tree-ssa-operands.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) tree-inline.h \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) errors.h tree-inline.h \
$(FLAGS_H) function.h $(TM_H) $(TIMEVAR_H) tree-pass.h toplev.h \ $(FLAGS_H) function.h $(TM_H) $(TIMEVAR_H) tree-pass.h toplev.h \
gt-tree-ssa-operands.h coretypes.h langhooks.h tree-ssa-opfinalize.h gt-tree-ssa-operands.h coretypes.h langhooks.h tree-ssa-opfinalize.h \
$(IPA_REFERENCE_H)
tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ tree-eh.o : tree-eh.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) function.h except.h langhooks.h \ $(RTL_H) $(TREE_H) $(TM_H) $(FLAGS_H) function.h except.h langhooks.h \
$(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) \ $(GGC_H) tree-pass.h coretypes.h $(TIMEVAR_H) $(TM_P_H) \
...@@ -1895,7 +1900,8 @@ tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ ...@@ -1895,7 +1900,8 @@ tree-ssa-alias.o : tree-ssa-alias.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) tree-inline.h $(FLAGS_H) \ $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) tree-inline.h $(FLAGS_H) \
function.h $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \ function.h $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \
$(TREE_DUMP_H) tree-pass.h $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \ $(TREE_DUMP_H) tree-pass.h $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \
hard-reg-set.h $(TREE_GIMPLE_H) vec.h tree-ssa-structalias.h hard-reg-set.h $(TREE_GIMPLE_H) vec.h tree-ssa-structalias.h \
$(IPA_TYPE_ESCAPE_H)
tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) errors.h $(TIMEVAR_H) \ $(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) errors.h $(TIMEVAR_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) tree-iterator.h\ $(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) tree-iterator.h\
...@@ -2142,6 +2148,22 @@ ipa-inline.o : ipa-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ ...@@ -2142,6 +2148,22 @@ ipa-inline.o : ipa-inline.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
$(TREE_H) langhooks.h tree-inline.h $(FLAGS_H) $(CGRAPH_H) intl.h \ $(TREE_H) langhooks.h tree-inline.h $(FLAGS_H) $(CGRAPH_H) intl.h \
$(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) tree-pass.h \ $(DIAGNOSTIC_H) $(FIBHEAP_H) $(PARAMS_H) $(TIMEVAR_H) tree-pass.h \
$(COVERAGE_H) $(HASHTAB_H) $(COVERAGE_H) $(HASHTAB_H)
ipa-utils.o : ipa-utils.c $(IPA_UTILS_H) $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \
pointer-set.h $(GGC_H) $(C_COMMON_H) $(TREE_GIMPLE_H) \
$(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H)
ipa-reference.o : ipa-reference.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \
pointer-set.h $(GGC_H) $(IPA_REFERENCE_H) $(IPA_UTILS_H) $(C_COMMON_H) \
$(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H)
ipa-pure-const.o : ipa-pure-const.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \
pointer-set.h $(GGC_H) $(IPA_UTILS_H) $(C_COMMON_H) \
$(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H)
ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \
coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) tree-inline.h langhooks.h \
pointer-set.h $(GGC_H) $(IPA_TYPE_ESCAPE_H) $(IPA_UTILS_H) $(C_COMMON_H) \
$(TREE_GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) tree-pass.h $(DIAGNOSTIC_H)
coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \ coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \ $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \
function.h toplev.h $(GGC_H) langhooks.h $(COVERAGE_H) gt-coverage.h \ function.h toplev.h $(GGC_H) langhooks.h $(COVERAGE_H) gt-coverage.h \
...@@ -2196,6 +2218,9 @@ tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \ ...@@ -2196,6 +2218,9 @@ tree-vect-generic.o : tree-vect-generic.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) \
$(FLAGS_H) $(OPTABS_H) $(RTL_H) $(MACHMODE_H) $(EXPR_H) \ $(FLAGS_H) $(OPTABS_H) $(RTL_H) $(MACHMODE_H) $(EXPR_H) \
langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H) gt-tree-vect-generic.h $(GGC_H) \ langhooks.h $(FLAGS_H) $(DIAGNOSTIC_H) gt-tree-vect-generic.h $(GGC_H) \
coretypes.h insn-codes.h coretypes.h insn-codes.h
tree-promote-statics.o : tree-promote-statics.c $(CONFIG_H) system.h \
$(TREE_H) $(TM_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(IPA_UTILS_H) \
$(IPA_REFERENCE_H) bitmap.h tree-pass.h $(FLAGS_H) $(TIMEVAR_H)
df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \ insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \
$(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H) $(BASIC_BLOCK_H) $(DF_H) bitmap.h sbitmap.h $(TM_P_H)
...@@ -2345,7 +2370,7 @@ alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ ...@@ -2345,7 +2370,7 @@ alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h \ $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h \
$(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) \ $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) \
langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \ langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \
$(SPLAY_TREE_H) $(VARRAY_H) tree-pass.h $(SPLAY_TREE_H) $(VARRAY_H) $(IPA_TYPE_ESCAPE_H) tree-pass.h
regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h timevar.h tree-pass.h \ insn-config.h timevar.h tree-pass.h \
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) function.h \ $(RECOG_H) output.h $(REGS_H) hard-reg-set.h $(FLAGS_H) function.h \
...@@ -2682,6 +2707,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ ...@@ -2682,6 +2707,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \ $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \ $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \ $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
$(srcdir)/ipa-reference.h \
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \ $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \ $(srcdir)/c-common.h $(srcdir)/c-tree.h $(srcdir)/reload.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \ $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
...@@ -2703,6 +2729,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ ...@@ -2703,6 +2729,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \ $(srcdir)/tree-chrec.h $(srcdir)/tree-vect-generic.c \
$(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \ $(srcdir)/tree-ssa-operands.h $(srcdir)/tree-ssa-operands.c \
$(srcdir)/tree-profile.c $(srcdir)/rtl-profile.c $(srcdir)/tree-nested.c \ $(srcdir)/tree-profile.c $(srcdir)/rtl-profile.c $(srcdir)/tree-nested.c \
$(srcdir)/ipa-reference.c \
$(srcdir)/targhooks.c $(out_file) \ $(srcdir)/targhooks.c $(out_file) \
@all_gtfiles@ @all_gtfiles@
......
...@@ -570,17 +570,8 @@ flags_from_decl_or_type (tree exp) ...@@ -570,17 +570,8 @@ flags_from_decl_or_type (tree exp)
if (DECL_P (exp)) if (DECL_P (exp))
{ {
struct cgraph_rtl_info *i = cgraph_rtl_info (exp);
type = TREE_TYPE (exp); type = TREE_TYPE (exp);
if (i)
{
if (i->pure_function)
flags |= ECF_PURE | ECF_LIBCALL_BLOCK;
if (i->const_function)
flags |= ECF_CONST | ECF_LIBCALL_BLOCK;
}
/* The function exp may have the `malloc' attribute. */ /* The function exp may have the `malloc' attribute. */
if (DECL_IS_MALLOC (exp)) if (DECL_IS_MALLOC (exp))
flags |= ECF_MALLOC; flags |= ECF_MALLOC;
......
...@@ -107,8 +107,6 @@ struct cgraph_global_info GTY(()) ...@@ -107,8 +107,6 @@ struct cgraph_global_info GTY(())
struct cgraph_rtl_info GTY(()) struct cgraph_rtl_info GTY(())
{ {
int preferred_incoming_stack_boundary; int preferred_incoming_stack_boundary;
bool const_function;
bool pure_function;
}; };
/* The cgraph data structure. /* The cgraph data structure.
......
...@@ -491,6 +491,18 @@ finstrument-functions ...@@ -491,6 +491,18 @@ finstrument-functions
Common Report Var(flag_instrument_function_entry_exit) Common Report Var(flag_instrument_function_entry_exit)
Instrument function entry and exit with profiling calls Instrument function entry and exit with profiling calls
fipa-pure-const
Common Report Var(flag_ipa_pure_const) Init(0)
Discover pure and const functions
fipa-reference
Common Report Var(flag_ipa_reference) Init(0)
Discover readonly and non addressable static variables
fipa-type-escape
Common Report Var(flag_ipa_type_escape) Init(0)
Type based escape and alias analysis
fivopts fivopts
Common Report Var(flag_ivopts) Init(1) Common Report Var(flag_ivopts) Init(1)
Optimize induction variables on trees Optimize induction variables on trees
...@@ -915,6 +927,10 @@ ftree-pre ...@@ -915,6 +927,10 @@ ftree-pre
Common Report Var(flag_tree_pre) Common Report Var(flag_tree_pre)
Enable SSA-PRE optimization on trees Enable SSA-PRE optimization on trees
ftree-promote-statics
Common Report Var(flag_tree_promote_statics) Init(0)
Enable promotion of static variables
ftree-salias ftree-salias
Common Report Var(flag_tree_salias) Common Report Var(flag_tree_salias)
Perform structural alias analysis Perform structural alias analysis
......
/* IPA handling of references.
Copyright (C) 2004-2005 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GCC_IPA_REFERENCE_H
#define GCC_IPA_REFERENCE_H
#include "bitmap.h"
#include "tree.h"
/* The static variables defined within the compilation unit that are
loaded or stored directly by function that owns this structure. */
struct ipa_reference_local_vars_info_d
{
bitmap statics_read;
bitmap statics_written;
/* Set when this function calls another function external to the
compilation unit or if the function has a asm clobber of memory.
In general, such calls are modeled as reading and writing all
variables (both bits on) but sometime there are attributes on the
called function so we can do better. */
bool calls_read_all;
bool calls_write_all;
};
struct ipa_reference_global_vars_info_d
{
bitmap statics_read;
bitmap statics_written;
bitmap statics_not_read;
bitmap statics_not_written;
};
/* Statics that are read and written by some set of functions. The
local ones are based on the loads and stores local to the function.
The global ones are based on the local info as well as the
transitive closure of the functions that are called. The
structures are separated to allow the global structures to be
shared between several functions since every function within a
strongly connected component will have the same information. This
sharing saves both time and space in the computation of the vectors
as well as their translation from decl_uid form to ann_uid
form. */
typedef struct ipa_reference_local_vars_info_d *ipa_reference_local_vars_info_t;
typedef struct ipa_reference_global_vars_info_d *ipa_reference_global_vars_info_t;
struct ipa_reference_vars_info_d
{
ipa_reference_local_vars_info_t local;
ipa_reference_global_vars_info_t global;
};
typedef struct ipa_reference_vars_info_d *ipa_reference_vars_info_t;
/* In ipa-reference.c */
bitmap ipa_reference_get_read_local (tree fn);
bitmap ipa_reference_get_written_local (tree fn);
bitmap ipa_reference_get_read_global (tree fn);
bitmap ipa_reference_get_written_global (tree fn);
bitmap ipa_reference_get_not_read_global (tree fn);
bitmap ipa_reference_get_not_written_global (tree fn);
#endif /* GCC_IPA_REFERENCE_H */
/* Type based alias analysis.
Copyright (C) 2004 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GCC_IPA_TYPE_ESCAPE_H
#define GCC_IPA_TYPE_ESCAPE_H
#include "tree.h"
bool ipa_type_escape_type_contained_p (tree type);
bool ipa_type_escape_field_does_not_clobber_p (tree record_type, tree field_type);
int ipa_type_escape_star_count_of_interesting_type (tree type);
int ipa_type_escape_star_count_of_interesting_or_array_type (tree type);
#endif /* GCC_IPA_TYPE_ESCAPE_H */
/* Utilities for ipa analysis.
Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
*/
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "tree-flow.h"
#include "tree-inline.h"
#include "tree-pass.h"
#include "langhooks.h"
#include "pointer-set.h"
#include "ggc.h"
#include "ipa-utils.h"
#include "ipa-reference.h"
#include "c-common.h"
#include "tree-gimple.h"
#include "cgraph.h"
#include "output.h"
#include "flags.h"
#include "timevar.h"
#include "diagnostic.h"
#include "langhooks.h"
/* Debugging function for postorder and inorder code. NOTE is a string
that is printed before the nodes are printed. ORDER is an array of
cgraph_nodes that has COUNT useful nodes in it. */
void
ipa_utils_print_order (FILE* out,
const char * note,
struct cgraph_node** order,
int count)
{
int i;
fprintf (out, "\n\n ordered call graph: %s\n", note);
for (i = count - 1; i >= 0; i--)
dump_cgraph_node(dump_file, order[i]);
fprintf (out, "\n");
fflush(out);
}
struct searchc_env {
struct cgraph_node **stack;
int stack_size;
struct cgraph_node **result;
int order_pos;
splay_tree nodes_marked_new;
bool reduce;
int count;
};
/* This is an implementation of Tarjan's strongly connected region
finder as reprinted in Aho Hopcraft and Ullman's The Design and
Analysis of Computer Programs (1975) pages 192-193. This version
has been customized for cgraph_nodes. The env parameter is because
it is recursive and there are no nested functions here. This
function should only be called from itself or
cgraph_reduced_inorder. ENV is a stack env and would be
unnecessary if C had nested functions. V is the node to start
searching from. */
static void
searchc (struct searchc_env* env, struct cgraph_node *v)
{
struct cgraph_edge *edge;
struct ipa_dfs_info *v_info = v->aux;
/* mark node as old */
v_info->new = false;
splay_tree_remove (env->nodes_marked_new, v->uid);
v_info->dfn_number = env->count;
v_info->low_link = env->count;
env->count++;
env->stack[(env->stack_size)++] = v;
v_info->on_stack = true;
for (edge = v->callees; edge; edge = edge->next_callee)
{
struct ipa_dfs_info * w_info;
struct cgraph_node *w = edge->callee;
/* Bypass the clones and only look at the master node. Skip
external and other bogus nodes. */
w = cgraph_master_clone (w);
if (w && w->aux)
{
w_info = w->aux;
if (w_info->new)
{
searchc (env, w);
v_info->low_link =
(v_info->low_link < w_info->low_link) ?
v_info->low_link : w_info->low_link;
}
else
if ((w_info->dfn_number < v_info->dfn_number)
&& (w_info->on_stack))
v_info->low_link =
(w_info->dfn_number < v_info->low_link) ?
w_info->dfn_number : v_info->low_link;
}
}
if (v_info->low_link == v_info->dfn_number)
{
struct cgraph_node *last = NULL;
struct cgraph_node *x;
struct ipa_dfs_info *x_info;
do {
x = env->stack[--(env->stack_size)];
x_info = x->aux;
x_info->on_stack = false;
if (env->reduce)
{
x_info->next_cycle = last;
last = x;
}
else
env->result[env->order_pos++] = x;
}
while (v != x);
if (env->reduce)
env->result[env->order_pos++] = v;
}
}
/* Topsort the call graph by caller relation. Put the result in ORDER.
The REDUCE flag is true if you want the cycles reduced to single
nodes. Only consider nodes that have the output bit set. */
int
ipa_utils_reduced_inorder (struct cgraph_node **order,
bool reduce, bool allow_overwritable)
{
struct cgraph_node *node;
struct searchc_env env;
splay_tree_node result;
env.stack = xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
env.stack_size = 0;
env.result = order;
env.order_pos = 0;
env.nodes_marked_new = splay_tree_new (splay_tree_compare_ints, 0, 0);
env.count = 1;
env.reduce = reduce;
for (node = cgraph_nodes; node; node = node->next)
if ((node->analyzed)
&& (cgraph_is_master_clone (node)
|| (allow_overwritable
&& (cgraph_function_body_availability (node) ==
AVAIL_OVERWRITABLE))))
{
/* Reuse the info if it is already there. */
struct ipa_dfs_info *info = node->aux;
if (!info)
info = xcalloc (1, sizeof (struct ipa_dfs_info));
info->new = true;
info->on_stack = false;
info->next_cycle = NULL;
node->aux = info;
splay_tree_insert (env.nodes_marked_new,
(splay_tree_key)node->uid,
(splay_tree_value)node);
}
else
node->aux = NULL;
result = splay_tree_min (env.nodes_marked_new);
while (result)
{
node = (struct cgraph_node *)result->value;
searchc (&env, node);
result = splay_tree_min (env.nodes_marked_new);
}
splay_tree_delete (env.nodes_marked_new);
free (env.stack);
return env.order_pos;
}
/* Given a memory reference T, will return the variable at the bottom
of the access. Unlike get_base_address, this will recurse thru
INDIRECT_REFS. */
tree
get_base_var (tree t)
{
if ((TREE_CODE (t) == EXC_PTR_EXPR) || (TREE_CODE (t) == FILTER_EXPR))
return t;
while (!SSA_VAR_P (t)
&& (!CONSTANT_CLASS_P (t))
&& TREE_CODE (t) != LABEL_DECL
&& TREE_CODE (t) != FUNCTION_DECL
&& TREE_CODE (t) != CONST_DECL)
{
t = TREE_OPERAND (t, 0);
}
return t;
}
/* Utilities for ipa analysis.
Copyright (C) 2004-2005 Free Software Foundation, Inc.
Contributed by Kenneth Zadeck <zadeck@naturalbridge.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
#ifndef GCC_IPA_UTILS_H
#define GCC_IPA_UTILS_H
#include "tree.h"
#include "cgraph.h"
/* Used for parsing attributes of asm code. */
extern tree memory_identifier_string;
struct ipa_dfs_info {
int dfn_number;
int low_link;
bool new;
bool on_stack;
struct cgraph_node* next_cycle;
PTR aux;
};
/* In ipa-utils.c */
void ipa_utils_print_order (FILE*, const char *, struct cgraph_node**, int);
int ipa_utils_reduced_inorder (struct cgraph_node **, bool, bool);
tree get_base_var (tree);
#endif /* GCC_IPA_UTILS_H */
...@@ -523,6 +523,8 @@ decode_options (unsigned int argc, const char **argv) ...@@ -523,6 +523,8 @@ decode_options (unsigned int argc, const char **argv)
flag_loop_optimize = 1; flag_loop_optimize = 1;
flag_if_conversion = 1; flag_if_conversion = 1;
flag_if_conversion2 = 1; flag_if_conversion2 = 1;
flag_ipa_pure_const = 1;
flag_ipa_reference = 1;
flag_tree_ccp = 1; flag_tree_ccp = 1;
flag_tree_dce = 1; flag_tree_dce = 1;
flag_tree_dom = 1; flag_tree_dom = 1;
...@@ -556,6 +558,7 @@ decode_options (unsigned int argc, const char **argv) ...@@ -556,6 +558,7 @@ decode_options (unsigned int argc, const char **argv)
flag_cse_skip_blocks = 1; flag_cse_skip_blocks = 1;
flag_gcse = 1; flag_gcse = 1;
flag_expensive_optimizations = 1; flag_expensive_optimizations = 1;
flag_ipa_type_escape = 1;
flag_strength_reduce = 1; flag_strength_reduce = 1;
flag_rerun_cse_after_loop = 1; flag_rerun_cse_after_loop = 1;
flag_rerun_loop_opt = 1; flag_rerun_loop_opt = 1;
...@@ -583,6 +586,7 @@ decode_options (unsigned int argc, const char **argv) ...@@ -583,6 +586,7 @@ decode_options (unsigned int argc, const char **argv)
if (optimize >= 3) if (optimize >= 3)
{ {
flag_tree_promote_statics = 1;
flag_inline_functions = 1; flag_inline_functions = 1;
flag_unswitch_loops = 1; flag_unswitch_loops = 1;
flag_gcse_after_reload = 1; flag_gcse_after_reload = 1;
......
...@@ -431,6 +431,9 @@ init_optimization_passes (void) ...@@ -431,6 +431,9 @@ init_optimization_passes (void)
NEXT_PASS (pass_early_ipa_inline); NEXT_PASS (pass_early_ipa_inline);
NEXT_PASS (pass_early_local_passes); NEXT_PASS (pass_early_local_passes);
NEXT_PASS (pass_ipa_inline); NEXT_PASS (pass_ipa_inline);
NEXT_PASS (pass_ipa_reference);
NEXT_PASS (pass_ipa_pure_const);
NEXT_PASS (pass_ipa_type_escape);
*p = NULL; *p = NULL;
/* All passes needed to lower the function into shape optimizers can operate /* All passes needed to lower the function into shape optimizers can operate
...@@ -469,6 +472,7 @@ init_optimization_passes (void) ...@@ -469,6 +472,7 @@ init_optimization_passes (void)
p = &pass_all_optimizations.sub; p = &pass_all_optimizations.sub;
NEXT_PASS (pass_referenced_vars); NEXT_PASS (pass_referenced_vars);
NEXT_PASS (pass_promote_statics);
NEXT_PASS (pass_create_structure_vars); NEXT_PASS (pass_create_structure_vars);
NEXT_PASS (pass_build_ssa); NEXT_PASS (pass_build_ssa);
NEXT_PASS (pass_may_alias); NEXT_PASS (pass_may_alias);
......
...@@ -34,13 +34,13 @@ find_base_value (src) ...@@ -34,13 +34,13 @@ find_base_value (src)
} }
/* There should be six IF conditionals. */ /* There should be four IF conditionals. */
/* { dg-final { scan-tree-dump-times "if " 6 "dom3"} } */ /* { dg-final { scan-tree-dump-times "if " 4 "dom3"} } */
/* There should be no casts to short unsigned int. */ /* There should be no casts to short unsigned int. */
/* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 0 "dom3"} } */ /* { dg-final { scan-tree-dump-times "\\(short unsigned int\\)" 0 "dom3"} } */
/* There should be three loads of ->code. */ /* There should be two loads of ->code. */
/* { dg-final { scan-tree-dump-times "->code" 3 "dom3"} } */ /* { dg-final { scan-tree-dump-times "->code" 2 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */ /* { dg-final { cleanup-tree-dump "dom3" } } */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */ /* { dg-options "-O3 -fdump-tree-optimized" } */
/* Test for SRA. */ /* Test for SRA. */
...@@ -22,5 +22,5 @@ copystruct11 (teststruct *param) ...@@ -22,5 +22,5 @@ copystruct11 (teststruct *param)
/* There should be no reference to link_error. */ /* There should be no reference to link_error. */
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */ /* { dg-final { cleanup-tree-dump "optimized" } } */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-dce3" } */ /* { dg-options "-O2 -fdump-tree-dce3" } */
/* We should notice constantness of this function. */ /* We should notice constantness of this function. */
int t(int a) int t(int a)
......
...@@ -80,7 +80,7 @@ int main (void) ...@@ -80,7 +80,7 @@ int main (void)
main1 (a,b,c); main1 (a,b,c);
main2 (a,b,c); main2 (a,b,c);
main3 (a,b,c,N); main3 (a,b,c,N-1);
return 0; return 0;
} }
......
...@@ -42,6 +42,9 @@ DEFTIMEVAR (TV_DUMP , "dump files") ...@@ -42,6 +42,9 @@ DEFTIMEVAR (TV_DUMP , "dump files")
DEFTIMEVAR (TV_CGRAPH , "callgraph construction") DEFTIMEVAR (TV_CGRAPH , "callgraph construction")
DEFTIMEVAR (TV_CGRAPHOPT , "callgraph optimization") DEFTIMEVAR (TV_CGRAPHOPT , "callgraph optimization")
DEFTIMEVAR (TV_IPA_REFERENCE , "ipa reference")
DEFTIMEVAR (TV_IPA_PURE_CONST , "ipa pure const")
DEFTIMEVAR (TV_IPA_TYPE_ESCAPE , "ipa type escape")
/* Time spent by constructing CFG. */ /* Time spent by constructing CFG. */
DEFTIMEVAR (TV_CFG , "cfg construction") DEFTIMEVAR (TV_CFG , "cfg construction")
/* Time spent by cleaning up CFG. */ /* Time spent by cleaning up CFG. */
...@@ -66,6 +69,7 @@ DEFTIMEVAR (TV_TREE_GIMPLIFY , "tree gimplify") ...@@ -66,6 +69,7 @@ DEFTIMEVAR (TV_TREE_GIMPLIFY , "tree gimplify")
DEFTIMEVAR (TV_TREE_EH , "tree eh") DEFTIMEVAR (TV_TREE_EH , "tree eh")
DEFTIMEVAR (TV_TREE_CFG , "tree CFG construction") DEFTIMEVAR (TV_TREE_CFG , "tree CFG construction")
DEFTIMEVAR (TV_TREE_CLEANUP_CFG , "tree CFG cleanup") DEFTIMEVAR (TV_TREE_CLEANUP_CFG , "tree CFG cleanup")
DEFTIMEVAR (TV_TREE_PROMOTE_STATICS , "tree promote statics")
DEFTIMEVAR (TV_TREE_VRP , "tree VRP") DEFTIMEVAR (TV_TREE_VRP , "tree VRP")
DEFTIMEVAR (TV_TREE_COPY_PROP , "tree copy propagation") DEFTIMEVAR (TV_TREE_COPY_PROP , "tree copy propagation")
DEFTIMEVAR (TV_TREE_STORE_COPY_PROP , "tree store copy prop") DEFTIMEVAR (TV_TREE_STORE_COPY_PROP , "tree store copy prop")
......
...@@ -566,6 +566,20 @@ find_vars_r (tree *tp, int *walk_subtrees, void *data) ...@@ -566,6 +566,20 @@ find_vars_r (tree *tp, int *walk_subtrees, void *data)
/* Lookup UID in the referenced_vars hashtable and return the associated /* Lookup UID in the referenced_vars hashtable and return the associated
variable or NULL if it is not there. */
tree
referenced_var_lookup_if_exists (unsigned int uid)
{
struct int_tree_map *h, in;
in.uid = uid;
h = htab_find_with_hash (referenced_vars, &in, uid);
if (h)
return h->to;
return NULL_TREE;
}
/* Lookup UID in the referenced_vars hashtable and return the associated
variable. */ variable. */
tree tree
......
...@@ -29,6 +29,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -29,6 +29,7 @@ Boston, MA 02110-1301, USA. */
#include "tree-gimple.h" #include "tree-gimple.h"
#include "tree-ssa-operands.h" #include "tree-ssa-operands.h"
#include "cgraph.h" #include "cgraph.h"
#include "ipa-reference.h"
/* Forward declare structures for the garbage collector GTY markers. */ /* Forward declare structures for the garbage collector GTY markers. */
#ifndef GCC_BASIC_BLOCK_H #ifndef GCC_BASIC_BLOCK_H
...@@ -239,6 +240,11 @@ struct var_ann_d GTY(()) ...@@ -239,6 +240,11 @@ struct var_ann_d GTY(())
current version of this variable (an SSA_NAME). */ current version of this variable (an SSA_NAME). */
tree current_def; tree current_def;
/* Pointer to the structure that contains the sets of global
variables modified by function calls. This field is only used
for FUNCTION_DECLs. */
ipa_reference_vars_info_t GTY ((skip)) reference_vars_info;
/* If this variable is a structure, this fields holds a list of /* If this variable is a structure, this fields holds a list of
symbols representing each of the fields of the structure. */ symbols representing each of the fields of the structure. */
subvar_t subvars; subvar_t subvars;
...@@ -392,6 +398,7 @@ typedef struct ...@@ -392,6 +398,7 @@ typedef struct
extern GTY((param_is (struct int_tree_map))) htab_t referenced_vars; extern GTY((param_is (struct int_tree_map))) htab_t referenced_vars;
extern tree referenced_var_lookup (unsigned int); extern tree referenced_var_lookup (unsigned int);
extern tree referenced_var_lookup_if_exists (unsigned int);
#define num_referenced_vars htab_elements (referenced_vars) #define num_referenced_vars htab_elements (referenced_vars)
#define referenced_var(i) referenced_var_lookup (i) #define referenced_var(i) referenced_var_lookup (i)
...@@ -772,6 +779,10 @@ bool is_hidden_global_store (tree); ...@@ -772,6 +779,10 @@ bool is_hidden_global_store (tree);
/* In tree-sra.c */ /* In tree-sra.c */
void insert_edge_copies (tree, basic_block); void insert_edge_copies (tree, basic_block);
void sra_insert_before (block_stmt_iterator *, tree);
void sra_insert_after (block_stmt_iterator *, tree);
void sra_init_cache (void);
bool sra_type_can_be_decomposed_p (tree);
/* In tree-loop-linear.c */ /* In tree-loop-linear.c */
extern void linear_transform_loops (struct loops *); extern void linear_transform_loops (struct loops *);
......
...@@ -278,6 +278,7 @@ extern struct tree_opt_pass pass_store_copy_prop; ...@@ -278,6 +278,7 @@ extern struct tree_opt_pass pass_store_copy_prop;
extern struct tree_opt_pass pass_vrp; extern struct tree_opt_pass pass_vrp;
extern struct tree_opt_pass pass_create_structure_vars; extern struct tree_opt_pass pass_create_structure_vars;
extern struct tree_opt_pass pass_uncprop; extern struct tree_opt_pass pass_uncprop;
extern struct tree_opt_pass pass_promote_statics;
extern struct tree_opt_pass pass_return_slot; extern struct tree_opt_pass pass_return_slot;
extern struct tree_opt_pass pass_reassoc; extern struct tree_opt_pass pass_reassoc;
extern struct tree_opt_pass pass_rebuild_cgraph_edges; extern struct tree_opt_pass pass_rebuild_cgraph_edges;
...@@ -285,6 +286,9 @@ extern struct tree_opt_pass pass_rebuild_cgraph_edges; ...@@ -285,6 +286,9 @@ extern struct tree_opt_pass pass_rebuild_cgraph_edges;
/* IPA Passes */ /* IPA Passes */
extern struct tree_opt_pass pass_ipa_inline; extern struct tree_opt_pass pass_ipa_inline;
extern struct tree_opt_pass pass_early_ipa_inline; extern struct tree_opt_pass pass_early_ipa_inline;
extern struct tree_opt_pass pass_ipa_reference;
extern struct tree_opt_pass pass_ipa_pure_const;
extern struct tree_opt_pass pass_ipa_type_escape;
extern struct tree_opt_pass pass_early_local_passes; extern struct tree_opt_pass pass_early_local_passes;
extern struct tree_opt_pass pass_all_optimizations; extern struct tree_opt_pass pass_all_optimizations;
......
...@@ -172,8 +172,8 @@ is_sra_scalar_type (tree type) ...@@ -172,8 +172,8 @@ is_sra_scalar_type (tree type)
instantiated, just that if we decide to break up the type into instantiated, just that if we decide to break up the type into
separate pieces that it can be done. */ separate pieces that it can be done. */
static bool bool
type_can_be_decomposed_p (tree type) sra_type_can_be_decomposed_p (tree type)
{ {
unsigned int cache = TYPE_UID (TYPE_MAIN_VARIANT (type)) * 2; unsigned int cache = TYPE_UID (TYPE_MAIN_VARIANT (type)) * 2;
tree t; tree t;
...@@ -275,7 +275,7 @@ decl_can_be_decomposed_p (tree var) ...@@ -275,7 +275,7 @@ decl_can_be_decomposed_p (tree var)
} }
/* We must be able to decompose the variable's type. */ /* We must be able to decompose the variable's type. */
if (!type_can_be_decomposed_p (TREE_TYPE (var))) if (!sra_type_can_be_decomposed_p (TREE_TYPE (var)))
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
{ {
...@@ -296,7 +296,7 @@ type_can_instantiate_all_elements (tree type) ...@@ -296,7 +296,7 @@ type_can_instantiate_all_elements (tree type)
{ {
if (is_sra_scalar_type (type)) if (is_sra_scalar_type (type))
return true; return true;
if (!type_can_be_decomposed_p (type)) if (!sra_type_can_be_decomposed_p (type))
return false; return false;
switch (TREE_CODE (type)) switch (TREE_CODE (type))
...@@ -1769,7 +1769,7 @@ insert_edge_copies (tree stmt, basic_block bb) ...@@ -1769,7 +1769,7 @@ insert_edge_copies (tree stmt, basic_block bb)
/* Helper function to insert LIST before BSI, and set up line number info. */ /* Helper function to insert LIST before BSI, and set up line number info. */
static void void
sra_insert_before (block_stmt_iterator *bsi, tree list) sra_insert_before (block_stmt_iterator *bsi, tree list)
{ {
tree stmt = bsi_stmt (*bsi); tree stmt = bsi_stmt (*bsi);
...@@ -1781,7 +1781,7 @@ sra_insert_before (block_stmt_iterator *bsi, tree list) ...@@ -1781,7 +1781,7 @@ sra_insert_before (block_stmt_iterator *bsi, tree list)
/* Similarly, but insert after BSI. Handles insertion onto edges as well. */ /* Similarly, but insert after BSI. Handles insertion onto edges as well. */
static void void
sra_insert_after (block_stmt_iterator *bsi, tree list) sra_insert_after (block_stmt_iterator *bsi, tree list)
{ {
tree stmt = bsi_stmt (*bsi); tree stmt = bsi_stmt (*bsi);
...@@ -2138,6 +2138,16 @@ debug_sra_elt_name (struct sra_elt *elt) ...@@ -2138,6 +2138,16 @@ debug_sra_elt_name (struct sra_elt *elt)
fputc ('\n', stderr); fputc ('\n', stderr);
} }
void
sra_init_cache (void)
{
if (sra_type_decomp_cache)
return;
sra_type_decomp_cache = BITMAP_ALLOC (NULL);
sra_type_inst_cache = BITMAP_ALLOC (NULL);
}
/* Main entry point. */ /* Main entry point. */
static void static void
...@@ -2147,8 +2157,7 @@ tree_sra (void) ...@@ -2147,8 +2157,7 @@ tree_sra (void)
gcc_obstack_init (&sra_obstack); gcc_obstack_init (&sra_obstack);
sra_candidates = BITMAP_ALLOC (NULL); sra_candidates = BITMAP_ALLOC (NULL);
needs_copy_in = BITMAP_ALLOC (NULL); needs_copy_in = BITMAP_ALLOC (NULL);
sra_type_decomp_cache = BITMAP_ALLOC (NULL); sra_init_cache ();
sra_type_inst_cache = BITMAP_ALLOC (NULL);
sra_map = htab_create (101, sra_elt_hash, sra_elt_eq, NULL); sra_map = htab_create (101, sra_elt_hash, sra_elt_eq, NULL);
/* Scan. If we find anything, instantiate and scalarize. */ /* Scan. If we find anything, instantiate and scalarize. */
......
...@@ -43,6 +43,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -43,6 +43,7 @@ Boston, MA 02110-1301, USA. */
#include "tree-ssa-structalias.h" #include "tree-ssa-structalias.h"
#include "convert.h" #include "convert.h"
#include "params.h" #include "params.h"
#include "ipa-type-escape.h"
#include "vec.h" #include "vec.h"
#include "bitmap.h" #include "bitmap.h"
...@@ -86,6 +87,8 @@ struct alias_stats_d ...@@ -86,6 +87,8 @@ struct alias_stats_d
unsigned int simple_resolved; unsigned int simple_resolved;
unsigned int tbaa_queries; unsigned int tbaa_queries;
unsigned int tbaa_resolved; unsigned int tbaa_resolved;
unsigned int structnoaddress_queries;
unsigned int structnoaddress_resolved;
}; };
...@@ -95,7 +98,7 @@ static struct alias_stats_d alias_stats; ...@@ -95,7 +98,7 @@ static struct alias_stats_d alias_stats;
/* Local functions. */ /* Local functions. */
static void compute_flow_insensitive_aliasing (struct alias_info *); static void compute_flow_insensitive_aliasing (struct alias_info *);
static void dump_alias_stats (FILE *); static void dump_alias_stats (FILE *);
static bool may_alias_p (tree, HOST_WIDE_INT, tree, HOST_WIDE_INT); static bool may_alias_p (tree, HOST_WIDE_INT, tree, HOST_WIDE_INT, bool);
static tree create_memory_tag (tree type, bool is_type_tag); static tree create_memory_tag (tree type, bool is_type_tag);
static tree get_tmt_for (tree, struct alias_info *); static tree get_tmt_for (tree, struct alias_info *);
static tree get_nmt_for (tree); static tree get_nmt_for (tree);
...@@ -346,6 +349,7 @@ count_ptr_derefs (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data) ...@@ -346,6 +349,7 @@ count_ptr_derefs (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data)
struct count_ptr_d *count_p = (struct count_ptr_d *) data; struct count_ptr_d *count_p = (struct count_ptr_d *) data;
if (INDIRECT_REF_P (*tp) && TREE_OPERAND (*tp, 0) == count_p->ptr) if (INDIRECT_REF_P (*tp) && TREE_OPERAND (*tp, 0) == count_p->ptr)
/* || (TREE_CODE (*tp) == MEM_REF && MEM_REF_SYMBOL (*tp) == count_p->ptr)) */
count_p->count++; count_p->count++;
return NULL_TREE; return NULL_TREE;
...@@ -433,7 +437,6 @@ count_uses_and_derefs (tree ptr, tree stmt, unsigned *num_uses_p, ...@@ -433,7 +437,6 @@ count_uses_and_derefs (tree ptr, tree stmt, unsigned *num_uses_p,
gcc_assert (*num_uses_p >= *num_derefs_p); gcc_assert (*num_uses_p >= *num_derefs_p);
} }
/* Initialize the data structures used for alias analysis. */ /* Initialize the data structures used for alias analysis. */
static struct alias_info * static struct alias_info *
...@@ -780,8 +783,8 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) ...@@ -780,8 +783,8 @@ compute_flow_insensitive_aliasing (struct alias_info *ai)
|| bitmap_bit_p (ai->written_vars, DECL_UID (var)); || bitmap_bit_p (ai->written_vars, DECL_UID (var));
if (!tag_stored_p && !var_stored_p) if (!tag_stored_p && !var_stored_p)
continue; continue;
if (may_alias_p (p_map->var, p_map->set, var, v_map->set)) if (may_alias_p (p_map->var, p_map->set, var, v_map->set, false))
{ {
subvar_t svars; subvar_t svars;
size_t num_tag_refs, num_var_refs; size_t num_tag_refs, num_var_refs;
...@@ -862,7 +865,7 @@ compute_flow_insensitive_aliasing (struct alias_info *ai) ...@@ -862,7 +865,7 @@ compute_flow_insensitive_aliasing (struct alias_info *ai)
bitmap may_aliases2 = p_map2->may_aliases; bitmap may_aliases2 = p_map2->may_aliases;
/* If the pointers may not point to each other, do nothing. */ /* If the pointers may not point to each other, do nothing. */
if (!may_alias_p (p_map1->var, p_map1->set, tag2, p_map2->set)) if (!may_alias_p (p_map1->var, p_map1->set, tag2, p_map2->set, true))
continue; continue;
/* The two pointers may alias each other. If they already have /* The two pointers may alias each other. If they already have
...@@ -1453,7 +1456,8 @@ maybe_create_global_var (struct alias_info *ai) ...@@ -1453,7 +1456,8 @@ maybe_create_global_var (struct alias_info *ai)
static bool static bool
may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set, may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set,
tree var, HOST_WIDE_INT var_alias_set) tree var, HOST_WIDE_INT var_alias_set,
bool alias_set_only)
{ {
tree mem; tree mem;
var_ann_t m_ann; var_ann_t m_ann;
...@@ -1520,6 +1524,65 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set, ...@@ -1520,6 +1524,65 @@ may_alias_p (tree ptr, HOST_WIDE_INT mem_alias_set,
alias_stats.tbaa_resolved++; alias_stats.tbaa_resolved++;
return false; return false;
} }
/* If var is a record or union type, ptr cannot point into var
unless there is some operation explicit address operation in the
program that can reference a field of the ptr's dereferenced
type. This also assumes that the types of both var and ptr are
contained within the compilation unit, and that there is no fancy
addressing arithmetic associated with any of the types
involved. */
if ((mem_alias_set != 0) && (var_alias_set != 0))
{
tree ptr_type = TREE_TYPE (ptr);
tree var_type = TREE_TYPE (var);
/* The star count is -1 if the type at the end of the pointer_to
chain is not a record or union type. */
if ((!alias_set_only) &&
ipa_type_escape_star_count_of_interesting_type (var_type) >= 0)
{
int ptr_star_count = 0;
/* Ipa_type_escape_star_count_of_interesting_type is a little to
restrictive for the pointer type, need to allow pointers to
primitive types as long as those types cannot be pointers
to everything. */
while (POINTER_TYPE_P (ptr_type))
/* Strip the *'s off. */
{
ptr_type = TREE_TYPE (ptr_type);
ptr_star_count++;
}
/* There does not appear to be a better test to see if the
pointer type was one of the pointer to everything
types. */
if (ptr_star_count > 0)
{
alias_stats.structnoaddress_queries++;
if (ipa_type_escape_field_does_not_clobber_p (var_type,
TREE_TYPE (ptr)))
{
alias_stats.structnoaddress_resolved++;
alias_stats.alias_noalias++;
return false;
}
}
else if (ptr_star_count == 0)
{
/* If ptr_type was not really a pointer to type, it cannot
alias. */
alias_stats.structnoaddress_queries++;
alias_stats.structnoaddress_resolved++;
alias_stats.alias_noalias++;
return false;
}
}
}
alias_stats.alias_mayalias++; alias_stats.alias_mayalias++;
return true; return true;
} }
...@@ -1851,6 +1914,10 @@ dump_alias_stats (FILE *file) ...@@ -1851,6 +1914,10 @@ dump_alias_stats (FILE *file)
alias_stats.tbaa_queries); alias_stats.tbaa_queries);
fprintf (file, "Total TBAA resolved:\t%u\n", fprintf (file, "Total TBAA resolved:\t%u\n",
alias_stats.tbaa_resolved); alias_stats.tbaa_resolved);
fprintf (file, "Total non-addressable structure type queries:\t%u\n",
alias_stats.structnoaddress_queries);
fprintf (file, "Total non-addressable structure type resolved:\t%u\n",
alias_stats.structnoaddress_resolved);
} }
......
...@@ -33,6 +33,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -33,6 +33,7 @@ Boston, MA 02110-1301, USA. */
#include "timevar.h" #include "timevar.h"
#include "toplev.h" #include "toplev.h"
#include "langhooks.h" #include "langhooks.h"
#include "ipa-reference.h"
/* This file contains the code required to manage the operands cache of the /* This file contains the code required to manage the operands cache of the
SSA optimizer. For every stmt, we maintain an operand cache in the stmt SSA optimizer. For every stmt, we maintain an operand cache in the stmt
...@@ -156,7 +157,7 @@ static inline void append_def (tree *); ...@@ -156,7 +157,7 @@ static inline void append_def (tree *);
static inline void append_use (tree *); static inline void append_use (tree *);
static void append_v_may_def (tree); static void append_v_may_def (tree);
static void append_v_must_def (tree); static void append_v_must_def (tree);
static void add_call_clobber_ops (tree); static void add_call_clobber_ops (tree, tree);
static void add_call_read_ops (tree); static void add_call_read_ops (tree);
static void add_stmt_operand (tree *, stmt_ann_t, int); static void add_stmt_operand (tree *, stmt_ann_t, int);
static void build_ssa_operands (tree stmt); static void build_ssa_operands (tree stmt);
...@@ -1727,7 +1728,7 @@ get_call_expr_operands (tree stmt, tree expr) ...@@ -1727,7 +1728,7 @@ get_call_expr_operands (tree stmt, tree expr)
there is no point in recording that. */ there is no point in recording that. */
if (TREE_SIDE_EFFECTS (expr) if (TREE_SIDE_EFFECTS (expr)
&& !(call_flags & (ECF_PURE | ECF_CONST | ECF_NORETURN))) && !(call_flags & (ECF_PURE | ECF_CONST | ECF_NORETURN)))
add_call_clobber_ops (stmt); add_call_clobber_ops (stmt, get_callee_fndecl (expr));
else if (!(call_flags & ECF_CONST)) else if (!(call_flags & ECF_CONST))
add_call_read_ops (stmt); add_call_read_ops (stmt);
} }
...@@ -1944,7 +1945,7 @@ add_to_addressable_set (tree ref, bitmap *addresses_taken) ...@@ -1944,7 +1945,7 @@ add_to_addressable_set (tree ref, bitmap *addresses_taken)
clobbered variables in the function. */ clobbered variables in the function. */
static void static void
add_call_clobber_ops (tree stmt) add_call_clobber_ops (tree stmt, tree callee)
{ {
int i; int i;
unsigned u; unsigned u;
...@@ -1952,6 +1953,7 @@ add_call_clobber_ops (tree stmt) ...@@ -1952,6 +1953,7 @@ add_call_clobber_ops (tree stmt)
bitmap_iterator bi; bitmap_iterator bi;
stmt_ann_t s_ann = stmt_ann (stmt); stmt_ann_t s_ann = stmt_ann (stmt);
struct stmt_ann_d empty_ann; struct stmt_ann_d empty_ann;
bitmap not_read_b, not_written_b;
/* Functions that are not const, pure or never return may clobber /* Functions that are not const, pure or never return may clobber
call-clobbered variables. */ call-clobbered variables. */
...@@ -1966,8 +1968,22 @@ add_call_clobber_ops (tree stmt) ...@@ -1966,8 +1968,22 @@ add_call_clobber_ops (tree stmt)
return; return;
} }
/* FIXME - if we have better information from the static vars
analysis, we need to make the cache call site specific. This way
we can have the performance benefits even if we are doing good
optimization. */
/* Get info for local and module level statics. There is a bit
set for each static if the call being processed does not read
or write that variable. */
not_read_b = callee ? ipa_reference_get_not_read_global (callee) : NULL;
not_written_b = callee ? ipa_reference_get_not_written_global (callee) : NULL;
/* If cache is valid, copy the elements into the build vectors. */ /* If cache is valid, copy the elements into the build vectors. */
if (ssa_call_clobbered_cache_valid) if (ssa_call_clobbered_cache_valid
&& (!not_read_b || bitmap_empty_p (not_read_b))
&& (!not_written_b || bitmap_empty_p (not_written_b)))
{ {
/* Process the caches in reverse order so we are always inserting at /* Process the caches in reverse order so we are always inserting at
the head of the list. */ the head of the list. */
...@@ -2002,43 +2018,62 @@ add_call_clobber_ops (tree stmt) ...@@ -2002,43 +2018,62 @@ add_call_clobber_ops (tree stmt)
if (unmodifiable_var_p (var)) if (unmodifiable_var_p (var))
add_stmt_operand (&var, &empty_ann, opf_none); add_stmt_operand (&var, &empty_ann, opf_none);
else else
add_stmt_operand (&var, &empty_ann, opf_is_def | opf_non_specific); {
bool not_read
= not_read_b ? bitmap_bit_p (not_read_b, u) : false;
bool not_written
= not_written_b ? bitmap_bit_p (not_written_b, u) : false;
if ((TREE_READONLY (var)
&& (TREE_STATIC (var) || DECL_EXTERNAL (var)))
|| not_written)
{
if (!not_read)
add_stmt_operand (&var, &empty_ann, opf_none);
}
else
add_stmt_operand (&var, &empty_ann, opf_is_def);
}
} }
clobbered_aliased_loads = empty_ann.makes_aliased_loads; if ((!not_read_b || bitmap_empty_p (not_read_b))
clobbered_aliased_stores = empty_ann.makes_aliased_stores; && (!not_written_b || bitmap_empty_p (not_written_b)))
/* Set the flags for a stmt's annotation. */
if (s_ann)
{ {
s_ann->makes_aliased_loads = empty_ann.makes_aliased_loads; clobbered_aliased_loads = empty_ann.makes_aliased_loads;
s_ann->makes_aliased_stores = empty_ann.makes_aliased_stores; clobbered_aliased_stores = empty_ann.makes_aliased_stores;
}
/* Prepare empty cache vectors. */ /* Set the flags for a stmt's annotation. */
VEC_truncate (tree, clobbered_vuses, 0); if (s_ann)
VEC_truncate (tree, clobbered_v_may_defs, 0); {
s_ann->makes_aliased_loads = empty_ann.makes_aliased_loads;
s_ann->makes_aliased_stores = empty_ann.makes_aliased_stores;
}
/* Now fill the clobbered cache with the values that have been found. */ /* Prepare empty cache vectors. */
for (i = opbuild_first (&build_vuses); VEC_truncate (tree, clobbered_vuses, 0);
i != OPBUILD_LAST; VEC_truncate (tree, clobbered_v_may_defs, 0);
i = opbuild_next (&build_vuses, i))
VEC_safe_push (tree, heap, clobbered_vuses,
opbuild_elem_virtual (&build_vuses, i));
gcc_assert (opbuild_num_elems (&build_vuses) /* Now fill the clobbered cache with the values that have been found. */
== VEC_length (tree, clobbered_vuses)); for (i = opbuild_first (&build_vuses);
i != OPBUILD_LAST;
i = opbuild_next (&build_vuses, i))
VEC_safe_push (tree, heap, clobbered_vuses,
opbuild_elem_virtual (&build_vuses, i));
for (i = opbuild_first (&build_v_may_defs); gcc_assert (opbuild_num_elems (&build_vuses)
i != OPBUILD_LAST; == VEC_length (tree, clobbered_vuses));
i = opbuild_next (&build_v_may_defs, i))
VEC_safe_push (tree, heap, clobbered_v_may_defs, for (i = opbuild_first (&build_v_may_defs);
opbuild_elem_virtual (&build_v_may_defs, i)); i != OPBUILD_LAST;
i = opbuild_next (&build_v_may_defs, i))
VEC_safe_push (tree, heap, clobbered_v_may_defs,
opbuild_elem_virtual (&build_v_may_defs, i));
gcc_assert (opbuild_num_elems (&build_v_may_defs) gcc_assert (opbuild_num_elems (&build_v_may_defs)
== VEC_length (tree, clobbered_v_may_defs)); == VEC_length (tree, clobbered_v_may_defs));
ssa_call_clobbered_cache_valid = true; ssa_call_clobbered_cache_valid = true;
}
} }
......
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