Commit Graph

89781 Commits

Author SHA1 Message Date
Paolo Bonzini
3082165492 dojump.c (do_jump): Move below.
2008-09-11  Paolo Bonzini  <bonzini@gnu.org>

	* dojump.c (do_jump) [BIT_AND_EXPR]: Move below.  Fall through to
	TRUTH_AND_EXPR for boolean (1-bit precision) expressions.
	(do_jump) [BIT_IOR_EXPR]: Compile as TRUTH_OR_EXPR.

	* tree-flow.h (simplify_stmt_using_ranges): Accept a GSI, return a bool.
	* tree-ssa-propagate.c (substitute_and_fold): Pass a GSI to
	VRP's simplify_stmt_using_ranges.  Do simplify_stmt_using_ranges
	before finalizing the changes.
	* tree-vrp.c (extract_range_from_binary_expr): Add limited support
	for BIT_IOR_EXPR.
	(simplify_truth_ops_using_ranges): New.
	(simplify_div_or_mod_using_ranges, simplify_abs_using_ranges,
	simplify_cond_using_ranges, simplify_switch_using_ranges): Return
	whether a simplification was made.
	(simplify_stmt_using_ranges): Ditto, and accept a GSI.  For GS_ASSIGN,
	use a switch statement and also call simplify_truth_ops_using_ranges.

testsuite:
2008-09-11  Paolo Bonzini  <bonzini@gnu.org>

	* gcc.dg/tree-ssa/vrp47.c: New.
	* gcc.target/i386/andor-2.c: New.

From-SVN: r140288
2008-09-11 14:45:05 +00:00
Jan Hubicka
cf9757477e ggc-common.c (loc_array): Make static.
* ggc-common.c (loc_array): Make static.
	* dce.c (rest_of_handle_ud_dce): Free worklist.

From-SVN: r140286
2008-09-11 12:48:53 +00:00
Jan Hubicka
936fc9bad2 cgraph.c (cgraph_release_function_body): Plug memory leak on ipa_transforms_to_apply and CFG...
* cgraph.c (cgraph_release_function_body): Plug memory leak on
	ipa_transforms_to_apply and CFG; ggc_free gimple df and struct function
	so we are sure we do not dangle it forever.
	* function.c (outer_function_chain, find_function_data): Remove.
	(function_context_stack): New.
	(push_function_context, pop_function_context): Update.
	* function.h (struct function): Remove pointer outer.
	(outer_function_chain, find_function_data): Remove.
	* stmt.c (force_label_rtx): Remove dead call of find_function_data.

From-SVN: r140285
2008-09-11 12:41:36 +00:00
Jan Hubicka
b1d0a338a7 re PR middle-end/37448 (cannot compile big function)
PR middle-end/37448
	* cgraph.c (cgraph_create_edge): Use !cgraph_edge for sanity check.

From-SVN: r140284
2008-09-11 12:38:57 +00:00
Jan Hubicka
9e504cda34 * tree-ssa-pre.c (phi_translate_1): Fix memory leak
From-SVN: r140283
2008-09-11 12:36:53 +00:00
Jan Hubicka
a97a7ae98b tree-ssa.c (redirect_edge_var_map_clear): Fix formatting.
* tree-ssa.c (redirect_edge_var_map_clear): Fix formatting.
	(free_var_map_entry): New function.
	(redirect_edge_var_map_destroy): Use it.

From-SVN: r140282
2008-09-11 12:36:05 +00:00
Jan Hubicka
4a28309045 re PR middle-end/37448 (cannot compile big function)
PR middle-end/37448
	* tree-inline.c (add_lexical_block): Replace with ...
	(prepend_lexical_block): ... prepend at begginig.
	(remap_blocks): Use it and reverse later.
	(expand_call_inline): Use prepend_lexical_block.

