Jakub Jelinek [Tue, 26 Apr 2011 10:04:18 +0000 (12:04 +0200)]
backport: re PR preprocessor/48740 (Raw C++0x strings and trigraphs mix badly)
2011-04-26 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
2011-04-24 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/48740
* lex.c (lex_raw_string): When raw string ends with
??) followed by raw prefix and ", ensure it is preprocessed
with ??) rather than ??].
Richard Guenther [Wed, 20 Apr 2011 11:05:09 +0000 (11:05 +0000)]
backport: re PR middle-end/47976 (Recent gfortran.dg/actual_array_constructor_3.f90 regression on arm-linux-gnueabi)
2011-04-20 Richard Guenther <rguenther@suse.de>
Backport from 4.6 branch
2011-04-19 Bernd Schmidt <bernds@codesourcery.com>
PR fortran/47976
* reload1.c (inc_for_reload): Return void. All callers changed.
(emit_input_reload_insns): Don't try to delete previous output
reloads to a register, or record spill_reg_store for autoincs.
Richard Guenther [Tue, 19 Apr 2011 09:19:33 +0000 (09:19 +0000)]
backport: [multiple changes]
2011-04-19 Richard Guenther <rguenther@suse.de>
Backported from 4.6 branch
2011-03-29 Jakub Jelinek <jakub@redhat.com>
PR preprocessor/48248
* c-ppoutput.c (print): Add src_file field.
(init_pp_output): Initialize it.
(maybe_print_line): Don't optimize by adding up to 8 newlines
if map->to_file and print.src_file are different file.
(print_line): Update print.src_file.
Richard Guenther [Tue, 19 Apr 2011 08:59:45 +0000 (08:59 +0000)]
re PR tree-optimization/46188 (-fipa-cp removes destructor call)
2011-04-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46188
Backported from 4.6 branch
2010-05-26 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (clone_of_p): Remove.
(verify_cgraph_node): Do not verify clones.
(cgraph_materialize_all_clones): Do no redirection here.
* ipa-inline.c (inline_transform): Do redirection here.
Richard Guenther [Mon, 18 Apr 2011 15:25:17 +0000 (15:25 +0000)]
backport: [multiple changes]
2011-04-18 Richard Guenther <rguenther@suse.de>
Backported from 4.6 branch
2011-01-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/47290
* tree-eh.c (infinite_empty_loop_p): New function.
(cleanup_empty_eh): Use it.
* g++.dg/torture/pr47290.C: New test.
2010-05-29 Jan Hubicka <jh@suse.cz>
PR tree-optimization/46364
* cgraphunit.c (cgraph_materialize_clone): Only remove calles, refs
and body;
not the whole node for masters of materialized clones.
Richard Biener [Mon, 18 Apr 2011 14:37:08 +0000 (14:37 +0000)]
backport: [multiple changes]
2011-04-18 Richard Guenther <rguenther@suse.de>
Backported from 4.6 branch
2011-03-11 Jakub Jelinek <jakub@redhat.com>
PR c++/48035
* init.c (build_zero_init_1): Extracted from build_zero_init.
Add FIELD_SIZE argument, if non-NULL and field bit_position
as not smaller than that, don't add that field's initializer.
Pass DECL_SIZE as last argument to build_zero_init_1
for DECL_FIELD_IS_BASE fields.
(build_zero_init): Use build_zero_init_1.
* g++.dg/inherit/virtual8.C: New test.
2011-03-05 Zdenek Dvorak <ook@ucw.cz>
PR rtl-optimization/47899
* cfgloopmanip.c (fix_bb_placements): Fix first argument
to flow_loop_nested_p when moving the loop upward.
* gcc.dg/pr47899.c: New test.
2011-03-15 Richard Guenther <rguenther@suse.de>
PR middle-end/48031
* fold-const.c (fold_indirect_ref_1): Do not create new variable-sized
or variable-indexed array accesses when in gimple form.
Richard Guenther [Mon, 18 Apr 2011 14:02:22 +0000 (14:02 +0000)]
backport: [multiple changes]
2011-04-18 Richard Guenther <rguenther@suse.de>
Backported from 4.6 branch
2011-03-11 Jakub Jelinek <jakub@redhat.com>
PR c++/48035
* init.c (build_zero_init_1): Extracted from build_zero_init.
Add FIELD_SIZE argument, if non-NULL and field bit_position
as not smaller than that, don't add that field's initializer.
Pass DECL_SIZE as last argument to build_zero_init_1
for DECL_FIELD_IS_BASE fields.
(build_zero_init): Use build_zero_init_1.
* g++.dg/inherit/virtual8.C: New test.
2011-03-05 Zdenek Dvorak <ook@ucw.cz>
PR rtl-optimization/47899
* cfgloopmanip.c (fix_bb_placements): Fix first argument
to flow_loop_nested_p when moving the loop upward.
* gcc.dg/pr47899.c: New test.
2011-03-15 Richard Guenther <rguenther@suse.de>
PR middle-end/48031
* fold-const.c (fold_indirect_ref_1): Do not create new variable-sized
or variable-indexed array accesses when in gimple form.
Jakub Jelinek [Sat, 16 Apr 2011 07:53:39 +0000 (09:53 +0200)]
backport: re PR target/48605 (gcc.target/i386/sse4_1-insertps-2.c FAILs with -mtune=geode - instruction insertps with memory operands behaves differently)
Backported from 4.6 branch
2011-04-15 Jakub Jelinek <jakub@redhat.com>
PR target/48605
* config/i386/sse.md (avx_insertps, sse4_1_insertps): If operands[2]
is a MEM, offset it as needed based on top 2 bits in operands[3],
change MEM mode to SFmode and mask those 2 bits away from operands[3].
* gcc.target/i386/sse4_1-insertps-3.c: New test.
* gcc.target/i386/sse4_1-insertps-4.c: New test.
* gcc.target/i386/avx-insertps-3.c: New test.
* gcc.target/i386/avx-insertps-4.c: New test.
* config/i386/sse.md (avx_cmps<ssemodesuffixf2c><mode>3): Add
missing output register constraint.
(*vec_concatv2sf_avx): Fix wrong register constraint in
alternative 3 of operand 1.
(*vec_set<mode>_0_avx): Avoid combining registers from different
units in a single alternative.
(*vec_set<mode>_0_sse4_1): Ditto.
(*vec_set<mode>_0_sse2): Ditto.
(vec_set<mode>_0): Ditto.
(sse2_storehpd): Ditto.
(sse2_loadhpd): Ditto.
(sse4_1_insertps): Use nonimmediate_operand for operand 2.
* config/i386/predicates.md (sse_comparison_operator): Do not
define as special predicate.
Jakub Jelinek [Thu, 7 Apr 2011 18:30:36 +0000 (20:30 +0200)]
backport: re PR debug/48466 (Wrong variable locations at -O0 on i686)
Backported from mainline
2011-04-06 Jakub Jelinek <jakub@redhat.com>
PR debug/48466
* dwarf2out.c (based_loc_descr): If drap_reg is INVALID_REGNUM, use
as base_reg whatever register reg has been eliminated to, instead
of hardcoding STACK_POINTER_REGNUM.
* gcc.dg/guality/pr36977.c: New test.
* gcc.dg/guality/pr48466.c: New test.
Jakub Jelinek [Thu, 7 Apr 2011 18:28:29 +0000 (20:28 +0200)]
backport: re PR rtl-optimization/48141 (DSE compile time hog)
Backported from mainline
2011-03-17 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/48141
* dse.c (record_store): If no positions are needed in an insn
that cannot be deleted, at least unchain it from active_local_stores.
Jakub Jelinek [Thu, 7 Apr 2011 18:27:20 +0000 (20:27 +0200)]
backport: re PR c/47963 (ICE: tree check: expected tree that contains 'decl common' structure, have 'integer_cst' in is_global_var, at tree-flow-inline.h:599 on invalid code with -fopenmp)
Backported from mainline
2011-03-03 Jakub Jelinek <jakub@redhat.com>
PR c/47963
* gimplify.c (omp_add_variable): Only call omp_notice_variable
on TYPE_SIZE_UNIT if it is a DECL.
* gcc.dg/gomp/pr47963.c: New test.
* g++.dg/gomp/pr47963.C: New test.
backport: re PR rtl-optimization/48144 (ICE: in code_motion_path_driver, at sel-sched.c:6575 with -fselective-scheduling2 and custom flags)
Backport from mainline
2011-03-26 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/48144
* sel-sched-ir.c (merge_history_vect): Factor out from ...
(merge_expr_data): ... here.
(av_set_intersect): Rename to av_set_code_motion_filter.
Update all callers. Call merge_history_vect when an expression
is found in both sets.
* sel-sched-ir.h (av_set_code_motion_filter): Add prototype.
backport: re PR rtl-optimization/45352 (ICE: in reset_sched_cycles_in_current_ebb, at sel-sched.c:7058)
Backport from mainline
2011-01-13 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/45352
* sel-sched.c: Update copyright years.
(reset_sched_cycles_in_current_ebb): Also recheck the DFA state
in the advancing loop when we have issued issue_rate insns.
Backport from mainline
2010-12-22 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/45352
PR rtl-optimization/46521
PR rtl-optimization/46522
* sel-sched.c (reset_sched_cycles_in_current_ebb): Recheck the DFA state
on the last iteration of the advancing loop.
(sel_sched_region_1): Propagate the rescheduling bit to the next block
also for empty blocks.
Backport from mainline
2010-11-08 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/45352
* sel-sched.c (find_best_expr): Do not set pneed_stall when
the variable_issue hook is not implemented.
(fill_insns): Remove dead variable stall_iterations.
(init_seqno_1): Force EBB start for resetting sched cycles on any
successor blocks of the rescheduled region.
(sel_sched_region_1): Use bitmap_bit_p instead of bitmap_clear_bit.
(reset_sched_cycles_in_current_ebb): Add debug printing.
New variable issued_insns. Advance state when we have issued
issue_rate insns.
backport: re PR target/43603 (gcc-4.4.3 ICE on ia64 with -O3)
Backport from mainline
2010-12-07 Andrey Belevantsev <abel@ispras.ru>
PR target/43603
* haifa-sched.c (sched_create_recovery_edges): Update
dominator info.
* sel-sched-ir.c (maybe_tidy_empty_bb): Update dominator info
after deleting an empty block.
(tidy_control_flow): Also verify dominators.
(sel_remove_bb): Update dominator info after removing a block.
(sel_redirect_edge_and_branch_force): Assert that no unreachable
blocks will be created. Update dominator info.
(sel_redirect_edge_and_branch): Update dominator info when
basic blocks do not become unreachable.
(sel_remove_loop_preheader): Update dominator info.
2010-10-14 Andrey Belevantsev <abel@ispras.ru>
* sel-sched-ir.c (maybe_tidy_empty_bb): Simplify comment.
(tidy_control_flow): Tidy vertical space.
(sel_remove_bb): New variable idx. Use it to remember the basic
block index before deleting the block.
(sel_remove_empty_bb): Remove dead code, simplify and insert to ...
(sel_merge_blocks): ... here.
* sel-sched-ir.h (sel_remove_empty_bb): Remove prototype.
backport: re PR rtl-optimization/46585 (ICE: SIGSEGV in vinsn_create (sel-sched-ir.c:1189) with -fno-dce -fschedule-insns -fselective-scheduling)
Backport from mainline
2010-11-25 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/46585
* sel-sched-ir.c (return_regset_to_pool): Verify that RS is not NULL.
(vinsn_init): Skip computation of dependencies for local NOPs.
(vinsn_delete): Don't try to free regsets for local NOPs.
(setup_nop_and_exit_insns): Change definition of nop_pattern.
backport: re PR rtl-optimization/45652 (gcc.dg/compat/scalar-by-value-3 FAILs with -O2 -fselective-scheduling2)
Backport from mainline
2010-11-22 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/45652
* alias.c (get_reg_base_value): New.
* rtl.h (get_reg_base_value): Add prototype.
* sel-sched.c (init_regs_for_mode): Use it. Don't use registers with
non-null REG_BASE_VALUE for renaming.