gcc.git
11 years agocxx11.cc (struct datum): New.
Tom Tromey [Wed, 15 Aug 2012 18:37:30 +0000 (18:37 +0000)]
cxx11.cc (struct datum): New.

* testsuite/libstdc++-prettyprinters/cxx11.cc (struct datum):
New.
(global): New global.
(main): Add test for unique_ptr.
* python/libstdcxx/v6/printers.py
(UniquePointerPrinter.to_string): Extract the pointer and also
print its type.

From-SVN: r190417

11 years agoAdd $(TARGET_H) dependency to tree-cfg.o
H.J. Lu [Wed, 15 Aug 2012 16:59:04 +0000 (16:59 +0000)]
Add $(TARGET_H) dependency to tree-cfg.o

* Makefile.in (tree-cfg.o): Also depend on $(TARGET_H).

From-SVN: r190416

11 years agore PR tree-optimization/54245 (incorrect optimisation)
Bill Schmidt [Wed, 15 Aug 2012 13:27:29 +0000 (13:27 +0000)]
re PR tree-optimization/54245 (incorrect optimisation)

gcc:

2012-08-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/54245
* gimple-ssa-strength-reduction.c (legal_cast_p_1): New function.
(legal_cast_p): Split out logic to legal_cast_p_1.
(analyze_increments): Avoid introducing multiplies in smaller types.

gcc/testsuite:

2012-08-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/54245
* gcc.dg/tree-ssa/pr54245.c: New test.

From-SVN: r190412