From-SVN: r140281
2008-09-11 12:34:53 +00:00
Jan Hubicka
a856e96f84 * gimplify.c (pop_gimplify_context): Free bind_expr_stack.
From-SVN: r140280
2008-09-11 12:32:24 +00:00
Jan Hubicka
825b2fe7a8 function.c (free_after_compilation): Call insn_locators_free.
* function.c (free_after_compilation): Call insn_locators_free.
	* cfglayout.c (insn_locators_free): New function.
	* rtl.h (insn_locators_free): Declare.

From-SVN: r140279
2008-09-11 12:31:40 +00:00
Jan Hubicka
11e0edad1f ifcvt.c (check_cond_move_block): Make regs argument pointer to vector pointer.
* ifcvt.c (check_cond_move_block): Make regs argument pointer to vector pointer.
	(cond_move_process_if_block): Update call.

From-SVN: r140278
2008-09-11 12:20:42 +00:00
Jan Hubicka
d3492572d5 toplev.c (dump_memory_report): Call dump_vec_loc_statistics.
* toplev.c (dump_memory_report): Call dump_vec_loc_statistics.
	* vec.c: Include hashtab.h
	(vec_descriptor, ptr_hash_entry): New structures.
	(vec_desc_hash, vec_ptr_map): New static variables.
	(hash_descriptor, eq_descriptor, hash_ptr, eq_ptr, vec_descriptor,
	register_overhead, free_overhead, vec_heap_free): New functions.
	(vec_gc_o_reserve_1): ggc_free when resizing to 0.
	(vec_heap_o_reserve_1): free when resizing to 0; add statistics.
	(cmp_statistic, add_statistics, dump_vec_loc_statistics): New functions.

From-SVN: r140277
2008-09-11 12:17:22 +00:00
Ira Rosen
3c9dbe18ee re PR tree-optimization/37474 (vect_supported_slp_permutation_p memory corruption)
PR tree-optimization/37474
	* tree-vect-analyze.c (vect_supported_load_permutation_p): Check the
	length of load permutation.

From-SVN: r140276
2008-09-11 12:08:01 +00:00
Andreas Schwab
5e9bd142df * config/m68k/m68k.h (IRA_COVER_CLASSES): Define.
From-SVN: r140275
2008-09-11 11:08:26 +00:00
Andreas Schwab
a64057fc40 xgot-1.c: Add -mcpu=5206 to select a ColdFire target.
* gcc.target/m68k/xgot-1.c: Add -mcpu=5206 to select a ColdFire
target.

From-SVN: r140272
2008-09-11 09:11:23 +00:00
Jakub Jelinek
d898d29bf9 re PR target/37382 (ICE in extract_insn: <var_decl 0x7fda26ff4b40 swig_module>) 0))
PR target/37382
	* expmed.c (extract_low_bits): Avoid creating invalid subregs.
	* dse.c (find_shift_sequence): Use extract_low_bits instead of
	simplify_gen_subreg.

	* gcc.c-torture/compile/pr37382.c: New test.

From-SVN: r140265
2008-09-11 09:33:23 +02:00
Daniel Kraft
ace428e313 re PR fortran/36214 (Wrong simplification of BOZ constants)
2008-09-11  Daniel Kraft  <d@domob.eu>

	PR fortran/36214
	* simplify.c (simplify_cmplx): Added linebreak to long line.
	* target-memory.c (gfc_convert_boz): Fix indentation.
	(gfc_interpret_float): Set mpfr precision to right value before
	calling mpfr_init.

2008-09-11  Daniel Kraft  <d@domob.eu>

	PR fortran/36214
	* gfortran.dg/boz_9.f90: Corrected test.
	* gfortran.dg/boz_13.f90: New test.
	* gfortran.dg/boz_14.f90: New test.

From-SVN: r140264
2008-09-11 09:28:18 +02:00
Ira Rosen
5993860d25 tree-vect-transform.c (vectorizable_store): Use the rhs vector type for alias check.
* tree-vect-transform.c (vectorizable_store): Use the rhs vector type
	for alias check.

From-SVN: r140257
2008-09-11 06:00:03 +00:00
GCC Administrator
2c542cbd1d Daily bump.
From-SVN: r140254
2008-09-11 00:16:26 +00:00
Paolo Carlini
08376e28d4 ctype.cc (use_facet<ctype<char> >, [...]): Remove specializations.
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/ctype.cc (use_facet<ctype<char> >, use_facet<ctype<wchar_t>):
	Remove specializations.
	* src/locale-inst.cc (use_facet<ctype<C> >): Instantiate.
	* include/bits/locale_facets.tcc (use_facet<ctype<char> >,
	use_facet<ctype<wchar_t>): Declare as extern template.
	* include/bits/locale_facets.h (use_facet<ctype<char> >,
	use_facet<ctype<wchar_t>): Do not declare as specializations.

From-SVN: r140251
2008-09-10 21:34:38 +00:00
H.J. Lu
5bcb0cc368 expr.c (find_array_element): Reformat comment.
2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* expr.c (find_array_element): Reformat comment.

From-SVN: r140250
2008-09-10 14:13:44 -07:00
Jakub Jelinek
0b056e4e1c re PR middle-end/37338 (gcc.dg/array-init-1.c)
PR middle-end/37338
	* gimplify.c (gimplify_body): Call default_rtl_profile.

From-SVN: r140249
2008-09-10 23:08:17 +02:00
H.J. Lu
3b35a6f890 expr.c (find_array_element): Reformat.
2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	* expr.c (find_array_element): Reformat.

From-SVN: r140248
2008-09-10 14:07:29 -07:00
Jakub Jelinek
a76ddc7bda re PR target/36904 (vector context sensitive keyword vs macros)
PR target/36904
	* config/rs6000/rs6000-c.c (rs6000_macro_to_expand): Return NULL
	instead of tok->val.node if not expanding to something else.  Handle
	intervening CPP_PADDING tokens.
	(altivec_categorize_keyword): Remove unneeded comparisons.

	* gcc.target/powerpc/altivec-27.c: New test.

From-SVN: r140247
2008-09-10 23:06:25 +02:00
Joel Sherrill
1011d8a2ff Makefile.in: Switch RTEMS to s-interr-hwint.adb.
2008-09-10  Joel Sherrill <joel.sherrill@oarcorp.com>

	* gcc-interface/Makefile.in: Switch RTEMS to s-interr-hwint.adb.
	* s-osinte-rtems.ads: Add shared hardware interrupt adapter
	layer. RTEMS binds to OS provided adapter routines so there are
	no modifications to s-osinte-rtems.adb.

From-SVN: r140246
2008-09-10 20:11:49 +00:00
Andrew Pinski
dec1b5d735 re PR rtl-optimization/37333 (ICE in ira_flattening, at ira-build.c:2146)
2008-09-10  Andrew Pinski  <andrew_pinski@playstation.sony.com>

       PR middle-end/37333
       * gcc.c-torture/compile/20080910-1.c: New testcase.

From-SVN: r140243
2008-09-10 12:09:13 -07:00
Paolo Carlini
1834f167ee ctype_members.cc (ctype<char>::_M_narrow_init, [...]): Don't define here.
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* config/locale/darwin/ctype_members.cc (ctype<char>::_M_narrow_init,
	ctype<char>::_M_widen_init): Don't define here.
	* config/locale/gnu/ctype_members.cc: Likewise.
	* config/locale/generic/ctype_members.cc: Likewise.
	* src/ctype.cc: Define here.

From-SVN: r140240
2008-09-10 17:37:30 +00:00
Tobias Burnus
7666351c39 mk-sik-inc.sh: Make -Wunused-variable proof.
2008-09-10  Tobias Burnus  <burnus@net-b.de>
            H. J. Lu  <hongjiu.lu@intel.com>

        * mk-sik-inc.sh: Make -Wunused-variable proof.
        * mk-srk-inc.sh: Make -Wunused-variable proof.


Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>