11 years agore PR tree-optimization/54240 (Routine hoist_adjacent_loads does not work properly...
Bill Schmidt [Wed, 15 Aug 2012 13:17:42 +0000 (13:17 +0000)]
re PR tree-optimization/54240 (Routine hoist_adjacent_loads does not work properly after r189366)

gcc:

2012-08-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/54240
* tree-ssa-phiopt.c (hoist_adjacent_loads): Correct test for
existence of conditional move with given mode.

gcc/testsuite:

2012-08-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/54240
* gcc.target/powerpc/pr54240.c: New test.
* gcc.target/mips/pr54240.c: Likewise.

From-SVN: r190411

11 years agodouble-int.h (double_int::from_unsigned): Rename to ...
Richard Guenther [Wed, 15 Aug 2012 11:39:52 +0000 (11:39 +0000)]
double-int.h (double_int::from_unsigned): Rename to ...

2012-08-15  Richard Guenther  <rguenther@suse.de>

* double-int.h (double_int::from_unsigned): Rename to ...
(double_int::from_uhwi): ... this.
(double_int::from_signed): Rename to ...
(double_int::from_shwi): ... this.
(double_int::to_signed): Rename to ...
(double_int::to_shwi): ... this.
(double_int::to_unsigned): Rename to ...
(double_int::to_uhwi): ... this.
(double_int::fits_unsigned): Rename to ...
(double_int::fits_uhwi): ... this.
(double_int::fits_signed): Rename to ...
(double_int::fits_shwi): ... this.
(double_int::fits): Rename to ...
(double_int::fits_hwi): ... this.
* double-int.c: Likewise.

From-SVN: r190410

11 years agotimevar.def (TV_VARPOOL, [...]): Remove.
Steven Bosscher [Wed, 15 Aug 2012 08:47:13 +0000 (08:47 +0000)]
timevar.def (TV_VARPOOL, [...]): Remove.

* timevar.def (TV_VARPOOL, TV_WHOPR_WPA_LTRANS_EXEC, TV_LIFE,
TV_LIFE_UPDATE, TV_DF_UREC, TV_INLINE_HEURISTICS,
TV_TREE_LINEAR_TRANSFORM, TV_TREE_LOOP_INIT, TV_TREE_LOOP_FINI,
TV_VPT, TV_LOCAL_ALLOC, TV_GLOBAL_ALLOC, TV_SEQABSTR): Remove.
(TV_IPA_INLINING, TV_FLATTEN_INLINING, TV_EARLY_INLINING,
TV_INLINE_PARAMETERS, TV_LOOP_INIT, TV_LOOP_FINI): New.
* timevar.c (timevar_print): Make printing width of timevar names
more flexible, but enforce maximum length.
* ipa-inline.c (pass_early_inline): Use TV_EARLY_INLINING.
(pass_ipa_inline): Use TV_IPA_INLINING.
* ipa-inline-analysis.c (pass_inline_parameters): Use
TV_INLINE_HEURISTICS.
* tree-ssa-loop.c (pass_tree_loop_init): No timevar for wrapper pass.
(pass_tree_loop_done): Likewise.
* final.c (pass_shorten_branches): Use TV_SHORTEN_BRANCH.
* loop-init.c (loop_optimizer_init): Push/pop TV_LOOP_INIT.
(loop_optimizer_finalize): Push/pop TV_LOOP_FINI.

From-SVN: r190409

11 years agoCanonicalize operand to vaba and vabal.
Ramana Radhakrishnan [Wed, 15 Aug 2012 08:39:48 +0000 (08:39 +0000)]
Canonicalize operand to vaba and vabal.

2012-08-15  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

* config/arm/neon.md (neon_vaba<mode> VDQIW): Canonicalize
operands.
(neon_vabal<mode> VDQIW): Likewise.

From-SVN: r190408

11 years agore PR target/54212 (ARM: invalid instruction (vdupeq.32) generated)
Ramana Radhakrishnan [Wed, 15 Aug 2012 07:56:41 +0000 (07:56 +0000)]
re PR target/54212 (ARM: invalid instruction (vdupeq.32) generated)

Fix PR target/54212

2012-08-15  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

PR target/54212
* config/arm/neon.md (vec_set<mode>_internal VD,VQ): Do not
mark as predicable. Adjust asm template.
(vec_setv2di_internal): Likewise.
(vec_extract<mode> VD, VQ): Likewise.
(vec_extractv2di): Likewise.
(neon_vget_lane<mode>_sext_internal VD, VQ): Likewise.
(neon_vset_lane<mode>_sext_internal VD, VQ): Likewise.
(neon_vdup_n<mode> VX, V32): Likewise.
(neon_vdup_nv2di): Likewise.

From-SVN: r190407

11 years agomips.md (define_attr accum_in): New instruction attribute.
Maxim Kuvyrkov [Wed, 15 Aug 2012 05:56:08 +0000 (05:56 +0000)]
mips.md (define_attr accum_in): New instruction attribute.

* config/mips/mips.md (define_attr accum_in): New instruction attribute.
Set it for imadd and fmadd patterns.
* config/mips/mips.c (mips_linked_madd_p): Use accum_in to extract
accumulator register.

From-SVN: r190406

11 years agocompiler: Adjust for GCC always being built with C++.
Ian Lance Taylor [Wed, 15 Aug 2012 03:47:05 +0000 (03:47 +0000)]
compiler: Adjust for GCC always being built with C++.

From-SVN: r190405

11 years agoAdd an xfail manifest for x86_64-unknown-linux-gnu to trunk.
Diego Novillo [Wed, 15 Aug 2012 02:25:19 +0000 (22:25 -0400)]
Add an xfail manifest for x86_64-unknown-linux-gnu to trunk.

This patch adds an xfail manifest for trunk for x86_64 builds. I find
this useful to determine whether my patch has introduced new failures.
The failures in these manifest are always present in trunk and
deciding what to ignore is not very straightforward.

I will keep maintaining this manifest out of clean builds. They are
not hard to maintain. Manifest files can be generated by going to the
top of the build directory and typing:

$ cd <top-of-bld-dir>
$ <path-to-src>/contrib/testsuite-management --produce_manifest

This will generate a .xfail file with the triple name of the target
you just built.  Once this file exist you can run the validator again
on the build directory with no arguments.  It should produce the
output:

$ cd <top-of-bld-dir>
$ <path-to-src>/contrib/testsuite-management/validate_failures.py
Source directory: <path-to-src>
Build target:     x86_64-unknown-linux-gnu
Manifest:         <path-to-src>/contrib/testsuite-management/x86_64-unknown-linux-gnu.xfail
Getting actual results from build
        ./x86_64-unknown-linux-gnu/libstdc++-v3/testsuite/libstdc++.sum
        ./x86_64-unknown-linux-gnu/libffi/testsuite/libffi.sum
        ./x86_64-unknown-linux-gnu/libgomp/testsuite/libgomp.sum
        ./x86_64-unknown-linux-gnu/libgo/libgo.sum
        ./x86_64-unknown-linux-gnu/boehm-gc/testsuite/boehm-gc.sum
        ./x86_64-unknown-linux-gnu/libatomic/testsuite/libatomic.sum
        ./x86_64-unknown-linux-gnu/libmudflap/testsuite/libmudflap.sum
        ./x86_64-unknown-linux-gnu/libitm/testsuite/libitm.sum
        ./x86_64-unknown-linux-gnu/libjava/testsuite/libjava.sum
        ./gcc/testsuite/g++/g++.sum
        ./gcc/testsuite/gnat/gnat.sum
        ./gcc/testsuite/ada/acats/acats.sum
        ./gcc/testsuite/gcc/gcc.sum
        ./gcc/testsuite/gfortran/gfortran.sum
        ./gcc/testsuite/obj-c++/obj-c++.sum
        ./gcc/testsuite/go/go.sum
        ./gcc/testsuite/objc/objc.sum

SUCCESS: No unexpected failures.

If the output shows new failures, you investigate them. If they are
not yours, you can add them to the xfail manifest (after reporting
them) and then commit the modified .xfail file.

Long term, I would like to have this script pull manifest files from
postings made to gcc-testresults. This way, we won't have to maintain
these .xfail files manually. In branches this is not a big problem,
but in trunk it may be a tad annoying.

From-SVN: r190404

11 years agobackport: As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html...
Diego Novillo [Wed, 15 Aug 2012 01:56:07 +0000 (21:56 -0400)]
backport: As described in gcc.gnu.org/ml/gcc/2012-08/msg00015.html...

Merge from cxx-conversion branch (http://gcc.gnu.org/wiki/cxx-conversion).

As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, this patch
changes the default bootstrap process so that stage 1 always builds with a C++
compiler.

Other than the bootstrap change, the patch makes no functional changes to the
compiler.  Everything should build as it does now in trunk.  The main
changes in this patch are:

1- Configuration changes.
2- Re-write of VEC.
3- Re-write of gengtype to support C++ templates and
   user-provided marking functions.
4- New hash table class.
5- Re-write double_int.
6- Implement tree macros as inline functions so they can be
   called from gdb.

As discussed before, several of these changes do not fully change
the call sites to use the new APIs.

The bootstrap changes have already been tested on a wide range of
targets (http://gcc.gnu.org/wiki/CppBuildStatus).  Additionally,
I have tested the merged trunk on: x86_64-unknown-linux-gnu,
mips64el-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
i686-pc-linux-gnu, and ia64-unknown-linux-gnu.

ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.

* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
POSTSTAGE1_CONFIGURE_FLAGS.
* Makefile.in: Regenerate.
* configure.ac (ENABLE_BUILD_WITH_CXX): Remove.  Update all users.
Force C++ when bootstrapping.
* configure: Regenerate.

libcpp/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.  Configury.

* Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
* configure.ac: Likewise.
* configure: Regenerate.

2012-08-14   Lawrence Crowl  <crowl@google.com>

Merge from cxx-conversion branch.  New C++ hash table.

* include/symtab.h (typedef struct ht hash_table): Change the typedef
name to cpp_hash_table.  Update all users of the typedef.

gcc/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.  Configury.

* configure.ac (CXX_FOR_BUILD): Define and substitute.
(BUILD_CXXFLAGS): Define.
Remove all handlers of ENABLE_BUILD_WITH_CXX.
Force all build to be with C++.
* Makefile.in (BUILD_CXXFLAGS): Use it.
Remove all handlers of ENABLE_BUILD_WITH_CXX.
* configure: Regenerate.
* config.in: Regenerate.
* doc/install.texi: Remove documentation for --enable-build-with-cxx
and --enable-build-poststage1-with-cxx.

2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.  Re-implement VEC in C++.

* vec.c (vec_heap_free): Convert into a template function.
(vec_gc_o_reserve_1): Make extern.
(vec_gc_p_reserve): Remove.
(vec_gc_p_reserve_exact): Remove.
(vec_gc_o_reserve): Remove.
(vec_gc_o_reserve_exact): Remove.
(vec_heap_o_reserve_1): Make extern.
(vec_heap_p_reserve): Remove.
(vec_heap_p_reserve_exact): Remove.
(vec_heap_o_reserve): Remove.
(vec_heap_o_reserve_exact): Remove.
(vec_stack_p_reserve): Remove.
(vec_stack_p_reserve_exact): Remove.
* vec.h (VEC_CHECK_INFO, VEC_CHECK_DECL, VEC_CHECK_PASS,
VEC_ASSERT, VEC_ASSERT_FAIL, vec_assert_fail): Move earlier
in the file.
(VEC): Define to vec_t<T>.
(vec_allocation_t): Define.
(struct vec_prefix): Move earlier in the file.
(vec_t<T>): New template.
(DEF_VEC_I, DEF_VECL_ALLOC_I, DEF_VEC_P, DEF_VEC_ALLOC_P,
DEF_VEC_O, DEF_VEC_ALLOC_P, DEF_VEC_O, DEF_VEC_ALLOC_O,
DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_O_STACK,
DEF_VEC_ALLOC_I_STACK): Expand to 'struct vec_swallow_trailing_semi'.
(DEF_VEC_A): Provide template instantiations for
GC/PCH markers that do not traverse the vector.
(vec_stack_p_reserve): Remove.
(vec_stack_p_reserve_exact): Remove.
(vec_stack_p_reserve_exact_1): Remove.
(vec_stack_o_reserve): Remove.
(vec_stack_o_reserve_exact): Remove.
(vec_stack_free): Re-write as a template function.
(vec_reserve): New template function.
(vec_reserve_exact): New template function.
(vec_heap_free): New template function if GATHER_STATISTICS is
defined.  Otherwise, macro that expands to free().
(VEC_length_1): New template function.
(VEC_length): Call it.
(VEC_empty_1): New template function.
(VEC_empty): Call it.
(VEC_address_1): New template function.
(VEC_address): Call it.
(VEC_last_1): New template function.
(VEC_last): Call it.  Change return type to T&.
Change all users that used VEC_Os.
(VEC_index_1): New template function.
(VEC_index): Call it.  Return a T& instead of a T*.
Update all callers that were using VEC_O before.
(VEC_iterate_1): New template function.
(VEC_iterate): Call it.
(VEC_embedded_size_1): New template function.
(VEC_embedded_size): Call it.
(VEC_embedded_init_1): New template function.
(VEC_embedded_init): Call it.
(VEC_alloc_1): New template function.
(VEC_alloc): Call it.  If A is 'stack', call XALLOCAVAR to
do the allocation.
(VEC_free_1): New template function.
(VEC_free): Call it.
(VEC_copy_1): New template function.
(VEC_copy): Call it.
(VEC_space_1): New template function
(VEC_space): Call it.
(VEC_reserve_1): New template function.
(VEC_reserve): Call it.
(VEC_reserve_exact_1): New template function.
(VEC_reserve_exact): Call it.
(VEC_splice_1): New template function.
(VEC_splice): Call it.
(VEC_safe_splice_1): New template function.
(VEC_safe_splice): Call it.
(VEC_quick_push_1): New template function.  Create two overloads, one
accepting T, the other accepting T *.  Update all callers
where T and T * are ambiguous.
(VEC_quick_push): Call it.
(VEC_safe_push_1): New template function. Create two overloads, one
accepting T, the other accepting T *.  Update all callers
where T and T * are ambiguous.
(VEC_safe_push): Call it.
(VEC_pop_1): New template function.
(VEC_pop): Call it.
(VEC_truncate_1): New template function.
(VEC_truncate): Call it.
(VEC_safe_grow_1): New template function.
(VEC_safe_grow): Call it.
(VEC_safe_grow_cleared_1): New template function.
(VEC_safe_grow_cleared): Call it.
(VEC_replace_1): New template function.
(VEC_replace): Call it.  Always accept T instead of T*.
Update all callers that used VEC_Os.
(VEC_quick_insert_1): New template function.
(VEC_quick_insert): Call it.
(VEC_safe_insert_1): New template function.
(VEC_safe_insert): Call it.
(VEC_ordered_remove_1): New template function.
(VEC_ordered_remove): Call it.
(VEC_unordered_remove_1): New template function.
(VEC_unordered_remove): Call it.
(VEC_block_remove_1): New template function.
(VEC_block_remove): Call it.
(VEC_lower_bound_1): New template function.
(VEC_lower_bound): Call it.
(VEC_OP): Remove.
(DEF_VEC_FUNC_P): Remove.
(DEF_VEC_ALLOC_FUNC_P): Remove.
(DEF_VEC_NONALLOC_FUNCS_P): Remove.
(DEF_VEC_FUNC_O): Remove.
(DEF_VEC_ALLOC_FUNC_O): Remove.
(DEF_VEC_NONALLOC_FUNCS_O): Remove.
(DEF_VEC_ALLOC_FUNC_I): Remove.
(DEF_VEC_NONALLOC_FUNCS_I): Remove.
(DEF_VEC_ALLOC_FUNC_P_STACK): Remove.
(DEF_VEC_ALLOC_FUNC_O_STACK): Remove.
(DEF_VEC_ALLOC_FUNC_I_STACK): Remove.
(vec_reserve_exact): New template function.

* gengtype-lex.l (DEF_VEC_ALLOC_[IOP]/{EOID}): Remove.
* gengtype-parse.c (token_names): Remove DEF_VEC_ALLOC_[IOP].
(typedef_name): Emit vec_t<C1> instead of VEC_C1_C2.
(def_vec_alloc): Remove.  Update all callers.
* gengtype.c (filter_type_name): New.
(output_mangled_typename): Call it.
(write_func_for_structure): Likewise.
(write_types): Likewise.
(write_root): Likewise.
(write_typed_alloc_def): Likewise.
(note_def_vec): Emit vec_t<TYPE_NAME> instead of VEC_TYPE_NAME_base.
(note_def_vec_alloc): Remove.
* gengtype.h (note_def_vec_alloc): Remove.
(DEFVEC_ALLOC): Remove token code.

* df-scan.c (df_bb_verify): Remove call to df_free_collection_rec
inside the insn traversal loop.
* gimplify.c (gimplify_compound_lval): Rename STACK to EXPR_STACK.
* ipa-inline.c (inline_small_functions): Rename HEAP to EDGE_HEAP.
* reg-stack.c (stack): Rename to STACK_PTR.  Update all users.
* tree-vrp.c (stack): Rename to EQUIV_STACK.  Update all users.

* config/bfin/bfin.c (hwloop_optimize): Update some calls to
VEC_* for vectors of non-pointers.
* config/c6x/c6x.c (try_rename_operands): Likewise.
(reshuffle_units): Likewise.
* config/mips/mips.c (mips_multi_start): Likewise.
(mips_multi_add): Likewise.
(mips_multi_copy_insn): Likewise.
(mips_multi_set_operand): Likewise.
* hw-doloop.c (discover_loop): Likewise.
(discover_loops): Likewise.
(reorg_loops): Likewise.

2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.  C++ support in gengtype.

* coretypes.h (gt_pointer_operator): Move from ...
* ggc.h: ... here.
* doc/gty.texi: Document support for C++ templates and
user-provided markers.
* gcc/gengtype-lex.l: Update copyright year.
Remove support for recognizing DEF_VEC_O, DEF_VEC_P and
DEFVEC_I.
* gengtype-parse.c: Update copyright year.
(token_names): Remove DEF_VEC_O, DEF_VEC_P and DEF_VEC_I.
(require_template_declaration): New.
(typedef_name): Call it.
(type): Replace IS_UNION with KIND. Replace all users.
(def_vec): Remove.  Update all users.
* gengtype-state.c (type_lineloc): Handle TYPE_USER_STRUCT.
(write_state_user_struct_type): New.
(write_state_type): Call it.
(read_state_user_struct_type): New.
(read_state_type): Call it.
* gengtype.c: Update copyright year.
(dump_pair): Move declaration to the top.
(dump_type): Likewise.
(dump_type_list): Likewise.
(dbgprint_count_type_at): Handle TYPE_USER_STRUCT.
(create_user_defined_type): New.
(resolve_typedef): Call it.
(new_structure): Replace argument ISUNION with KIND.
Change users to refer to KIND directly.
Update all callers.
(find_structure): Likewise.
(set_gc_used_type): Handle TYPE_USER_STRUCT.
(create_file): Update HDR to include new copyright year.
(struct walk_type_data): Add field IN_PTR_FIELD.
(output_mangled_typename): Handle TYPE_USER_STRUCT.
(walk_type): Set D->IN_PTR_FIELD when walking a TYPE_POINTER.
Clear it afterwards.
Handle TYPE_USER_STRUCT.
(write_types_process_field): Handle TYPE_USER_STRUCT.
(get_type_specifier): Move earlier in the file.
(write_type_decl): New.
(write_marker_function_name): New.
(write_user_func_for_structure_ptr): New.
(write_user_func_for_structure_body): New.
(write_user_marking_functions): New.
(write_func_for_structure): Call write_marker_function_name
and write_type_decl.
Do not call walk_type for TYPE_USER_STRUCT. Emit a call to the user
function directly.
Call write_user_marking_functions on TYPE_USER_STRUCTs.
(write_types_local_user_process_field): New.
(write_pch_user_walking_for_structure_body): New.
(write_pch_user_walking_functions): New.
(write_types_local_process_field): Handle TYPE_USER_STRUCT.
(write_local_func_for_structure): Do not call walk_type for
TYPE_USER_STRUCT. Instead, emit the call to gt_pch_nx directly.
Call write_pch_user_walking_functions for TYPE_USER_STRUCTs.
(write_root): Handle TYPE_USER_STRUCT.
(vec_prefix_type): Remove.  Update all users.
(note_def_vec): Remove.  Update all users.
(dump_typekind): Handle TYPE_USER_STRUCT.
(dump_type): Initialize SEEN_TYPES, if needed.
Handle TYPE_USER_STRUCT.
(dump_everything): Do not initialize SEEN_TYPES.
* gengtype.h: Update copyright year.
(enum typekind): Add TYPE_USER_STRUCT.
(union_or_struct_p): Rename from UNION_OR_STRUCT_P.
Convert into function.
Add an overload taking const_type_p.
Update all callers.
(new_structure): Change second field to type enum typekind.
Update all users.
(find_structure): Likewise.
(note_def_vec): Remove.
(DEFVEC_OP): Remove.
(DEFVEC_I): Remove.
* ggc-page.c (gt_ggc_mx): Add entry points for marking
'const char *&', 'unsigned char *&' and 'unsigned char&'.
* ggc-zone.c (gt_ggc_mx): Add entry points for marking
'const char *&' and 'unsigned char *&'.
* stringpool.c (gt_pch_nx): Add entry points for marking
'const char *&', 'unsigned char *&' and 'unsigned char&'.
Add an entry point for the overload taking arguments 'unsigned char
*', 'gt_pointer_operator' and 'void *'.
* vec.h (struct vec_prefix): Remove GTY marker.
(struct vec_t): Remove GTY((length)) attribute from field 'vec'.
(gt_ggc_mx (vec_t<T> *)): New template function.
(gt_pch_nx (vec_t<T> *)): New template function.
(gt_pch_nx (vec_t<T *> *, gt_pointer_operator, void *)): New template
function.
(gt_pch_nx (vec_t<T> *, gt_pointer_operator, void *)): New template
function.

* basic-block.h (struct edge_def): Mark GTY((user)).
Remove all GTY markers from fields.
(gt_ggc_mx): Declare.
(gt_pch_nx): Declare.
* tree-cfg.c (gt_ggc_mx): New.
(gt_pch_nx): New.

* gengtype-lex.l (USER_GTY): Add pattern for "user".
* gengtype-parse.c (option): Handle USER_GTY.
(opts_have): New.
(type): Call it.
If the keyword 'user' is used, do not walk the fields
of the structure.
* gengtype.h (USER_GTY): Add.
* doc/gty.texi: Update.

2012-08-14   Lawrence Crowl  <crowl@google.com>

Merge cxx-conversion branch.  Implement C++ hash table.

* hash-table.h: New. Implementation borrowed from libiberty/hashtab.c.
* hash-table.c: Likewise.
* tree-ssa-tail-merge.c: Include hash-table.h instead of hashtab.h.
(static htab_t same_succ_htab): Change type to hash_table;
move specification of helper functions from create call to declaration.
Change users to invoke member functions.
(same_succ_print_traverse): Make extern ssa_.... Change callers.
Remove void* casting.
(same_succ_hash): Likewise.
(same_succ_equal): Likewise.
(same_succ_delete): Likewise.
* tree-ssa-threadupdate.c: Include hash-table.h.
(struct local_info): Rename to ssa_local_info_t to avoid overloading
the type name local_info with the variable name local_info.
(static htab_t redirection_data): Change type to hash_table.
Move specification of helper functions from create call to declaration.
Change users to invoke member functions.
(redirection_data_hash): Make extern ssa_.... Change callers.
Remove void* casting.
(redirection_data_eq): Likewise.
(fix_duplicate_block_edges): Likewise.
(create_duplicates): Likewise.
(fixup_template_block): Likewise.
(redirect_edges): Likewise.
(lookup_redirection_data): Change types associated with the hash table
from void* to their actual type. Remove unnecessary casts.
* tree-ssa-ccp.c: Include hash-table.h.
(typedef gimple_htab): New.  Uses hash_table.  Replace specific uses
of htab_t with gimple_htab.  Change users to invoke member functions.
Move specification of helper functions from create call to declaration.
* tree-ssa-coalesce.c: Include hash-table.h instead of hashtab.h.
(hash_ssa_name_by_var): Make extern. Remove void* casting.
(eq_ssa_name_by_var): Likewise.
(coalesce_ssa_name): Change type of local static htab_t ssa_name_hash
to hash_table. Change users to invoke member functions.
Move specification of helper functions from create call to declaration.
* coverage.c: Include hash-table.h instead of hashtab.h.
(static htab_t counts_hash): Change type to hash_table;
move specification of helper functions from create call to declaration.
Change users to invoke member functions.
(htab_counts_entry_hash): Make extern. Rename with coverage_... instead
of htab_... Remove void* casting.
(htab_counts_entry_eq): Likewise.
(htab_counts_entry_del): Likewise.
* tree-ssa-pre.c: Include hash-table.h instead of hashtab.h.
(static htab_t expression_to_id): Change type to hash_table.
Move specification of helper functions from create call to declaration.
Change users to invoke member functions.
(static htab_t phi_translate_table): Likewise.
(pre_expr_eq): Make extern ssa_.... Change callers.
Remove void* casting.
(pre_expr_hash): Likewise.
(expr_pred_trans_hash): Likewise.
(expr_pred_trans_eq): Likewise.
(alloc_expression_id): Change types associated with the hash table
from void* to their actual type. Remove unnecessary casts.
(lookup_expression_id): Likewise.
(phi_trans_lookup): Likewise.
(phi_trans_add): Likewise.
* stringpool.c: Rename uses of libcpp typedef hash_table to
cpp_hash_table.
* Makefile.in: Add hash-table.o to OBJS-libcommon-target.
Add $(HASH_TABLE_H). Add new dependences on $(HASH_TABLE_H).

2012-08-14   Lawrence Crowl  <crowl@google.com>

Merge from cxx-conversion branch.  Re-write double_int in C++.

* hash-table.h
(typedef double_int): Change to struct (POD).
(double_int::make): New overloads for int to double-int conversion.
(double_int::mask): New.
(double_int::max_value): New.
(double_int::min_value): New.
(double_int::operator ++): New.
(double_int::operator --): New.
(double_int::operator *=): New.
(double_int::operator +=): New.
(double_int::operator -=): New.
(double_int::to_signed): New.
(double_int::to_unsigned): New.
(double_int::fits_unsigned): New.
(double_int::fits_signed): New.
(double_int::fits): New.
(double_int::trailing_zeros): New.
(double_int::popcount): New.
(double_int::multiple_of): New.
(double_int::set_bit): New.
(double_int::mul_with_sign): New.
(double_int::operator * (binary)): New.
(double_int::operator + (binary)): New.
(double_int::operator - (binary)): New.
(double_int::operator - (unary)): New.
(double_int::operator ~ (unary)): New.
(double_int::operator & (binary)): New.
(double_int::operator | (binary)): New.
(double_int::operator ^ (binary)): New.
(double_int::and_not): New.
(double_int::lshift): New.
(double_int::rshift): New.
(double_int::alshift): New.
(double_int::arshift): New.
(double_int::llshift): New.
(double_int::lrshift): New.
(double_int::lrotate): New.
(double_int::rrotate): New.
(double_int::div): New.
(double_int::sdiv): New.
(double_int::udiv): New.
(double_int::mod): New.
(double_int::smod): New.
(double_int::umod): New.
(double_int::divmod): New.
(double_int::sdivmod): New.
(double_int::udivmod): New.
(double_int::ext): New.
(double_int::zext): New.
(double_int::sext): New.
(double_int::is_zero): New.
(double_int::is_one): New.
(double_int::is_minus_one): New.
(double_int::is_negative): New.
(double_int::cmp): New.
(double_int::ucmp): New.
(double_int::scmp): New.
(double_int::ult): New.
(double_int::ugt): New.
(double_int::slt): New.
(double_int::sgt): New.
(double_int::max): New.
(double_int::smax): New.
(double_int::umax): New.
(double_int::min): New.
(double_int::smin): New.
(double_int::umin): New.
(double_int::operator ==): New.
(double_int::operator !=): New.
(shwi_to_double_int): Change implementation to use member function.
(double_int_minus_one): Likewise.
(double_int_zero): Likewise.
(double_int_one): Likewise.
(double_int_two): Likewise.
(double_int_ten): Likewise.
(uhwi_to_double_int): Likewise.
(double_int_to_shwi): Likewise.
(double_int_to_uhwi): Likewise.
(double_int_fits_in_uhwi_p): Likewise.
(double_int_fits_in_shwi_p): Likewise.
(double_int_fits_in_hwi_p): Likewise.
(double_int_mul): Likewise.
(double_int_mul_with_sign): Likewise.
(double_int_add): Likewise.
(double_int_sub): Likewise.
(double_int_neg): Likewise.
(double_int_div): Likewise.
(double_int_sdiv): Likewise.
(double_int_udiv): Likewise.
(double_int_mod): Likewise.
(double_int_smod): Likewise.
(double_int_umod): Likewise.
(double_int_divmod): Likewise.
(double_int_sdivmod): Likewise.
(double_int_udivmod): Likewise.
(double_int_multiple_of): Likewise.
(double_int_setbit): Likewise.
(double_int_ctz): Likewise.
(double_int_not): Likewise.
(double_int_ior): Likewise.
(double_int_and): Likewise.
(double_int_and_not): Likewise.
(double_int_xor): Likewise.
(double_int_lshift): Likewise.
(double_int_rshift): Likewise.
(double_int_lrotate): Likewise.
(double_int_rrotate): Likewise.
(double_int_cmp): Likewise.
(double_int_scmp): Likewise.
(double_int_ucmp): Likewise.
(double_int_max): Likewise.
(double_int_smax): Likewise.
(double_int_umax): Likewise.
(double_int_min): Likewise.
(double_int_smin): Likewise.
(double_int_umin): Likewise.
(double_int_ext): Likewise.
(double_int_sext): Likewise.
(double_int_zext): Likewise.
(double_int_mask): Likewise.
(double_int_max_value): Likewise.
(double_int_min_value): Likewise.
(double_int_zero_p): Likewise.
(double_int_one_p): Likewise.
(double_int_minus_one_p): Likewise.
(double_int_equal_p): Likewise.
(double_int_popcount): Likewise.
* hash-table.c
(double_int_mask): Reuse implementation for double_int::mask.
(double_int_max_value): Likewise.
(double_int_min_value): Likewise.
(double_int_ext): Likewise.
(double_int_zext): Likewise.
(double_int_sext): Likewise.
(double_int_mul_with_sign): Likewise.
(double_int_divmod): Likewise.
(double_int_sdivmod): Likewise.
(double_int_udivmod): Likewise.
(double_int_div): Likewise.
(double_int_sdiv): Likewise.
(double_int_udiv): Likewise.
(double_int_mod): Likewise.
(double_int_smod): Likewise.
(double_int_umod): Likewise.
(double_int_multiple_of): Likewise.
(double_int_lshift): Likewise.
(double_int_rshift): Likewise.
(double_int_lrotate): Likewise.
(double_int_rrotate): Likewise.
(double_int_cmp): Likewise.
(double_int_ucmp): Likewise.
(double_int_scmp): Likewise.
(double_int_max): Likewise.
(double_int_smax): Likewise.
(double_int_umax): Likewise.
(double_int_min): Likewise.
(double_int_smin): Likewise.
(double_int_umin): Likewise.
(double_int_min): Likewise.
(double_int_min): Likewise.
(double_int_min): Likewise.
(double_int_min): Likewise.
(double_int_min): Likewise.
(double_int_min): Likewise.
(double_int::alshift): New.
(double_int::arshift): New.
(double_int::llshift): New.
(double_int::lrshift): New.
(double_int::ult): New.
(double_int::ugt): New.
(double_int::slt): New.
(double_int::sgt): New.
(double_int_setbit): Reuse implementation for double_int::set_bit,
which avoids a name conflict with a macro.
(double_int_double_int_ctz): Reuse implementation for
double_int::trailing_zeros.
(double_int_fits_in_shwi_p): Reuse implementation for
double_int::fits_signed.
(double_int_fits_in_hwi_p): Reuse implementation for double_int::fits.
(double_int_mul): Reuse implementation for binary
double_int::operator *.
(double_int_add): Likewise.
(double_int_sub): Likewise.
(double_int_neg): Reuse implementation for unary
double_int::operator -.
(double_int_max_value): Likewise.
* fixed-value.c: Change to use member functions introduced above.

2012-08-14   Lawrence Crowl  <crowl@google.com>

Merge cxx-conversion branch.  Support tree macro calling
from gdb.

* tree.h (tree_check): New.
(TREE_CHECK): Use inline function above instead of __extension__.
(tree_not_check): New.
(TREE_NOT_CHECK): Use inline function above instead of __extension__.
(tree_check2): New.
(TREE_CHECK2): Use inline function above instead of __extension__.
(tree_not_check2): New.
(TREE_NOT_CHECK2): Use inline function above instead of __extension__.
(tree_check3): New.
(TREE_CHECK3): Use inline function above instead of __extension__.
(tree_not_check3): New.
(TREE_NOT_CHECK3): Use inline function above instead of __extension__.
(tree_check4): New.
(TREE_CHECK4): Use inline function above instead of __extension__.
(tree_not_check4): New.
(TREE_NOT_CHECK4): Use inline function above instead of __extension__.
(tree_check5): New.
(TREE_CHECK5): Use inline function above instead of __extension__.
(tree_not_check5): New.
(TREE_NOT_CHECK5): Use inline function above instead of __extension__.
(contains_struct_check): New.
(CONTAINS_STRUCT_CHECK): Use inline function above instead of
__extension__.
(tree_class_check): New.
(TREE_CLASS_CHECK): Use inline function above instead of __extension__.
(tree_range_check): New.
(TREE_RANGE_CHECK): Use inline function above instead of __extension__.
(omp_clause_subcode_check): New.
(OMP_CLAUSE_SUBCODE_CHECK): Use inline function above instead of
__extension__.
(omp_clause_range_check): New.
(OMP_CLAUSE_RANGE_CHECK): Use inline function above instead of
__extension__.
(expr_check): New.
(EXPR_CHECK): Use inline function above instead of __extension__.
(non_type_check): New.
(NON_TYPE_CHECK): Use inline function above instead of __extension__.
(tree_vec_elt_check): New.
(TREE_VEC_ELT_CHECK): Use inline function above instead of
__extension__.
(omp_clause_elt_check): New.
(OMP_CLAUSE_ELT_CHECK): Use inline function above instead of
__extension__.
(tree_operand_check): New.
(TREE_OPERAND_CHECK): Use inline function above instead of
__extension__.
(tree_operand_check_code): New.
(TREE_OPERAND_CHECK_CODE): Use inline function above instead of
__extension__.
(TREE_CHAIN): Simplify implementation.
(TREE_TYPE): Simplify implementation.
(tree_operand_length): Move for compilation dependences.
* gdbinit.in: (macro define __FILE__): New.
(macro define __LINE__): New.
(skip "tree.h"): New.

gcc/cp/ChangeLog
2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.  Re-write VEC in C++.

* call.c (add_function_candidate): Remove const qualifier
from call to VEC_index.

2012-08-14   Diego Novillo  <dnovillo@google.com>

Merge from cxx-conversion branch.  Configury.

* go-c.h: Remove all handlers of ENABLE_BUILD_WITH_CXX.
* go-gcc.cc: Likewise.
* go-system.h: Likewise.

From-SVN: r190402

11 years agoDaily bump.
GCC Administrator [Wed, 15 Aug 2012 00:18:11 +0000 (00:18 +0000)]
Daily bump.

From-SVN: r190401

11 years agoi386.md (enabled): Add comment with explanation why fma4 instructions are disabled...
Uros Bizjak [Tue, 14 Aug 2012 18:22:50 +0000 (20:22 +0200)]
i386.md (enabled): Add comment with explanation why fma4 instructions are disabled for generic code.

* config/i386/i386.md (enabled): Add comment with explanation
why fma4 instructions are disabled for generic code.

From-SVN: r190397

11 years agore PR target/52933 (SH Target: Use div0s for integer sign comparisons)
Oleg Endo [Tue, 14 Aug 2012 17:59:03 +0000 (17:59 +0000)]
re PR target/52933 (SH Target: Use div0s for integer sign comparisons)

PR target/52933
* config/sh/sh.md (cmp_div0s_0, cmp_div0s_1, *cmp_div0s_0,
*cmp_div0s_1, *cbranch_div0s, *movsicc_div0s): New insns.
* config/sh/sh.c (sh_rtx_costs): Handle div0s patterns.

PR target/52933
* gcc.target/sh/pr52933-1.c: New.
* gcc.target/sh/pr52933-2.c: New.

From-SVN: r190396

11 years agore PR target/50751 (SH Target: Displacement addressing does not work for QImode and...
Oleg Endo [Tue, 14 Aug 2012 17:54:28 +0000 (17:54 +0000)]
re PR target/50751 (SH Target: Displacement addressing does not work for QImode and HImode)

PR target/50751
* config/sh/constraints.md (Sra): New constraint.
* config/sh/predicates.md (simple_mem_operand,
displacement_mem_operand, zero_extend_movu_operand): New predicates.
(zero_extend_operand): Check zero_extend_movu_operand for SH2A.
* config/sh/sh.md (*zero_extendqisi2_disp_mem,
*zero_extendhisi2_disp_mem): Add new insns and two new related
peephole2 patterns.

PR target/50751
* gcc.target/sh/pr50751-8.c: New.

From-SVN: r190395

11 years agore PR fortran/47586 ([F03] allocatable components: deep copy missing)
Mikael Morin [Tue, 14 Aug 2012 16:45:55 +0000 (16:45 +0000)]
re PR fortran/47586 ([F03] allocatable components: deep copy missing)

fortran/
PR fortran/47586
* trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
and typebound functions returning a data pointer.

testsuite/
PR fortran/47586
* gfortran.dg/typebound_proc_20.f90: Enable runtime test.
* gfortran.dg/typebound_proc_27.f03: New test.

From-SVN: r190394

11 years agodecl.c (match_ppc_decl): Copy the procedure interface's symbol as procedure interface...
Mikael Morin [Tue, 14 Aug 2012 16:37:11 +0000 (16:37 +0000)]
decl.c (match_ppc_decl): Copy the procedure interface's symbol as procedure interface's result.

fortran/
* decl.c (match_ppc_decl): Copy the procedure interface's symbol
as procedure interface's result.

From-SVN: r190393

11 years agotrans-expr.c (gfc_trans_scalar_assign): Rename argument, extend comment.
Mikael Morin [Tue, 14 Aug 2012 16:35:09 +0000 (16:35 +0000)]
trans-expr.c (gfc_trans_scalar_assign): Rename argument, extend comment.

fortran/
* trans-expr.c (gfc_trans_scalar_assign): Rename argument,
extend comment.

From-SVN: r190392

11 years agogfortran.h (gfc_get_proc_ptr_comp): New prototype.
Mikael Morin [Tue, 14 Aug 2012 16:28:29 +0000 (16:28 +0000)]
gfortran.h (gfc_get_proc_ptr_comp): New prototype.

fortran/
* gfortran.h (gfc_get_proc_ptr_comp): New prototype.
(gfc_is_proc_ptr_comp): Update prototype.
* expr.c (gfc_get_proc_ptr_comp): New function based on the old
gfc_is_proc_ptr_comp.
(gfc_is_proc_ptr_comp): Call gfc_get_proc_ptr_comp.
(gfc_specification_expr, gfc_check_pointer_assign): Use
gfc_get_proc_ptr_comp.
* trans-array.c (gfc_walk_function_expr): Likewise.
* resolve.c (resolve_structure_cons, update_ppc_arglist,
resolve_ppc_call, resolve_expr_ppc): Likewise.
(resolve_function): Update call to gfc_is_proc_ptr_comp.
* dump-parse-tree.c (show_expr): Likewise.
* interface.c (compare_actual_formal): Likewise.
* match.c (gfc_match_pointer_assignment): Likewise.
* primary.c (gfc_match_varspec): Likewise.
* trans-io.c (gfc_trans_transfer): Likewise.
* trans-expr.c (gfc_conv_variable, conv_function_val,
conv_isocbinding_procedure, gfc_conv_procedure_call,
gfc_trans_pointer_assignment): Likewise.
(gfc_conv_procedure_call, gfc_trans_array_func_assign):
Use gfc_get_proc_ptr_comp.

From-SVN: r190391

11 years agographite-scop-detection.c (create_sese_edges): Compute dominance info before trying...
Steven Bosscher [Tue, 14 Aug 2012 16:01:10 +0000 (16:01 +0000)]
graphite-scop-detection.c (create_sese_edges): Compute dominance info before trying to fix loop structure.

* graphite-scop-detection.c (create_sese_edges): Compute dominance
info before trying to fix loop structure.
* cfgloopmanip.c (fix_loop_structure): Require fast DOM queries.
* tree-cfgcleanup.c (repair_loop_structures): Likewise.
* cfgloop.c (verify_loop_structure): Verify loop fathers.

From-SVN: r190390

11 years agodominance.c (init_dom_info): Use gcc_checking_assert, not gcc_assert.
Steven Bosscher [Tue, 14 Aug 2012 15:59:41 +0000 (15:59 +0000)]
dominance.c (init_dom_info): Use gcc_checking_assert, not gcc_assert.

* dominance.c (init_dom_info): Use gcc_checking_assert, not gcc_assert.
(dom_convert_dir_to_idx, compute_dom_fast_query,
get_immediate_dominator, set_immediate_dominator, get_dominated_by,
redirect_immediate_dominators, nearest_common_dominator,
(dominated_by_p, bb_dom_dfs_in, bb_dom_dfs_out, recompute_dominator,
iterate_fix_dominators, add_to_dominance_info,
delete_from_dominance_info): Likewise.

From-SVN: r190389

11 years agopubnames-2.C: Adjust.
Sterling Augustine [Tue, 14 Aug 2012 15:11:02 +0000 (15:11 +0000)]
pubnames-2.C: Adjust.

2012-08-13  Sterling Augustine  <saugustine@google.com>

* g++.dg/debug/dwarf2/pubnames-2.C: Adjust.

From-SVN: r190388

11 years agocfgexpand.c (expand_used_vars): Use virtual_operand_p.
Richard Guenther [Tue, 14 Aug 2012 14:16:18 +0000 (14:16 +0000)]
cfgexpand.c (expand_used_vars): Use virtual_operand_p.

2012-08-14  Richard Guenther  <rguenther@suse.de>

* cfgexpand.c (expand_used_vars): Use virtual_operand_p.
* gimple-pretty-print.c (dump_phi_nodes): Likewise.
* gimple-streamer-out.c (output_bb): Likewise.
* graphite-sese-to-poly.c (scalar_close_phi_node_p): Likewise.
(rewrite_reductions_out_of_ssa): Likewise.
(rewrite_commutative_reductions_out_of_ss): Likewise.
* ipa-split.c (verify_non_ssa_vars): Likewise.
(consider_split): Likewise.
(visit_bb): Likewise.
(split_function): Likewise.
* lto-streamer-out.c (output_ssa_names): Likewise.
* sese.c (rename_uses): Likewise.
* tree-cfg.c (replace_uses_by): Likewise.
(gimple_merge_blocks): Likewise.
(gimple_cfg2dot): Likewise.
(verify_gimple_phi): Likewise.
(replace_ssa_name): Likewise.
(move_block_to_fn): Likewise.
* tree-eh.c (cleanup_empty_eh_merge_phis): Likewise.
* tree-if-conv.c (if_convertible_phi_p): Likewise.
(predicate_scalar_phi): Likewise.
* tree-inline.c (update_ssa_across_abnormal_edges): Likewise.
(copy_phis_for_bb): Likewise.
* tree-loop-distribution.c (generate_loops_for_partition): Likewise.
(destroy_loop): Likewise.
* tree-outof-ssa.c (eliminate_useless_phis): Likewise.
(insert_backedge_copies): Likewise.
* tree-parloops.c (transform_to_exit_first_loop): Likewise.
(gather_scalar_reductions): Likewise.
(try_create_reduction_list): Likewise.
* tree-scalar-evolution.c (analyze_scalar_evolution_for_all_loop_ph):
Likewise.
(scev_const_prop): Likewise.
* tree-ssa-ccp.c (debug_lattice_value): Likewise.
(get_default_value): Likewise.
(ccp_initialize): Likewise.
* tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
* tree-ssa-copy.c (may_propagate_copy): Likewise.
(init_copy_prop): Likewise.
* tree-ssa-dce.c (propagate_necessity): Likewise.
(remove_dead_phis): Likewise.
(forward_edge_to_pdom): Likewise.
(eliminate_unnecessary_stmts): Likewise.
* tree-ssa-live.c (partition_view_init): Likewise.
(remove_unused_locals): Likewise.
(register_ssa_partition_check): Likewise.
* tree-ssa-loop-im.c (movement_possibility): Likewise.
(move_computations_stmt): Likewise.
* tree-ssa-loop-ivopts.c (determine_biv_step): Likewise.
(record_invariant): Likewise.
(find_interesting_uses_outside): Likewise.
(determine_set_costs): Likewise.
* tree-ssa-loop-manip.c (add_exit_phis_var): Likewise.
(find_uses_to_rename_use): Likewise.
(check_loop_closed_ssa_use): Likewise.
(rewrite_phi_with_iv): Likewise.
(canonicalize_loop_ivs): Likewise.
* tree-ssa-math-opts.c (execute_cse_reciprocals): Likewise.
* tree-ssa-phiopt.c (hoist_adjacent_loads): Likewise.
* tree-ssa-pre.c (make_values_for_phi): Likewise.
(compute_avail): Likewise.
(eliminate): Likewise.
* tree-ssa-propagate.c (substitute_and_fold): Likewise.
* tree-ssa-reassoc.c (phi_rank): Likewise.
* tree-ssa-strlen.c (strlen_enter_block): Likewise.
* tree-ssa-structalias.c (compute_points_to_sets): Likewise.
(ipa_pta_execute): Likewise.
* tree-ssa-tail-merge.c (same_succ_hash): Likewise.
(release_last_vdef): Likewise.
(same_phi_alternatives_1): Likewise.
(bb_has_non_vop_phi): Likewise.
(vop_phi): Likewise.
* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
Likewise.
* tree-ssa-uninit.c (warn_uninitialized_phi): Likewise.
(execute_late_warn_uninitialized): Likewise.
* tree-ssa.c (verify_ssa_name): Likewise.
(verify_phi_args): Likewise.
(verify_ssa): Likewise.
* tree-stdarg.c (execute_optimize_stdarg): Likewise.
* tree-vect-loop-manip.c (slpeel_update_phi_nodes_for_guard1): Likewise.
(slpeel_tree_peel_loop_to_edge): Likewise.
(vect_can_advance_ivs_p): Likewise.
(vect_update_ivs_after_vectorizer): Likewise.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
* tree-vrp.c (remove_range_assertions): Likewise.
* value-prof.c (gimple_divmod_values_to_profile): Likewise.

From-SVN: r190385

11 years agore PR middle-end/54146 (Very slow compile with attribute((flatten)))
Richard Guenther [Tue, 14 Aug 2012 12:38:32 +0000 (12:38 +0000)]
re PR middle-end/54146 (Very slow compile with attribute((flatten)))

2012-08-14  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/54146
* tree-ssa-pre.c (do_regular_insertion): Use a VEC
indexed by pred edge index for avail.
(do_partial_partial_insertion): Likewise.
(insert_into_preds_of_block): Adjust.

From-SVN: r190382

11 years agogimplify.c (create_tmp_from_val): Mark temporary with DECL_GIMPLE_REG_P here ...
Richard Guenther [Tue, 14 Aug 2012 11:22:23 +0000 (11:22 +0000)]
gimplify.c (create_tmp_from_val): Mark temporary with DECL_GIMPLE_REG_P here ...

2012-08-14  Richard Guenther  <rguenther@suse.de>

* gimplify.c (create_tmp_from_val): Mark temporary with
DECL_GIMPLE_REG_P here ...
(internal_get_tmp_var): ... instead of here.  If we go into
SSA create an SSA name instead of a VAR_DECL.
(gimplify_modify_expr): Do not create SSA names here, assert
we already got them.
(force_gimple_operand_1): Create an SSA name if we go into SSA.
* sese.c (rename_uses): Simplify.

From-SVN: r190381

11 years agotree-into-ssa.c: Include diagnostic-core.h.
Richard Guenther [Tue, 14 Aug 2012 11:14:08 +0000 (11:14 +0000)]
tree-into-ssa.c: Include diagnostic-core.h.

2012-08-14  Richard Guenther  <rguenther@suse.de>

* tree-into-ssa.c: Include diagnostic-core.h.
* Makefile.in (tree-into-ssa.o): Adjust.

From-SVN: r190380

11 years agore PR fortran/40881 ([F03] warn for obsolescent features)
Tobias Burnus [Tue, 14 Aug 2012 10:26:11 +0000 (12:26 +0200)]
re PR fortran/40881 ([F03] warn for obsolescent features)

2012-08-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40881
        * error.c (gfc_notify_std): Reset cur_error_buffer->flag flag
        when the error/warning has been printed.
        * gfortran.h (gfc_sl_type): Add ST_LABEL_DO_TARGET.
        * match.c (gfc_match_do): Use ST_LABEL_DO_TARGET.
        * parse.c (check_statement_label): Use ST_LABEL_DO_TARGET.
        (parse_executable): Add obsolescence check for DATA.
        * resolve.c (resolve_branch): Handle ST_LABEL_DO_TARGET.
        * symbol.c (gfc_define_st_label, gfc_reference_st_label):
        Add obsolescence diagnostics.
        * trans-stmt.c (gfc_trans_label_assign): Handle
        * ST_LABEL_DO_TARGET.

2012-08-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/40881
        * gfortran.dg/data_constraints_3.f90: New.
        * gfortran.dg/data_constraints_1.f90: Add dg-options ""
        to disable -pedantic compilation.
        * gfortran.dg/pr37243.f: Ditto.
        * gfortran.dg/g77/19990826-3.f: Ditto.
        * gfortran.dg/g77/20020307-1.f : Ditto.
        * gfortran.dg/g77/980310-3.f: Ditto.

From-SVN: r190379

11 years agore PR fortran/54234 (-Wconversion or -Wconversion-extra should warn for CMPLX(dp...
Tobias Burnus [Tue, 14 Aug 2012 10:22:06 +0000 (12:22 +0200)]
re PR fortran/54234 (-Wconversion or -Wconversion-extra should warn for CMPLX(dp,dp))

2012-08-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54234
        * check.c (gfc_check_cmplx): Add -Wconversion warning
        when converting higher-precision REAL to default-precision
        CMPLX without kind= parameter.

2012-08-14  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54234
        * gfortran.dg/warn_conversion_4.f90: New.

From-SVN: r190378

11 years agotree-into-ssa.c (update_ssa): Verify we do not rename symbols that are already partly...
Richard Guenther [Tue, 14 Aug 2012 09:32:06 +0000 (09:32 +0000)]
tree-into-ssa.c (update_ssa): Verify we do not rename symbols that are already partly in SSA form.

2012-08-14  Richard Guenther  <rguenther@suse.de>

* tree-into-ssa.c (update_ssa): Verify we do not rename
symbols that are already partly in SSA form.

From-SVN: r190377

11 years agore PR middle-end/53411 (ICE in move_unallocated_pseudos)
Jakub Jelinek [Tue, 14 Aug 2012 07:43:09 +0000 (09:43 +0200)]
re PR middle-end/53411 (ICE in move_unallocated_pseudos)

PR middle-end/53411
PR rtl-optimization/53495
* ira.c (ira): Move delete_trivially_dead_insns call before
find_moveable_pseudos call.

* gcc.c-torture/compile/pr53411.c: New test.
* gcc.c-torture/compile/pr53495.c: New test.

From-SVN: r190376

11 years agoDaily bump.
GCC Administrator [Tue, 14 Aug 2012 00:17:42 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r190372

11 years agoFix patch merge error in previous commit.
Steven Bosscher [Mon, 13 Aug 2012 21:08:57 +0000 (21:08 +0000)]
Fix patch merge error in previous commit.

From-SVN: r190360

11 years agotree-ssa-pre.c (do_regular_insertion): Add FIXME markers at points of potentially...
Steven Bosscher [Mon, 13 Aug 2012 21:02:19 +0000 (21:02 +0000)]
tree-ssa-pre.c (do_regular_insertion): Add FIXME markers at points of potentially huge memset overhead.

* tree-ssa-pre.c (do_regular_insertion): Add FIXME markers at points
of potentially huge memset overhead.
(do_partial_partial_insertion): Likewise.
* cfgexpand.c (gimple_expand_cfg): Use XCNEWVEC instead of xcalloc.
* tree-vrp.c (find_assert_locations): Use XNEWVEC instead of XCNEWVEC
for arrays to be filled by pre_and_rev_post_order_compute.  Allocate
the right number of slots, not that number plus NUM_FIXED_BLOCKS.
* tree-ssa-reassoc.c (init_reassoc): Likewise.
* cfganal.c (dfs_enumerate_from): Use XNEWVEC instead of XCNEWVEC for
array used as stack.
* tree-ssa-sccvn.c (init_scc_vn): Use XNEWVEC instead of XCNEWVEC for
arrays to be filled by pre_and_rev_post_order_compute.
* cfgloopmanip.c (find_path): Use XNEWVEC instead of XCNEWVEC for
array to be filled by dfs_enumerate_from.
(remove_path): Likewise.
(duplicate_loop_to_header_edge): Use XNEWVEC instead of XCNEWVEC for
array of loops that is filled on the next lines.
* cfgloop.c (get_loop_body): Use XNEWVEC instead of XCNEWVEC for
array of basic blocks to be returned.
(get_loop_body_in_dom_order): Likewise.
(get_loop_body_in_bfs_order): Likewise.
* tree-ssa-loop-manip.c (loop_renamer_obstack): New static obstack
for all bitmaps used for rewriting into loop-closed SSA form.
(add_exit_phis_var): Allocate the def bitmap on it.  Clear the livein
bitmap at the end to release a lot of memory.
(add_exit_phis): Allocate the exits bitmap on the new obstack.
(get_loops_exits): Allocate the exits bitmap on the new obstack.
(find_uses_to_rename_use): Allocate a use_blocks bitmap if ver is
seen for the first time.
(find_uses_to_rename): Add "???" for why the whole function must
be re-scanned if changed_bbs is empty.
(rewrite_into_loop_closed_ssa): Allocate bitmaps on the new obstack.
Use XNEWVEC to allocate the use_blocks array.  Initialize the new
obstack, and free it at the end.  Remove loop over all SSA names.
(check_loop_closed_ssa_stmt): Look only at SSA_OP_USE operands.
* tree-cfg.c (move_sese_region_to_fn): Use XNEWVEC instead of
xcalloc to allocate edge_pred and edge_flag arrays.

From-SVN: r190359

11 years agore PR libstdc++/54185 (condition_variable not properly destructed)
David Adler [Mon, 13 Aug 2012 19:56:50 +0000 (19:56 +0000)]
re PR libstdc++/54185 (condition_variable not properly destructed)

2012-08-13  David Adler  <d.adler.s@gmail.com>

PR libstdc++/54185
* src/c++11/condition_variable.cc (condition_variable): Always
destroy native type in destructor.
* testsuite/30_threads/condition_variable/54185.cc: New.

From-SVN: r190356

11 years ago2012-08-10 François Dumont <fdumont@gcc.gnu.org>
François Dumont [Mon, 13 Aug 2012 19:43:19 +0000 (19:43 +0000)]
2012-08-10  François Dumont  <fdumont@gcc.gnu.org>
    Ollie Wild  <aaw@google.com>

* include/bits/hashtable.h
(_Hashtable<>_M_insert_multi_node(hash_code, node_type*)): New.
(_Hashtable<>_M_insert(_Args&&, false_type)): Use latter.
(_Hashtable<>::_M_emplace(false_type, _Args&&...)): Likewise.
(_Hashtable<>::_M_insert_bucket): Replace by ...
(_Hashtable<>::_M_insert_unique_node(size_type, hash_code, node_type*)):
... this, new.
(_Hashtable<>::_M_insert(_Args&&, true_type)): Use latter.
(_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
* include/bits/hashtable_policy.h (_Map_base<>::operator[]): Use
latter, emplace the value_type rather than insert.
* include/std/unordered_map: Include tuple.
* include/std/unordered_set: Likewise.
* testsuite/util/testsuite_counter_type.h: New.
* testsuite/23_containers/unordered_map/operators/2.cc: New.

Co-Authored-By: Ollie Wild <aaw@google.com>
From-SVN: r190355

11 years agovalidate_failures.py (ExpirationDate): Tidy comment.
Diego Novillo [Mon, 13 Aug 2012 19:36:03 +0000 (15:36 -0400)]
validate_failures.py (ExpirationDate): Tidy comment.

* testsuite-management/validate_failures.py (ExpirationDate): Tidy
comment.

From-SVN: r190354

11 years agovalidate_failures.py (ParseSummary): Fix comment.
Diego Novillo [Mon, 13 Aug 2012 18:18:52 +0000 (14:18 -0400)]
validate_failures.py (ParseSummary): Fix comment.

* testsuite-management/validate_failures.py (ParseSummary): Fix
comment.

From-SVN: r190352

11 years agoImplement support for expiring expected results in validate_failures.py.
Diego Novillo [Mon, 13 Aug 2012 18:00:55 +0000 (14:00 -0400)]
Implement support for expiring expected results in validate_failures.py.

I noticed recently that while the validator was accepting the
'expire=YYYYMMDD' attribute, it was not actually doing anything with
it.

This patch fixes the oversight.

2012-08-13  Diego Novillo  <dnovillo@google.com>

* testsuite-management/validate_failures.py: Import datetime.
(TestResult.ExpirationDate): New.
(TestResult.HasExpired): New.
(ParseSummary): Call it.  If it returns True, warn that the
expected failure has expired and do not add it to the set of
expected results.
(GetResults): Clarify documentation.

From-SVN: r190351

11 years agoi386.h (FIXED_REGISTERS): Do not mark REX registers here.
Uros Bizjak [Mon, 13 Aug 2012 16:57:16 +0000 (18:57 +0200)]
i386.h (FIXED_REGISTERS): Do not mark REX registers here.

* config/i386/i386.h (FIXED_REGISTERS): Do not mark REX registers here.
(CALL_USED_REGISTERS): Use bitmaps to mark call-used registers
for different ABIs.
(enum reg_class): Move CLOBBERED_REGS just before GENERAL_REGS.
(REG_CLASS_NAMES): Update.
(REG_CLASS_CONTENTS): Update.  Clear CLOBBERED_REGS members.
* config/i386/i386.c (ix86_conditional_register_usage): Disable
REX registers on 32bit targets.  Handle bitmaps from
CALL_USED_REGISTERS initializer.  Calculate CLOBBERED_REGS register
set from GENERAL_REGS also for 32bit targets.  Do not change call
used register set for TARGET_64BIT_MS_ABI separately.

From-SVN: r190349

11 years agobasic-block.h (struct basic_block): Remove loop_depth member, move flags and index...
Richard Guenther [Mon, 13 Aug 2012 13:49:54 +0000 (13:49 +0000)]
basic-block.h (struct basic_block): Remove loop_depth member, move flags and index members next to each other.

2012-08-13  Richard Guenther  <rguenther@suse.de>

* basic-block.h (struct basic_block): Remove loop_depth
member, move flags and index members next to each other.
* cfgloop.h (bb_loop_depth): New inline function.
* cfghooks.c (split_block): Do not set loop_depth.
(duplicate_block): Likewise.
* cfgloop.c (flow_loop_nodes_find): Likewise.
(flow_loops_find): Likewise.
(add_bb_to_loop): Likewise.
(remove_bb_from_loops): Likewise.
* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
* gimple-streamer-in.c (input_bb): Do not stream loop_depth.
* gimple-streamer-out.c (output_bb): Likewise.
* bt-load.c: Include cfgloop.h.
(migrate_btr_defs): Use bb_loop_depth.
* cfg.c (dump_bb_info): Likewise.
* final.c (compute_alignments): Likewise.
* ira.c (update_equiv_regs): Likewise.
* tree-ssa-copy.c (init_copy_prop): Likewise.
* tree-ssa-dom.c (loop_depth_of_name): Likewise.
* tree-ssa-forwprop.c: Include cfgloop.h.
(forward_propagate_addr_expr): Use bb_loop_depth.
* tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
* tree-ssa-sink.c (select_best_block): Likewise.
* ipa-inline-analysis.c: Include cfgloop.h.
(estimate_function_body_sizes): Use bb_loop_depth.
* Makefile.in (tree-ssa-forwprop.o): Depend on $(CFGLOOP_H).
(ipa-inline-analysis.o): Likewise.
(bt-load.o): Likewise.

* gcc.dg/tree-prof/update-loopch.c: Adjust.

From-SVN: r190346

11 years agore PR driver/54210 (gcc unable to detect -mprfchw flag in bulldozer machines)
Ganesh Gopalasubramanian [Mon, 13 Aug 2012 13:21:41 +0000 (13:21 +0000)]
re PR driver/54210 (gcc unable to detect -mprfchw flag in bulldozer machines)

PR driver/54210
* config/i386/driver-i386.c (host_detect_local_cpu): Test bit_PRFCHW
bit of CPUID 0x80000001 %ecx instead of CPUID 7 %ecx.
* config/i386/cpuid.h (bits_PRFCHW): Move definition to CPUID
0x80000001 %ecx flags.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r190345

11 years agotree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with...
Richard Guenther [Mon, 13 Aug 2012 13:10:59 +0000 (13:10 +0000)]
tree-cfg.c (print_loop): Avoid ICEing for loops marked for removal and loops with multiple latches.

2012-08-13  Richard Guenther  <rguenther@suse.de>

* tree-cfg.c (print_loop): Avoid ICEing for loops marked for
removal and loops with multiple latches.

From-SVN: r190344

11 years agore PR c/53968 (integer undefined behaviors in GCC)
Jakub Jelinek [Mon, 13 Aug 2012 12:39:54 +0000 (14:39 +0200)]
re PR c/53968 (integer undefined behaviors in GCC)

PR c/53968
* tree.c (integer_pow2p): Avoid undefined signed overflows.
* simplify-rtx.c (neg_const_int): Likewise.
* expr.c (fixup_args_size_notes): Likewise.
* stor-layout.c (set_min_and_max_values_for_integral_type): Likewise.
* double-int.c (mul_double_wide_with_sign): Likewise.
(double_int_mask): Likewise.
* tree-ssa-loop-ivopts.c (get_address_cost): Likewise.

From-SVN: r190342

11 years agore PR libstdc++/54112 (including complex.h and complex fails in C++03)
Marc Glisse [Mon, 13 Aug 2012 11:55:00 +0000 (13:55 +0200)]
re PR libstdc++/54112 (including complex.h and complex fails in C++03)

2012-08-13  Marc Glisse  <marc.glisse@inria.fr>

PR libstdc++/54112
* include/c_compatibility/complex.h: Undefine complex, always
include system's complex.h if present.
* testsuite/26_numerics/complex/c99.cc: New testcase.
* testsuite/17_intro/headers/c++1998/complex.cc: Likewise.
* doc/xml/manual/numerics.xml: Document it.

From-SVN: r190340

11 years agore PR tree-optimization/54200 (copyrename generates wrong debuginfo)
Richard Guenther [Mon, 13 Aug 2012 09:29:28 +0000 (09:29 +0000)]
re PR tree-optimization/54200 (copyrename generates wrong debuginfo)

2012-08-13  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/54200
* tree-ssa-copyrename.c (rename_ssa_copies): Do not add
PHI results to another partition if not all PHI arguments
have the same partition.

* gcc.dg/guality/pr54200.c: New testcase.
* gcc.dg/tree-ssa/slsr-8.c: Adjust.

From-SVN: r190339

11 years agotree-pass.h (write_summary, [...]): Remove set and vset arguments.
Jan Hubicka [Mon, 13 Aug 2012 02:37:51 +0000 (04:37 +0200)]
tree-pass.h (write_summary, [...]): Remove set and vset arguments.

* tree-pass.h (write_summary, write_optimization_summary): Remove
set and vset arguments.
* ipa-cp.c (ipcp_write_summary): Remove set and vset arugments.
(write_node_summary_p): Likewise; use the encoder.
(ipa_reference_write_optimization_summary): Likewise.
* lto-cgraph.c (output_cgraph_opt_summary): Use encoder.
(lto_symtab_encoder_new): Initialize in_partition field.
(lto_symtab_encoder_delete): Destroy in_partition field.
(LCC_NOT_FOUND): Move to lto-streamer.h
(lto_symtab_encoder_deref): Likewise.
(lto_symtab_encoder_in_partition_p,
lto_set_symtab_encoder_in_partition): New functions.
(referenced_from_other_partition_p): Rewrite to use encoder.
(reachable_from_other_partition_p): Likewise.
(referenced_from_this_partition_p): Likewise.
(reachable_from_this_partition_p): Likewise.
(lto_output_node): Likewise.
(lto_output_varpool_node): Likewise.
(output_refs): Likewise.
(compute_ltrans_boundary): Initialize in_partition fileds of
the encoder.
(output_symtab): Likewise.
(input_refs): Match the changes in output_refs.
(output_cgraph_opt_summary_p): Remove set argument.
(output_node_opt_summary): Replace set by encoder.
(output_cgraph_opt_summary): Remove set argument; use
the encoder.
* ipa-pure-const.c (pure_const_write_summary): Remove set and vset
arguments; use the encoder.
* lto-streamer-out.c (lto_output): Remove set and vset argument; use
the encoder.
(produce_symtab): Likewise.
* ipa-inline.h (inline_write_summary): Remove set and vset arguments.
* ipa-inline-analysis.c (inline_write_summary): Likewise.
* ipa-prop.c (ipa_prop_write_jump_functions): Remove set argument;
use encoder.
* ipa-prop.h (ipa_prop_write_jump_functions): Likewise.
* passes.c (ipa_write_summaries_2): Remove set and vset arguments.
(ipa_write_summaries_1): Update.
(ipa_write_optimization_summaries_1): Likewise.
(ipa_write_optimization_summaries): Likewise.
* lto-streamer.h (lto_symtab_encoder_t): Add in_partition.
(lto_symtab_encoder_iterator): New type.
(lto_symtab_encoder_deref): Make inline.
(output_symtab, referenced_from_other_partition_p,
reachable_from_other_partition_p, referenced_from_this_partition_p,
reachable_from_this_partition_p): Update.
(lsei_end_p, lsei_next, lsei_node, lsei_cgraph_node, lsei_varpool_node): New
inline functions.
(LCC_NOT_FOUND): New macro.
(lto_symtab_encoder_deref, lsei_start, lsei_next_in_partition,
lsei_start_in_partition, lsei_next_function_in_partition,
lsei_start_function_in_partition, lsei_next_variable_in_partition,
lsei_start_variable_in_partition): New inline functions.

* lto-partition.c (set_referenced_from_other_partition_p,
set_reachable_from_other_partition_p, set_referenced_from_this_partition_p):
New functions.
(lto_promote_cross_file_statics): Use them.

From-SVN: r190336

11 years agoDaily bump.
GCC Administrator [Mon, 13 Aug 2012 00:17:27 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r190335

11 years agosh.md (prefetch): Simplify expander.
Oleg Endo [Sun, 12 Aug 2012 22:50:51 +0000 (22:50 +0000)]
sh.md (prefetch): Simplify expander.

* config/sh/sh.md (prefetch): Simplify expander.  Fix condition to
allow SH3.
(*prefetch_media): Move insn below expander.
(*prefetch): Fix condition to allow SH3.

* gcc.target/sh/prefetch.c: Add -m3* to inclusion list.

From-SVN: r190332

11 years agore PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
Oleg Endo [Sun, 12 Aug 2012 22:47:15 +0000 (22:47 +0000)]
re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)

PR target/51244
* config/sh/sh.md: Add splits for inverted compare and branch
opportunities.
(*cmpeqsi_t): New insn.
(cmpgtsi_t, cmpgesi_t): Swap r and N alternatives.
(cmpgeusi_t): Use satisfies_constraint_Z.  Emit sett insn in
replacement insn list and not in the preparation statements.
(clrt, sett): Add mt_group attribute.

PR target/51244
* gcc.target/sh/pr51244-7.c: New.
* gcc.target/sh/pr51244-8.c: New.
* gcc.target/sh/pr51244-9.c: New.
* gcc.target/sh/pr51244-10.c: New.

From-SVN: r190331

11 years agore PR libstdc++/52681 ([C++11] Using std::thread without -pthread crashes without...
Jonathan Wakely [Sun, 12 Aug 2012 18:57:53 +0000 (18:57 +0000)]
re PR libstdc++/52681 ([C++11] Using std::thread without -pthread crashes without warning)

PR libstdc++/52681
* src/c++11/thread.cc (thread::_M_start_thread): Improve error text
when threads are not enabled.

From-SVN: r190330

11 years agore PR middle-end/54193 (dump_gimple_assign raw can't handle 4 operands)
Marc Glisse [Sun, 12 Aug 2012 16:20:41 +0000 (18:20 +0200)]
re PR middle-end/54193 (dump_gimple_assign raw can't handle 4 operands)

2012-08-12 Marc Glisse <marc.glisse@inria.fr>

PR middle-end/54193
* gimple-pretty-print.c (dump_ternary_rhs): Handle 4 arguments.

From-SVN: r190328

11 years agopr50749-sf-postinc-1.c: Skip for -m3.
Oleg Endo [Sun, 12 Aug 2012 14:22:07 +0000 (14:22 +0000)]
pr50749-sf-postinc-1.c: Skip for -m3.

* gcc.target/sh/pr50749-sf-postinc-1.c: Skip for -m3.  Don't skip for
-m2e or -m2a.
* gcc.target/sh/pr50749-sf-postinc-3.c: Likewise.
* gcc.target/sh/pr53511-1.c: Likewise.
* gcc.target/sh/pr50749-sf-predec-1.c: Likewise.
* gcc.target/sh/pr50749-sf-predec-3.c: Likewise.
* gcc.target/sh/pr53512-1.c: Skip for -m3*.
* gcc.target/sh/pr53512-3.c: Likewise.
* gcc.target/sh/pr21255-3.c: Skip for single precision FPU targets.

From-SVN: r190327

11 years agore PR target/39423 ([SH] performance regression: lost mov @(disp,Rn))
Oleg Endo [Sun, 12 Aug 2012 13:23:20 +0000 (13:23 +0000)]
re PR target/39423 ([SH]  performance regression: lost mov @(disp,Rn))

PR target/39423
* config/sh/predicates.md (mem_index_disp_operand): Check for
arith_reg_operand instead of REG_P.

PR target/39423
* gcc.c-torture/compile/pr39423-1.c: New.
* gcc.c-torture/compile/pr39423-2.c: New.

From-SVN: r190326

11 years agore PR fortran/54221 (Explicit private access specifier signals "unexpected defined...
Tobias Burnus [Sun, 12 Aug 2012 09:52:33 +0000 (11:52 +0200)]
re PR fortran/54221 (Explicit private access specifier signals "unexpected defined but not used [-Wunused-function]" warning)

2012-08-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54221
        * trans-decl.c (gfc_finish_var_decl, build_function_decl):
        Fix setting private module vars/procs as TREE_PUBLIC(...) = 0.

2012-08-12  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54221
        * vect/vect-gems.f90: Don't mark module vars as PRIVATE as
        they appear uninitialized on the RHS.
        * gfortran.dg/public_private_module_6.f90: New.

From-SVN: r190325

11 years agoDaily bump.
GCC Administrator [Sun, 12 Aug 2012 00:17:33 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r190324

11 years agoreload1.c (replaced_subreg, gen_reload): Add SECONDARY_MEMORY_NEEDED ifdefs as necessary.
Bernd Schmidt [Sat, 11 Aug 2012 16:53:09 +0000 (16:53 +0000)]
reload1.c (replaced_subreg, gen_reload): Add SECONDARY_MEMORY_NEEDED ifdefs as necessary.

* reload1.c (replaced_subreg, gen_reload): Add
SECONDARY_MEMORY_NEEDED ifdefs as necessary.

From-SVN: r190318

11 years agolto-section-in.c (lto_section_name): Do not use "symtab" as part of symtab_node secto...
Jan Hubicka [Sat, 11 Aug 2012 15:49:48 +0000 (17:49 +0200)]
lto-section-in.c (lto_section_name): Do not use "symtab" as part of symtab_node sectoin name; it confuses plugin.

* lto-section-in.c (lto_section_name): Do not use "symtab" as part of
symtab_node sectoin name; it confuses plugin.

From-SVN: r190317

11 years agoalpha.c (alpha_stdarg_optimize_hook): Shift DECL_UID in the va_list_vars bitmap by...
Uros Bizjak [Sat, 11 Aug 2012 14:45:15 +0000 (16:45 +0200)]
alpha.c (alpha_stdarg_optimize_hook): Shift DECL_UID in the va_list_vars bitmap by num_ssa_names.

* config/alpha/alpha.c (alpha_stdarg_optimize_hook): Shift DECL_UID
in the va_list_vars bitmap by num_ssa_names.

From-SVN: r190316

11 years agosse.md (xop integer multiply/add insns): Use register_operand for operand 3 predicate.
Uros Bizjak [Sat, 11 Aug 2012 11:37:02 +0000 (13:37 +0200)]
sse.md (xop integer multiply/add insns): Use register_operand for operand 3 predicate.

* config/i386/sse.md (xop integer multiply/add insns): Use
register_operand for operand 3 predicate.
(xop_phadd<u>bq):  Fix vec_select selectors.

From-SVN: r190314

11 years agore PR fortran/48636 (Enable more inlining with -O2 and higher)
Martin Jambor [Sat, 11 Aug 2012 10:50:24 +0000 (12:50 +0200)]
re PR fortran/48636 (Enable more inlining with -O2 and higher)

2012-08-11  Martin Jambor  <mjambor@suse.cz>

PR fortran/48636
* ipa-inline.h (condition): New fields offset, agg_contents and by_ref.
* ipa-inline-analysis.c (agg_position_info): New type.
(add_condition): New parameter aggpos, also store agg_contents, by_ref
and offset.
(dump_condition): Also dump aggregate conditions.
(evaluate_conditions_for_known_args): Also handle aggregate
conditions.  New parameter known_aggs.
(evaluate_properties_for_edge): Gather known aggregate contents.
(inline_node_duplication_hook): Pass NULL known_aggs to
evaluate_conditions_for_known_args.
(unmodified_parm): Split into unmodified_parm and unmodified_parm_1.
(unmodified_parm_or_parm_agg_item): New function.
(set_cond_stmt_execution_predicate): Handle values passed in
aggregates.
(set_switch_stmt_execution_predicate): Likewise.
(will_be_nonconstant_predicate): Likewise.
(estimate_edge_devirt_benefit): Pass new parameter known_aggs to
ipa_get_indirect_edge_target.
(estimate_calls_size_and_time): New parameter known_aggs, pass it
recrsively to itself and to estimate_edge_devirt_benefit.
(estimate_node_size_and_time): New vector known_aggs, pass it o
functions which need it.
(remap_predicate): New parameter offset_map, use it to remap aggregate
conditions.
(remap_edge_summaries): New parameter offset_map, pass it recursively
to itself and to remap_predicate.
(inline_merge_summary): Also create and populate vector offset_map.
(do_estimate_edge_time): New vector of known aggregate contents,
passed to functions which need it.
(inline_read_section): Stream new fields of condition.
(inline_write_summary): Likewise.
* ipa-cp.c (ipa_get_indirect_edge_target): Also examine the aggregate
contents.  Let all local callers pass NULL for known_aggs.

* testsuite/gfortran.dg/pr48636.f90: New test.

From-SVN: r190313

11 years agolto-cgraph.c (output_cgraph): Rename to ...
Jan Hubicka [Sat, 11 Aug 2012 08:38:59 +0000 (10:38 +0200)]
lto-cgraph.c (output_cgraph): Rename to ...

* lto-cgraph.c (output_cgraph): Rename to ...
(output_symtab): ... this one. Update for LTO_section_symtab_nodes.
(input_cgraph): Rename to ...
(input_symtab): ... this one. Update for LTO_section_symtab_nodes.
* lto-streamer-out.c (create_output_block): Do not set
section_type.
(produce_asm): Likewise.
(lto_output_toplevel_asms): Likewise.
(produce_asm_for_decls): Likewise.
(lto_output): Use output_symtab.
* lto-section-in.c (lto_section_name): Update.
* lto-section-out.c (lto_destroy_simple_output_block): Remove section_type.
* lto-streamer.h (enum lto_section_type): Remove LTO_section_varpool;
rename LTO_section_cgraph to LTO_section_symtab_nodes.
(struct lto_header): Remove section_type.

* lto.c (read_cgraph_and_symbols): Use input_symtab.

From-SVN: r190312

11 years agocompiler: Reject type switch using non-interface type.
Ian Lance Taylor [Sat, 11 Aug 2012 04:09:21 +0000 (04:09 +0000)]
compiler: Reject type switch using non-interface type.

Fixes issue 16.

From-SVN: r190310

11 years agocgraph.h (vector types for symtab_node): Add.
Jan Hubicka [Sat, 11 Aug 2012 03:04:35 +0000 (05:04 +0200)]
cgraph.h (vector types for symtab_node): Add.

* cgraph.h (vector types for symtab_node): Add.
* ipa-reference.c (ipa_reference_write_optimization_summary): Update
for new symtab encoder.
(ipa_reference_read_optimization_summary): Likewise.
* lto-cgraph.c (output_varpool): Remove.
(input_cgraph_opt_summary): Take symtab nodes vector as argument.
(LTO_cgraph_tags): Rename to ...
(LTO_symtab_tags): ... this one; add LTO_symtab_variable.
(lto_cgraph_encoder_new): Rename to ...
(lto_symtab_encoder_new): ... this on.
(lto_cgraph_encoder_encode): Rename to ...
(lto_symtab_encoder_encode): ... this one.
(lto_cgraph_encoder_delete): Rename to ...
(lto_symtab_encoder_delete): ... this one.
(lto_cgraph_encoder_deref): Rename to ...
(lto_symtab_encoder_deref): ... this one.
(lto_cgraph_encoder_encode_body_p): Rename to ...
(lto_symtab_encoder_encode_body_p): ... this one.
(lto_varpool_encoder_new, lto_varpool_encoder_delete,
lto_varpool_encoder_encode, lto_varpool_encoder_lookup,
lto_varpool_encoder_deref): Remove.
(lto_varpool_encoder_encode_initializer_p): Rename to ...
(lto_symtab_encoder_encode_initializer_p): ... this one.
(lto_set_varpool_encoder_encode_initializer): Rename to ...
(lto_set_symtab_encoder_encode_initializer): ... this one.
(lto_output_edge): Update.
(lto_output_node): Update.
(lto_output_varpool_node): Update; stream out LTO_symtab_variable tag.
(lto_output_ref): Drop varpool_encoder; update.
(add_node_to): Update.
(add_references): Update.
(output_outgoing_cgraph_edges): Update.
(output_refs): Update.
(compute_ltrans_boundary): Update.
(output_cgraph): Update; output varpools too.
(input_overwrite_node): Update.
(output_varpool): Remove.
(input_node): Update.
(input_ref): Update.
(input_edge): Update.
(input_cgraph_1): Update; input varpool too; unify fixup code.
(input_varpool_1): Remove.
(input_refs): Update.
(input_cgraph): Update.
(output_node_opt_summary): Update.
(input_cgraph_opt_section): Update.
(input_cgraph_opt_summary): Update.
* ipa-pure-const.c (pure_const_write_summary): Update.
(pure_const_read_summary): Update.
* lto-streamer-out.c (lto_write_tree): Update.
(lto_output): Likewise.
(produce_symtab): Update.
(produce_asm_for_decls): Update.
* ipa-inline-analysis.c (inline_read_section): Update.
(inline_write_summary): Update.
* ipa-prop.c (ipa_write_node_info): Update.
(ipa_prop_read_section): Update.
* lto-streamer.h (lto_cgraph_encoder_d): Rename to ...
(lto_symtab_encoder_d): ... this one;  add initializer.
(lto_cgraph_encoder_t): Rename to ...
(lto_symtab_encoder_t): ... this one.
(lto_cgraph_encoder_size): Rename to ...
(lto_symtab_encoder_size): ... this one.
(lto_varpool_encoder_d): ... remove.
(lto_varpool_encoder_t): Remove.
(lto_out_decl_state): Remove cgraph_node_encoder, varpool_node_encoder
add symtab_node_encoder.
(lto_file_decl_data): Likewise.
(lto_cgraph_encoder_deref, lto_cgraph_encoder_lookup,
lto_cgraph_encoder_new, lto_cgraph_encoder_encode, lto_cgraph_encoder_delete,
lto_cgraph_encoder_encode_body_p, lto_varpool_encoder_encode_body_p,
lto_varpool_encoder_deref, lto_varpool_encoder_lookup, lto_varpool_encoder_new,
lto_varpool_encoder_encode, lto_varpool_encoder_delete,
lto_varpool_encoder_encode_initializer_p): Remove.
(lto_symtab_encoder_deref, lto_symtab_encoder_lookup,
lto_symtab_encoder_t, lto_symtab_encoder_encode, lto_symtab_encoder_delete,
lto_symtab_encoder_encode_body_p, lto_symtab_encoder_encode_initializer_p):
New.

From-SVN: r190309

11 years agoDaily bump.
GCC Administrator [Sat, 11 Aug 2012 00:18:07 +0000 (00:18 +0000)]
Daily bump.

From-SVN: r190308

11 years agoi386.md (isa): Add fma and fma4.
Uros Bizjak [Fri, 10 Aug 2012 22:25:17 +0000 (00:25 +0200)]
i386.md (isa): Add fma and fma4.

* config/i386/i386.md (isa): Add fma and fma4.
(enabled): Handle fma and fma4.
* config/i386/sse.md (*fma_fmadd_<mode>): Merge *fma4_fmadd_<mode>.
(*fma_fmsub_<mode>): Merge *fma4_fmsub_<mode>.
(*fma_fnmadd_<mode>): Merge *fma4_fnmadd_<mode>.
(*fma_fnmsub_<mode>): Merge *fma4_fnmsub_<mode>.
(*fma_fmaddsub_<mode>): Merge *fma4_fmaddsub_<mode>.
(*fma_fmsubadd_<mode>): Merge *fma4_fmsubadd_<mode>.

From-SVN: r190305

11 years ago* config/i386/sse.md (*fma_fmadd_<mode>, *fma_fmsub_<mode>,
Uros Bizjak [Fri, 10 Aug 2012 20:46:15 +0000 (22:46 +0200)]
* config/i386/sse.md (*fma_fmadd_<mode>, *fma_fmsub_<mode>,

*fma_fnmadd_<mode>, *fma_fnmsub_<mode>, *fma_fmaddsub_<mode>,
*fma_fmsubadd_<mode>): Move FMA3 insn patterns before FMA4 patterns.

From-SVN: r190304

11 years agovector-shuffle1.c (f): Pass vectors indirectly to avoid warnings.
Jakub Jelinek [Fri, 10 Aug 2012 20:21:23 +0000 (22:21 +0200)]
vector-shuffle1.c (f): Pass vectors indirectly to avoid warnings.

* gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly
to avoid warnings.
(main): Adjust caller.

From-SVN: r190302

11 years agoi386.md (simple LEA peephole2s): Add zero-extend variants of PLUS and MULT simple...
Uros Bizjak [Fri, 10 Aug 2012 17:20:09 +0000 (19:20 +0200)]
i386.md (simple LEA peephole2s): Add zero-extend variants of PLUS and MULT simple LEA patterns.

* config/i386/i386.md (simple LEA peephole2s): Add zero-extend
variants of PLUS and MULT simple LEA patterns.  Disable PLUS
patterns for TARGET_OPT_AGU.

From-SVN: r190301

11 years agoMakefile.in (OBJS): Remove matrix-reorg.o.
Richard Guenther [Fri, 10 Aug 2012 14:19:09 +0000 (14:19 +0000)]
Makefile.in (OBJS): Remove matrix-reorg.o.

2012-08-10  Richard Guenther  <rguenther@suse.de>

* Makefile.in (OBJS): Remove matrix-reorg.o.
(matrix-reorg.o): Remove dependence rule.
(GTFILES): Remove matrix-reorg.c.
* matrix-reorg.c: Remove.
* passes.c (init_optimization_passes): Do not schedule
pass_ipa_matrix_reorg.
* tree-pass.h (pass_ipa_matrix_reorg): Remove.
* common.opt (fipa-matrix-reorg): Stub out.
* doc/invoke.texi (fipa-matrix-reorg): Remove documentation.

* gcc.dg/matrix/*.c: Adjust and move ...
* gcc.dg/torture/: ... here.
* gcc.dg/matrix: Remove directory.

From-SVN: r190298

11 years agore PR middle-end/54219 (__builtin_shuffle mask reversed)
Richard Guenther [Fri, 10 Aug 2012 13:35:34 +0000 (13:35 +0000)]
re PR middle-end/54219 (__builtin_shuffle mask reversed)

2012-08-10  Richard Guenther  <rguenther@suse.de>

PR middle-end/54219
* fold-const.c (fold_ternary_loc): Do not reverse the mask
when canonicalizing it when folding VEC_PERM_EXPR.

* gcc.dg/torture/vector-shuffle1.c: New testcase.

From-SVN: r190297

11 years agore PR middle-end/54211 (ICE: verify_gimple failed building freetype with -Os)
Bill Schmidt [Fri, 10 Aug 2012 12:16:04 +0000 (12:16 +0000)]
re PR middle-end/54211 (ICE: verify_gimple failed building freetype with -Os)

gcc:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR middle-end/54211
* gimple-ssa-strength-reduction.c (analyze_candidates_and_replace):
Use cand_type to determine whether pointer arithmetic will be generated.

gcc/testsuite:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR middle-end/54211
* gcc.dg/tree-ssa/pr54211.c: New test.

From-SVN: r190294

11 years agosourcebuild.texi: Document long_neq_int effective target.
Bill Schmidt [Fri, 10 Aug 2012 12:11:29 +0000 (12:11 +0000)]
sourcebuild.texi: Document long_neq_int effective target.

gcc:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* doc/sourcebuild.texi: Document long_neq_int effective target.

testsuite:

2012-08-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* lib/target-supports.exp (check_effective_target_long_neq_int): New.
* gcc.dg/tree-ssa/slsr-30.c: Check for long_neq_int effective target.

From-SVN: r190293

11 years agore PR middle-end/54109 (ICE at tree-ssa-structalias.c:3049 in get_constraint_for_comp...
Richard Guenther [Fri, 10 Aug 2012 12:00:05 +0000 (12:00 +0000)]
re PR middle-end/54109 (ICE at tree-ssa-structalias.c:3049 in get_constraint_for_component_ref)

2012-08-10  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/54109
* tree-ssa-forwprop.c
(forward_propagate_addr_into_variable_array_index): Remove.
(forward_propagate_addr_expr_1): Adjust.

* gcc.dg/torture/pr54109.c: New testcase.
* gcc.dg/tree-ssa/forwprop-1.c: Adjust.
* gcc.dg/tree-ssa/forwprop-2.c: Likewise.

From-SVN: r190291

11 years agotree-cfg.c (dump_function_to_file): Make sure to dump anonymous SSA names when there...
Richard Guenther [Fri, 10 Aug 2012 11:54:55 +0000 (11:54 +0000)]
tree-cfg.c (dump_function_to_file): Make sure to dump anonymous SSA names when there are no local decls.

2012-08-10  Richard Guenther  <rguenther@suse.de>

* tree-cfg.c (dump_function_to_file): Make sure to dump
anonymous SSA names when there are no local decls.

From-SVN: r190290

11 years agotree-ssa-pre.c (alloc_expression_id): Fix use of VEC_reserve.
Steven Bosscher [Fri, 10 Aug 2012 09:27:31 +0000 (09:27 +0000)]
tree-ssa-pre.c (alloc_expression_id): Fix use of VEC_reserve.

* tree-ssa-pre.c (alloc_expression_id): Fix use of VEC_reserve.
* tree-into-ssa.c (get_ssa_name_ann): Likewise.
(mark_phi_for_rewrite): Likewise.
(compute_global_livein): Use VEC_reserve outside the innermost
loop and VEC_quick_push instead of VEC_safe_push in that loop.
(update_ssa): Re-organize to avoid unnecessary sbitmap_zero'ing
of new_ssa_names and old_ssa_names.  Allocate phis_to_rewrite to
the correct initial size.

From-SVN: r190289

11 years agotree-ssa-pre.c (pretemp, [...]): Remove.
Richard Guenther [Fri, 10 Aug 2012 09:20:29 +0000 (09:20 +0000)]
tree-ssa-pre.c (pretemp, [...]): Remove.

2012-08-10  Richard Guenther  <rguenther@suse.de>

* tree-ssa-pre.c (pretemp, storetemp, prephitemp): Remove.
(need_creation): Remove.
(get_representative_for): Use anonymous named SSA names.
(create_expression_by_pieces): Likewise.
(insert_into_preds_of_block): Likewise.
(init_pre): Do not init removed vars.
(fini_pre): Do not free need_creation.
* tree-ssa-forwprop.c (simplify_bitwise_binary): Use anonymous
SSA names.
* tree-ssa-loop-manip.c (create_iv): Likewise.
* value-prof.c (gimple_divmod_fixed_value): Likewise.
(gimple_mod_pow2): Likewise.
(gimple_mod_subtract): Likewise.
(gimple_ic): Likewise.
(gimple_stringop_fixed_value): Likewise.
* tree-ssa-phiopt.c (condstoretemp): Remove.
(tree_ssa_phiopt_worker): Use anonymous named SSA names.
(conditional_replacement): Likewise.
(abs_replacement): Likewise.
(cond_store_replacement): Likewise.
(cond_if_else_store_replacement_1): Likewise.
* tree-ssa-loop-im.c (rewrite_reciprocal): Likewise.
(rewrite_bittest): Likewise.
* tree-ssa-reassoc.c (build_and_add_sum): Get type from callers
and build anonymous SSA names.
(undistribute_ops_list): Adjust.
(eliminate_redundant_comparison): Use anonymous SSA names.
(rewrite_expr_tree_parallel): Likewise.
(get_reassoc_pow_ssa_name): Remove.
(attempt_builtin_powi): Adjust.
(reassociate_bb): Likewise.
* tree-ssa-strlen.c (get_string_length): Use anonymous SSA names.
* tree-switch-conversion.c (emit_case_bit_tests): Likewise.
(build_arrays): Likewise.
* tree-tailcall.c (adjust_return_value_with_ops): Likewise.
(create_tailcall_accumulator): Likewise.
* tree-vect-generic.c (expand_vector_divmod): Likewise.
* tree-profile.c (gcov_type_tmp_var): Remove.
(gimple_init_edge_profiler): Do not initialize it and use anonymous
SSA names.
(gimple_gen_ic_profiler): Likewise.
(tree_profiling): Adjust.
* tree-sra.c (build_ref_for_offset): Use anonymous SSA names.
* tree-ssa-math-opts.c (execute_cse_sincos_1): Likewise.
(powi_as_mults_1): Likewise.
(powi_as_mults): Likewise.
(build_and_insert_call): Adjust.
(build_and_insert_binop): Likewise.
(build_and_insert_ref): Likewise.
(build_and_insert_cast): Likewise.
(gimple_expand_builtin_pow): Likewise.
(gimple_expand_builtin_cabs): Likewise.
(execute_optimize_bswap): Use anonymous SSA names.
(convert_mult_to_widen): Likewise.
(convert_plusminus_to_widen): Likewise.
* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
* tree-ssa-propagate.c (update_call_from_tree): Likewise.
* tree-if-conv.c (ifc_temp_var): Likewise.
* tree-loop-distribution.c (generate_memset_builtin): Likewise.
* tree-parloops.c (take_address_of): Likewise.
* tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
(vect_permute_load_chain): Likewise.
* tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
* tree-vect-patterns.c (vect_recog_temp_ssa_var): Likewise.
(vect_handle_widen_op_by_const): Likewise.
(vect_operation_fits_smaller_type): Likewise.
(vect_recog_over_widening_pattern): Likewise.
* tree-vect-stmts.c (vect_init_vector): Likewise.
* tree-vrp.c (simplify_truth_ops_using_ranges): Likewise.
(simplify_float_conversion_using_ranges): Likewise.

From-SVN: r190288

11 years agoi386.c (ix86_init_mmx_sse_builtins): Fix builtin target mask of __builtin_ia32_rdseed...
Michael Zolotukhin [Fri, 10 Aug 2012 08:39:47 +0000 (08:39 +0000)]
i386.c (ix86_init_mmx_sse_builtins): Fix builtin target mask of __builtin_ia32_rdseed_di_step.

* config/i386/i386.c (ix86_init_mmx_sse_builtins): Fix builtin
target mask of __builtin_ia32_rdseed_di_step.

From-SVN: r190287

11 years agore PR tree-optimization/54027 (possible mis-optimization of signed left shift in...
Richard Guenther [Fri, 10 Aug 2012 08:33:57 +0000 (08:33 +0000)]
re PR tree-optimization/54027 (possible mis-optimization of signed left shift in c89 mode)

2012-08-10  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/54027
* tree-vrp.c (extract_range_from_binary_expr_1): Merge RSHIFT_EXPR
and LSHIFT_EXPR handling, force -fwrapv for the multiplication used
to handle LSHIFT_EXPR with a constant.

* gcc.dg/torture/pr54027.c: New testcase.

From-SVN: r190286

11 years agotree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE is recorded as var.
Richard Guenther [Fri, 10 Aug 2012 08:29:29 +0000 (08:29 +0000)]
tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE is recorded as var.

2012-08-10  Richard Guenther  <rguenther@suse.de>

* tree.h (SSA_NAME_VAR): Return NULL_TREE if an IDENTIFIER_NODE
is recorded as var.
(SSA_NAME_IDENTIFIER): Return the IDENTIFIER_NODE of the SSA_NAME
or its SSA_NAME_VAR.
(SET_SSA_NAME_VAR_OR_IDENTIFIER): New setter.
* tree-ssanames.c (make_ssa_name_fn): Handle creating anonymous
SSA names by passing a type instead of a variable decl.
(release_ssa_name): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
(copy_ssa_name_fn): Handle anonymous SSA names.
(replace_ssa_name_symbol): Use SET_SSA_NAME_VAR_OR_IDENTIFIER.
* tree-flow-inline.h (make_temp_ssa_name): New inline function.
* tree-pretty-print.c (dump_generic_node): Use SSA_NAME_IDENTIFIER,
dump SSA names without a name as <anon>.
* cfgexpand.c (expand_used_vars): Assing anonymous SSA names we are
going to expand a decl.
(gimple_expand_cfg): Assign all SSA names of a partition the
decl we created for its leader.
* tree-ssa.c (target_for_debug_bind): Handle SSA_NAMEs.
(verify_ssa_name): Handle anonymous SSA names.
(verify_def): Likewise.
* tree-predcom.c (eliminate_temp_copies): Likewise.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
* tree-ssa-live.c (var_map_base_init): Compute conflicts for
anonymous SSA names with the same type.
(mark_all_vars_used_1): Handle anonymous SSA names.
(verify_live_on_entry): Likewise.
* tree-ssa-coalesce.c (abnormal_corrupt): Remove.
(create_outofssa_var_map): Adjust with respect to conflicts we
compute for anonymous SSA names.  Do not restrict abnormal
coalescing.
(coalesce_partitions): Do not restrict abnormal coalescing.
Assert we only ever coalesce variables we computed conflicts for.
* tree-ssa-ter.c (process_replaceable): Do not restrict TER
of anonymous names.
* expr.c (expand_expr_real_1): Handle anonymous SSA names
expanded from IVOPTs by creating a raw REG here.
* tree-cfg.c (replace_ssa_name): Handle anonymous SSA names.
(dump_function_to_file): Dump anonymous SSA names alongside
with their types in the variable list.
(verify_gimple_return): Guard use of SSA_NAME_VAR.
* tree-into-ssa.c (mark_for_renaming): Handle a NULL symbol.
(rewrite_into_ssa): Make SSA names anonymous.
* tree-ssa-structalias.c (alias_get_name): Rewrite.
* tree-ssa-uninit.c (ssa_undefined_value_p): Handle anonymous
SSA names.
(warn_uninitialized_phi): Likewise.
* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Defer expanding
anonymous SSA names to the expander.
(determine_iv_cost): Anonymous SSA names are artificial.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
Handle anonymous SSA names.
* lto-streamer-out.c (output_ssa_names): Stream SSA_NAME_VAR
or if NULL, the type of the SSA name.
* tree-inline.c (remap_ssa_name): Handle anonymous SSA names,
remap names as anonymous where appropriate.
(insert_init_stmt): Pass SSA names down to insert_init_debug_bind.
* tree-ssa-uncprop.c (uncprop_into_successor_phis): Adjust
according to what we create conflicts for in out-of-SSA
coalescing.
* tree-parloops.c (separate_decls_in_region_name): Handle
anonymous SSA names.
(add_field_for_name): Likewise.
* tree.c (get_name): Handle SSA names.
* tree-ssa-loop-im.c (gen_lsm_tmp_name): Defer to get_name for
SSA_NAMEs.
* tree-vect-loop-manip.c (adjust_debug_stmts): Use
virtual_operand_p.
* tree-sra.c (create_access_replacement): Give up generating
a DECL_DEBUG_EXPR for SSA names in the memory reference.
(replace_removed_params_ssa_names): Guard use of SSA_NAME_VAR.
* tree-complex.c (get_component_ssa_name): Handle anonymous
SSA names.
(set_component_ssa_name): Likewise.
* tree-ssa-sccvn.c (visit_reference_op_load): Likewise.
* tree-object-size.c (collect_object_sizes_for): Handle
uninitialized SSA names properly.
* ipa-inline-analysis.c (eliminated_by_inlining_prob): Guard use of
SSA_NAME_VAR.
* ipa-split.c (test_nonssa_use): Likewise.
(consider_split): Likewise.
(mark_nonssa_use): Likewise.

c-family/
* c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.

cp/
* error.c (dump_expr): Likewise.

* g++.dg/plugin/selfassign.c: Adjust.
* gcc.dg/plugin/selfassign.c: Likewise.
* gcc.dg/strlenopt-11.c: Likewise.
* gcc.dg/strlenopt-13.c: Likewise.
* gcc.dg/no-strict-overflow-4.c: Likewise.
* gcc.dg/strict-overflow-4.c: Likewise.
* gcc.dg/tree-ssa/alias-11.c: Likewise.
* gcc.dg/tree-ssa/alias-6.c: Likewise.
* gcc.dg/tree-ssa/asm-3.c: Likewise.
* gcc.dg/tree-ssa/pr18908.c: Likewise.
* gcc.dg/tree-ssa/pr19431.c: Likewise.
* gcc.dg/tree-ssa/ssa-pre-21.c: Likewise.
* gcc.dg/tree-ssa/phi-opt-10.c: Likewise.
* gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
* gcc.dg/tree-ssa/slsr-27.c: Likewise.
* gcc.dg/tree-ssa/slsr-28.c: Likewise.
* gcc.dg/tree-ssa/slsr-29.c: Likewise.
* gcc.dg/pr46309.c: Likewise.
* gcc.dg/tree-ssa/loop-5.c: Likewise.

From-SVN: r190284

11 years agore PR middle-end/54146 (Very slow compile with attribute((flatten)))
Jan Hubicka [Fri, 10 Aug 2012 07:52:23 +0000 (09:52 +0200)]
re PR middle-end/54146 (Very slow compile with attribute((flatten)))

PR middle-end/54146
* ipa-inline-transform.c (inline_call): Add UPDATE_OVERALL_SUMMARY
parameter; honnor it.
* ipa-inline.c (recursive_inlining): Update call
of inline_call.
(inline_small_functions): Likewise.
(ipa_inline): Likewise.
(inline_always_inline_functions): Likewise.
(early_inline_small_functions): Likewise.
(flatten_function): Do separate update of summary info.
* ipa-inline.h (inline_update_overall_summary): Declare.
(inline_call): Update.
* ipa-inline-analysis.c (inline_merge_summary): Break out
updating code to ...
(inline_update_overall_summary): Likewise.

From-SVN: r190283

11 years agoruntime: use sched_getaffinity for runtime.NumCPU() on Linux
Ian Lance Taylor [Fri, 10 Aug 2012 06:08:11 +0000 (06:08 +0000)]
runtime: use sched_getaffinity for runtime.NumCPU() on Linux
        Fixes Go issue 3921 for gccgo.

From Shenghou Ma.

From-SVN: r190282

11 years agos390: Use VOIDmode with gen_rtx_SET
Richard Henderson [Fri, 10 Aug 2012 02:39:50 +0000 (19:39 -0700)]
s390: Use VOIDmode with gen_rtx_SET

* config/s390/s390.c (s390_expand_insv): Use VOIDmode in gen_rtx_SET.

From-SVN: r190281

11 years agos390: Rearrange temporary moves for use of CRJ
Richard Henderson [Fri, 10 Aug 2012 02:12:56 +0000 (19:12 -0700)]
s390: Rearrange temporary moves for use of CRJ

* config/s390/s390.c (s390_expand_cs_hqi): Copy val to a temp before
performing the compare for the restart loop.

From-SVN: r190280

11 years agorl78.c (rl78_alloc_physical_registers): Check for SET before extracting SET_SRC.
DJ Delorie [Fri, 10 Aug 2012 00:45:29 +0000 (20:45 -0400)]
rl78.c (rl78_alloc_physical_registers): Check for SET before extracting SET_SRC.

* config/rl78/rl78.c (rl78_alloc_physical_registers): Check for
SET before extracting SET_SRC.
(rl78_remove_unused_sets): Check for REG before extractnig REGNO.

From-SVN: r190278

11 years agoDaily bump.
GCC Administrator [Fri, 10 Aug 2012 00:17:48 +0000 (00:17 +0000)]
Daily bump.

From-SVN: r190277

11 years agore PR target/54089 ([SH] Refactor shift patterns)
Oleg Endo [Thu, 9 Aug 2012 23:27:51 +0000 (23:27 +0000)]
re PR target/54089 ([SH] Refactor shift patterns)

PR target/54089
* config/sh/sh-protos (shift_insns_rtx): Delete.
(sh_ashlsi_clobbers_t_reg_p): Add.
* config/sh/sh.c (shift_insns, shift_amounts, ext_shift_insns,
ext_shift_amounts): Merge arrays of ints to array of structs.
Adapt usage of arrays throughout the file.
(shift_insns_rtx): Delete unused function.
(sh_ashlsi_clobbers_t_reg_p): New function.
* config/sh/sh.md (ashlsi3): Emit ashlsi3_n_clobbers_t insn if the
final shift sequence will clobber T_REG.
(ashlsi3_n): Split only if the final shift sequence will not
clobber T_REG.
(ashlsi3_n_clobbers_t): New insn_and_split.

From-SVN: r190273

11 years agoacinclude.m4: Update references to final C++11 standard.
Jonathan Wakely [Thu, 9 Aug 2012 22:45:20 +0000 (22:45 +0000)]
acinclude.m4: Update references to final C++11 standard.

* acinclude.m4: Update references to final C++11 standard.
* include/bits/shared_ptr.h: Likewise.
* include/bits/shared_ptr_base.h: Likewise.
* include/bits/unique_ptr.h: Likewise.
* include/std/chrono: Likewise.
* include/std/thread: Likewise.

From-SVN: r190271

11 years agocalls.c (mem_overlaps_already_clobbered_arg_p): Use SBITMAP_SIZE instead of looking...
Steven Bosscher [Thu, 9 Aug 2012 21:59:32 +0000 (21:59 +0000)]
calls.c (mem_overlaps_already_clobbered_arg_p): Use SBITMAP_SIZE instead of looking at sbitmap n_bits member directly.

* calls.c (mem_overlaps_already_clobbered_arg_p): Use SBITMAP_SIZE
instead of looking at sbitmap n_bits member directly.
* gcse.c (hoist_code): Likewise.
* sched-rgn.c (split_edges): Likewise.
* tree-into-ssa.c (is_old_name, is_new_name, add_new_name_mapping,
update_ssa): Likewise.

From-SVN: r190268

11 years agoi386.h (LIMIT_RELOAD_CLASS): Return preferred single unit register class for classes...
Uros Bizjak [Thu, 9 Aug 2012 18:30:13 +0000 (20:30 +0200)]
i386.h (LIMIT_RELOAD_CLASS): Return preferred single unit register class for classes that contain registers...

* config/i386/i386.h (LIMIT_RELOAD_CLASS): Return preferred
single unit register class for classes that contain registers form
multiple units.
(REG_CLASS_CONTENTS): Add missing "frame" register to FLOAT_INT_REGS,
INT_SSE_REGS and FLOAT_INT_SSE_REGS register classes.

testsuite/ChangeLog:

* gcc.c-torture/compile/20120727-1.c (dg-options): Add -mfpmath=387
for x86 targets.
* gcc.c-torture/compile/20120727-2.c: New test.

From-SVN: r190261

11 years agocgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to offset, updated all...
Martin Jambor [Thu, 9 Aug 2012 16:05:46 +0000 (18:05 +0200)]
cgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to offset, updated all users.

2012-08-09  Martin Jambor  <mjambor@suse.cz>

* cgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to
offset, updated all users.  New field agg_contents.
* ipa-prop.h (jump_func_type): Removed IPA_JF_CONST_MEMBER_PTR.
(ipa_pass_through_data): New field agg_preserved.
(ipa_ancestor_jf_data): Likewise.
(ipa_member_ptr_cst): Removed.
(ipa_agg_jf_item): New type.
(ipa_agg_jump_function): Likewise.
(ipa_jump_func): New field agg.  Removed field member_cst.
(ipa_get_jf_pass_through_agg_preserved): New function.
(ipa_get_jf_ancestor_agg_preserved): Likewise.
(ipa_get_jf_member_ptr_pfn): Removed.
(ipa_find_agg_cst_for_param): Declare.
(ipa_load_from_parm_agg): Likewise.
* ipa-prop.c (param_analysis_info): Fields modified and
visited_statements rename to parm_modified and parm_visited_statements
respectively, added fields ref_modified, ref_visited_statements,
pt_modified and pt_visited_statements.
(ipa_print_node_jump_functions_for_edge): Do not dump const member
functions.  Dump agg_preserved flags and aggregate jump functions.
(ipa_set_jf_simple_pass_through): Set also agg_preserved.
(ipa_set_ancestor_jf): Likewise.
(ipa_set_jf_arith_pass_through): Clear agg_preserved.
(ipa_set_jf_member_ptr_cst): Removed.
(is_parm_modified_before_stmt): Logic reversed, renamed to
parm_preserved_before_stmt_p.  Cache visited bitmap only for
naked DECL parameters.  All callers updated.
(load_from_unmodified_param): Allow NULL parms_ainfo.
(parm_ref_data_preserved_p): New function.
(parm_ref_data_pass_through_p): Likewise.
(ipa_load_from_parm_agg_1): Likewise.
(ipa_load_from_parm_agg): Likewise.
(compute_complex_assign_jump_func): Check if aggregate contents are
preserved.
(compute_complex_ancestor_jump_func): Likewise.
(compute_scalar_jump_functions): Removed.
(type_like_member_ptr_p): Also check field position are known and
sane.
(compute_pass_through_member_ptrs): Removed.
(determine_cst_member_ptr): Likewise.
(ipa_known_agg_contents_list): New type.
(determine_known_aggregate_parts): New function.
(compute_cst_member_ptr_arguments): Removed.
(ipa_compute_jump_functions_for_edge): Compute all kinds of jump
functions (scalar, aggregate and member pointer).
(ipa_get_member_ptr_load_param): Incorporate into
ipa_get_stmt_member_ptr_load_param, also pass back an offset.
(ipa_note_param_call): Clear agg_contents.
(ipa_analyze_indirect_call_uses): Also look for simple pointers loaded
from aggregates.  In such cases, store offset of the called field.
(ipa_analyze_node): Initialize new fields of param_analysis_info.
(update_jump_functions_after_inlining): Handle aggregate contents.
(ipa_find_agg_cst_for_param): New function.
(try_make_edge_direct_simple_call): Handle called aggregate values.
(update_indirect_edges_after_inlining): Make sure aggregate preserving
jump functions comply with type compatibility requirements.
(ipa_edge_duplication_hook): Copy also aggregate jump functions.
(ipa_write_jump_function): Stream agg_preserved flags and aggregate
jump functions.  Do not stream member pointer constant jump functions.
(ipa_read_jump_function): Likewise.
(ipa_write_indirect_edge_info): Stream new cgraph_indirect_call_info
fields.
(ipa_read_indirect_edge_info): Likewise.

* testsuite/gcc.dg/ipa/iinline-4.c: New test.
* testsuite/gcc.dg/ipa/iinline-5.c: Likewise.
* testsuite/gcc.dg/ipa/iinline-6.c: Likewise.
* testsuite/gcc.dg/ipa/iinline-7.c: Likewise.
* testsuite/gcc.dg/lto/20120723_0.c: Likewise.
* testsuite/gcc.dg/lto/20120723_1.c: Likewise.

From-SVN: r190260

11 years agore PR target/39423 ([SH] performance regression: lost mov @(disp,Rn))
Oleg Endo [Thu, 9 Aug 2012 15:58:04 +0000 (15:58 +0000)]
re PR target/39423 ([SH]  performance regression: lost mov @(disp,Rn))

PR target/39423
* config/sh/predicates.md (mem_index_disp_operand): New predicate.
* config/sh/sh.md (*movsi_index_disp): Rewrite insns to use the new
mem_index_disp_operand predicate.

PR target/39423
* gcc.target/sh/pr39423-1.c: New.

From-SVN: r190259

11 years agore PR target/51244 ([SH] Inefficient conditional branch and code around T bit)
Oleg Endo [Thu, 9 Aug 2012 15:55:18 +0000 (15:55 +0000)]
re PR target/51244 ([SH] Inefficient conditional branch and code around T bit)

PR target/51244
* config/sh/sh.md: Add negc extu sequence peephole.
(movrt, movnegt, movrt_negc, nott): Use t_reg_operand predicate.
(*movrt_negc): New insn.
* config/sh/sync.md (atomic_test_and_set): Pass gen_t_reg_rtx to
gen_movnegt.
* config/sh/sh.c (expand_cbranchsi4, sh_emit_scc_to_t,
sh_emit_compare_and_branch, sh_emit_compare_and_set): Use get_t_reg_rtx.
(sh_expand_t_scc): Pass gen_t_reg_rtx to gen_movnegt.

PR target/51244
* gcc.target/sh/pr51244-5: New.
* gcc.target/sh/pr51244-6: New.

From-SVN: r190258

11 years agore PR target/50751 (SH Target: Displacement addressing does not work for QImode and...
Oleg Endo [Thu, 9 Aug 2012 15:51:20 +0000 (15:51 +0000)]
re PR target/50751 (SH Target: Displacement addressing does not work for QImode and HImode)

PR target/50751
* config/sh/sh.md (*extendqisi2_compact_reg, *extendhisi2_compact_reg):
Use arith_reg_operand predicate instead of register_operand.
* config/sh/predicates.md (movsrc_no_disp_mem_operand): Accept
only mem, simplify.

From-SVN: r190257

11 years agoalpha.c (alpha_pad_noreturn): Rename to ...
Uros Bizjak [Thu, 9 Aug 2012 15:02:36 +0000 (17:02 +0200)]
alpha.c (alpha_pad_noreturn): Rename to ...

        * config/alpha/alpha.c (alpha_pad_noreturn): Rename to ...
        (alpha_pad_function_end): ... this.  Also insert NOP between
        sibling call and GP load.
        (alpha_reorg): Update call to alpha_pad_function_end.  Expand comment.

From-SVN: r190255

11 years agoadxintrin.h: Remove guarding __ADX__ check.
Michael Zolotukhin [Thu, 9 Aug 2012 14:35:02 +0000 (14:35 +0000)]
adxintrin.h: Remove guarding __ADX__ check.

Changelog
        * config/i386/adxintrin.h: Remove guarding __ADX__ check.
        * config/i386/x86intrin.h: Likewise.
        * config/i386/i386.c (ix86_init_mmx_sse_builtins): Remove
        OPTION_MASK_ISA_ADX from needed options for
        __builtin_ia32_addcarryx_u32 and __builtin_ia32_addcarryx_u64.
        (ix86_expand_builtin): Use add<mode>3_carry in expanding of
        IX86_BUILTIN_ADDCARRYX32 and IX86_BUILTIN_ADDCARRYX64.

testsuite/Changelog
        * gcc.target/i386/adx-addxcarry32-3.c: New.
        * gcc.target/i386/adx-addxcarry64-3.c: New.

From-SVN: r190254

11 years agore PR rtl-optimization/53701 (ICE on ia64 (when building Allegro 4.4) in sel-sched)
Andrey Belevantsev [Thu, 9 Aug 2012 14:08:31 +0000 (18:08 +0400)]
re PR rtl-optimization/53701 (ICE on ia64 (when building Allegro 4.4) in sel-sched)

    PR rtl-optimization/53701
    * sel-sched.c (vinsn_vec_has_expr_p): Clarify function comment.
    Process not only expr's vinsns but all old vinsns from expr's
    history of changes.
    (update_and_record_unavailable_insns): Clarify comment.

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

From-SVN: r190253

11 years agoreload.c (find_valid_class_1): New static function.
Bernd Schmidt [Thu, 9 Aug 2012 13:18:05 +0000 (13:18 +0000)]
reload.c (find_valid_class_1): New static function.

* reload.c (find_valid_class_1): New static function.
(push_reload): Use it when reloading a SYMBOL_REG as the inner
of a subreg.  Keep better track of needed classes for the
secondary memory case.
* config/i386/i386.h (LIMIT_RELOAD_CLASS): Limit INT_SSE_REGS to
GENERAL_REGS.
* reload1.c (replaced_subreg): New static function.
(gen_reload): Use it when deciding whether to use secondary
memory.

* gcc.c-torture/compile/20120727-1.c: New test.

From-SVN: r190252

11 years agore PR fortran/54199 (Superfluous diagnostic "is also the name of an intrinsic" for...
Tobias Burnus [Thu, 9 Aug 2012 12:06:31 +0000 (14:06 +0200)]
re PR fortran/54199 (Superfluous diagnostic "is also the name of an intrinsic" for internal procedures)

2012-08-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54199
        * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
        for internal procedures.

2012-08-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54199
        * gfortran.dg/intrinsic_shadow_4.f90: New.

From-SVN: r190251

11 years agotree.h (SSA_VAR_P): Simplify.
Richard Guenther [Thu, 9 Aug 2012 11:00:11 +0000 (11:00 +0000)]
tree.h (SSA_VAR_P): Simplify.

2012-08-09  Richard Guenther  <rguenther@suse.de>

* tree.h (SSA_VAR_P): Simplify.
* tree-ssanames.c (make_ssa_name_fn): Strengthen assert.
* fold-const.c (fold_comparison): Check for default def first
before checking for PARM_DECL.
* tree-complex.c (get_component_ssa_name): Likewise.
* tree-inline.c (remap_ssa_name): Likewise.
* tree-ssa-loop-ivopts.c (parm_decl_cost): Likewise.
* tree-ssa-structalias.c (get_fi_for_callee): Likewise.
(find_what_p_points_to): Likewise.
* tree-ssa-operands.c (add_stmt_operand): Simplify.

From-SVN: r190250