From-SVN: r140239
2008-09-10 19:18:08 +02:00
Paolo Carlini
6c43852a18 re PR libstdc++/37455 (Code bloat for ostream.widen('\n'))
2008-09-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/37455
	* include/bits/locale_facets.h (ctype<char>::_M_narrow_init,
	ctype<char>::_M_widen_init): Don't define inline.
	* config/locale/darwin/ctype_members.cc: ... define here.
	* config/locale/gnu/ctype_members.cc: ... likewise.
	* config/locale/generic/ctype_members.cc: ... likewise.
	* config/abi/pre/gnu.ver: Export.

From-SVN: r140238
2008-09-10 16:48:47 +00:00
Tobias Burnus
b554826c78 mk-kinds-h.sh: Make -Wunused-variable proof.
2008-09-10  Tobias Burnus  <burnus@net-b.de>

       * mk-kinds-h.sh: Make -Wunused-variable proof.

From-SVN: r140237
2008-09-10 18:39:15 +02:00
Richard Guenther
b5d76df4c9 tree-ssa-pre.c (phi_translate_1): Fix memory leak.
2008-09-10  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-pre.c (phi_translate_1): Fix memory leak.

From-SVN: r140236
2008-09-10 16:14:30 +00:00
Richard Guenther
bfb0b88634 re PR tree-optimization/37432 (ICE in VN_INFO, at tree-ssa-sccvn.c:180)
2008-09-10  Richard Guenther  <rguenther@suse.de>

	PR middle-end/37432
	* tree-inline.c (insert_init_stmt): Make sure to not
	insert invalid gimple stores.

	* gcc.c-torture/compile/pr37432.c: New testcase.

From-SVN: r140233
2008-09-10 15:07:04 +00:00
Sebastian Pop
b70e977531 re PR tree-optimization/37388 ([graphite] No warn with "-O0 -fgraphite" when cloog or ppl are not present)
2008-09-10  Sebastian Pop  <sebastian.pop@amd.com>

	PR tree-optimization/37388
	* toplev.c (process_options): Fail and warn when graphite
	flags are used, but the compiler has not been configured
	with graphite libraries.
	* graphite.c (graphite_transform_loops): Remove printfs
	to dump_file for the case when graphite is not available.

From-SVN: r140232
2008-09-10 14:46:35 +00:00
H.J. Lu
8199c8a865 re PR target/37434 (ICE in extract_insn, at recog.c:2027)
gcc/

2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37434:
	* config/i386/i386.c (ix86_expand_vector_init_interleave): Force
	the even element into register.
	(ix86_expand_vector_init_general): Don't use
	ix86_expand_vector_init_interleave on V16QImode and V8HImode
	if we can't move from GPR to SSE register directly.

gcc/testsuite/

2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37434:
	* gcc.target/i386/pr37434-1.c: New.
	* gcc.target/i386/pr37434-2.c: Likewise.
	* gcc.target/i386/pr37434-3.c: Likewise.
	* gcc.target/i386/pr37434-4.c: Likewise.
	* gcc.target/i386/sse2-set-v8hi-1a.c: Likewise.
	* gcc.target/i386/sse2-set-v8hi-2a.c: Likewise.
	* gcc.target/i386/sse4_1-set-v16qi-1a.c: Likewise.
	* gcc.target/i386/sse4_1-set-v16qi-2a.c: Likewise.
	* gcc.target/i386/sse4_1-set-v16qi-3a.c: Likewise.

From-SVN: r140231
2008-09-10 07:14:28 -07:00
Bernd Schmidt
90cbba020c bfin.c (workaround_speculation): Correct algorithm to not lose track of the number of NOPs needed.
* config/bfin/bfin.c (workaround_speculation): Correct algorithm to
	not lose track of the number of NOPs needed.  Number of NOPs needed
	for sync vs. loads workaround was switched; corrected.  Run second
	pass for all workarounds.  No NOPs needed after call insns.  Change
	second pass to use find_next_insn_start and find_load helpers in order
	to properly detect parallel insns.
	* config/bfin/bfin.md (cbranch_with_nops): Increase length.

From-SVN: r140230
2008-09-10 13:28:34 +00:00
Tobias Burnus
06c7153ff1 re PR fortran/37420 (-Wunused-variable broken)
2008-09-10  Tobias Burnus  <burnus@net-b.de>

        PR fortran/37420
        * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.

2008-09-10  Tobias Burnus  <burnus@net-b.de>

        PR fortran/37420
        * gfortran.dg/warn_unused_var.f90: New test.
        * gfortran.dg/warn_unused_var.f90: Add cleanup-modules.

From-SVN: r140229
2008-09-10 13:54:08 +02:00
Jan Hubicka
99e395c716 value-prof.c (gimple_ic): Fix tuplification bug.
* value-prof.c (gimple_ic): Fix tuplification bug.
	* sched-deps.c (sched_insns_conditions_mutex_p): Silence unitialized var
	warning.

From-SVN: r140228
2008-09-10 11:37:18 +00:00
Jakub Jelinek
6b672a2906 re PR tree-optimization/37353 (ICE: vector VEC(gimple,base) push domain error, in tree_call_cdce at tree-call-cdce.c:890)
PR tree-optimization/37353
	* tree-call-cdce.c (cond_dead_built_in_calls): Remove.
	(shrink_wrap_conditional_dead_built_in_calls): Add calls argument, use
	calls instead of cond_dead_built_in_calls.
	(tree_call_cdce): Add cond_dead_built_in_calls automatic variable,
	initalize the vector only before adding first entry.  Use VEC_safe_push
	instead of VEC_quick_push.  Pass cond_dead_built_in_calls to
	shrink_wrap_conditional_dead_built_in_calls call.

	* gcc.dg/pr37353.c: New test.

From-SVN: r140208
2008-09-10 10:00:40 +02:00
Ira Rosen
5392e447a2 re PR middle-end/37385 (ICE in set_mem_alias_set with the vectorizer and function pointers)
PR tree-optimization/37385
	* tree-vect-transform.c (vect_create_data_ref_ptr): Add a new argument,
	and use it as a vector type if not NULL.
	(vectorizable_store): Call vect_create_data_ref_ptr with the type of
	vectorized rhs.
	(vect_setup_realignment): Call vect_create_data_ref_ptr with additional
	argument.
	(vectorizable_load): Likewise.

From-SVN: r140195
2008-09-10 07:18:52 +00:00
Jakub Jelinek
4e7f50e5e4 i386.md (SWI32): New mode iterator.
* config/i386/i386.md (SWI32): New mode iterator.
	(jcc_fused_1, jcc_fused_2, jcc_fused_3, jcc_fused_4): Use it instead
	of SWI.

From-SVN: r140189
2008-09-10 08:23:57 +02:00
GCC Administrator
655b3d43f9 Daily bump.
From-SVN: r140187
2008-09-10 00:16:29 +00:00
H.J. Lu
c3c96e682f re PR rtl-optimization/37435 (ICE with volatiles)
gcc/

2008-09-09  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/37435
	* caller-save.c (insert_restore, insert_save): Check the mode by
	reg_save_code.

gcc/testsuite/

2008-09-09  H.J. Lu  <hongjiu.lu@intel.com>

	PR rtl-optimization/37435
	* gcc.dg/dfp/pr37435.c: New.

From-SVN: r140184
2008-09-09 16:58:57 -07:00
John David Anglin
a26495282e re PR other/37265 (mt_allocator.cc:646: ICE: in gt_ggc_m_S, at ggc-page.c:1281)
PR other/37265
	* dwarf2asm.c (dw2_force_const_mem): Use unstripped symbol name for
	splay tree lookup.
	(dw2_output_indirect_constant_1): Use unstripped name in symbol
	reference.

From-SVN: r140183
2008-09-09 23:57:41 +00:00
Benjamin Kosnik
05665c0620 abi.xml: Update for new releases.
2008-09-09  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/xml/manual/abi.xml: Update for new releases.
	* doc/doxygen/user.cfg.in: Include C compatibility headers.
	* doc/html/*: Regenerate.

From-SVN: r140180
2008-09-09 22:42:23 +00:00
Sandra Loosemore
26cd0fcc59 invoke.texi (ARM Options): Correct errors in discussion of -mfloat-abi, -mhard-float, and -msoft-float.
2008-09-09  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi (ARM Options): Correct errors in discussion 
	of -mfloat-abi, -mhard-float, and -msoft-float.

From-SVN: r140179
2008-09-09 18:21:10 -04:00
Jakub Jelinek
701e903a76 re PR c++/37417 (error: type mismatch in binary expression, verify_gimple failed)
PR c++/37417
	* tree.c (array_type_nelts_top): Add size_one_node instead of
	integer_one_node.

	* g++.dg/ext/vla5.C: New test.

From-SVN: r140178
2008-09-10 00:08:46 +02:00
Jakub Jelinek
c2a4718a14 re PR middle-end/37356 (ICE in gsi_insert_seq_nodes_after, at gimple-iterator.c:222)
PR middle-end/37356
	* tree-inline.c (copy_bb): Insert stmt into copy_basic_block before
	calling gimple_regimplify_operands on it.  Iterate over all newly
	added statements, not just the last one.
	(insert_init_stmt): Insert stmt into seq first, then call
	gimple_regimplify_operands on it.  Don't create new gimplification
	context, nor find referenced vars.

	* g++.dg/tree-ssa/pr37356.C: New test.

Co-Authored-By: Jan Hubicka <jh@suse.cz>

From-SVN: r140177
2008-09-10 00:06:20 +02:00
Jason Merrill
18802917af re PR c++/37439 (ICE using auto return-type in template function)
PR c++/37439
        * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
        DECL_CONTEXT set.

From-SVN: r140176
2008-09-09 17:41:58 -04:00
Paolo Carlini
07ebe945c7 2008-09-09 Paolo Carlini <paolo.carlini@oracle.com>
* Fix typo in ChangeLog.

From-SVN: r140175
2008-09-09 21:36:42 +00:00
Paolo Carlini
802841eb8c cinttypes: Restore __STDC_FORMAT_MACRO after inclusion of <inttypes.h>.
2008-09-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/tr1_impl/cinttypes: Restore __STDC_FORMAT_MACRO after
	inclusion of <inttypes.h>.
	* include/tr1_impl/cstdint: Likewise for __STDC_LIMIT_MACROS and
	__STDC_CONSTANT_MACROS after <stdint.h>.
	* include/bits/postypes.h: Likewise.

From-SVN: r140174
2008-09-09 21:33:46 +00:00
Jakub Jelinek
e56f5f3e5a re PR other/37419 (mpfr related memory corruption)
PR other/37419
	* ipa-prop.h (ipa_propagate_indirect_call_infos): Change last argument
	to pointer to vector pointer.
	* ipa-prop.c (ipa_propagate_indirect_call_infos,
	propagate_info_to_inlined_callees): Likewise.
	(update_call_notes_after_inlining): Likewise.  Push new indirect edge
	to *new_edges instead of new_edges.  Reread IPA_EDGE_REF after
	ipa_check_create_edge_args.
	* ipa-inline.c (cgraph_decide_recursive_inlining): Change last argument
	to pointer to vector pointer.
	(cgraph_decide_inlining_of_small_function): Adjust
	cgraph_decide_recursive_inlining and ipa_propagate_indirect_call_infos
	calls.

From-SVN: r140168
2008-09-09 21:19:41 +02:00