1. 02 Jul, 2015 1 commit
  2. 01 Jul, 2015 33 commits
  3. 30 Jun, 2015 6 commits
    • lto-streamer-out.c (class DFS): Adjust hash_scc method. · cec34ee5
      	* lto-streamer-out.c (class DFS): Adjust hash_scc method.
      	(DFS::DFS): Pass this_ref_p and ref_p to hash_scc.
      	(hash_scc): Add this_ref_p and ref_p parameters and pass them
      	to the inner DFS walk.
      
      From-SVN: r225212
      Eric Botcazou committed
    • target-insns.def (jump): New targetm instruction pattern. · ec4a505f
      gcc/
      	* target-insns.def (jump): New targetm instruction pattern.
      	* bb-reorder.c (get_uncond_jump_length): Use targetm.gen_jump
      	instead of gen_jump.
      	(fix_up_crossing_landing_pad): Likewise.
      	(add_labels_and_missing_jumps): Likewise.
      	(fix_crossing_conditional_branches): Likewise.
      	* cfgrtl.c (try_redirect_by_replacing_jump): Likewise.
      	(force_nonfallthru_and_redirect): Likewise.
      	* cse.c (cse_insn): Likewise.
      	* expmed.c (expand_divmod): Likewise.
      	* expr.c (store_expr_with_bounds, expand_expr_real_2): Likewise.
      	* haifa-sched.c (init_before_recovery): Likewise.
      	(sched_create_recovery_edges): Likewise.
      	* ifcvt.c (find_cond_trap): Likewise.
      	* optabs.c (expand_doubleword_shift, expand_doubleword_clz): Likewise.
      	(expand_float, expand_fix): Likewise.
      	* stmt.c (emit_jump): Likewise.
      
      From-SVN: r225211
      Richard Sandiford committed
    • gcc/ · 20fceb31
      	* defaults.h (HAVE_load_multiple, gen_load_multiple)
      	(HAVE_store_multiple, gen_store_multiple): Delete.
      	* target-insns.def (load_multiple, store_multiple): New targetm
      	instruction patterns.
      	* expr.c (move_block_to_reg, move_block_from_reg): Use them instead
      	of HAVE_*/gen_* interface.
      
      From-SVN: r225210
      Richard Sandiford committed
    • gcc/ · ccf5bbdd
      	* defaults.h (HAVE_mem_thread_fence, gen_mem_thread_fence)
      	(HAVE_memory_barrier, gen_memory_barrier, HAVE_mem_signal_fence)
      	(gen_mem_signal_fence): Delete.
      	* target-insns.def (mem_signal_fence, mem_thread_fence)
      	(memory_barrier): New targetm instruction patterns.
      	* optabs.c (expand_mem_thread_fence): Use them instead of HAVE_*/gen_*
      	interface.
      	(expand_mem_signal_fence): Likewise.
      
      From-SVN: r225209
      Richard Sandiford committed
    • defaults.h (HAVE_epilogue, [...]): Delete. · e86a9946
      gcc/
      	* defaults.h (HAVE_epilogue, gen_epilogue): Delete.
      	* target-insns.def (epilogue, prologue, sibcall_prologue): New
      	targetm instruction patterns.
      	* alias.c (init_alias_analysis): Use them instead of HAVE_*/gen_*
      	interface.
      	* calls.c (expand_call): Likewise.
      	* cfgrtl.c (cfg_layout_finalize): Likewise.
      	* df-scan.c (df_get_entry_block_def_set): Likewise.
      	(df_get_exit_block_use_set): Likewise.
      	* dwarf2cfi.c (pass_dwarf2_frame::gate): Likewise.
      	* final.c (final_start_function): Likewise.
      	* function.c (thread_prologue_and_epilogue_insns): Likewise.
      	(reposition_prologue_and_epilogue_notes): Likewise.
      	* reorg.c (find_end_label): Likewise.
      	* toplev.c (process_options): Likewise.
      
      From-SVN: r225208
      Richard Sandiford committed
    • jit: add switch statements · ec5d0088
      gcc/ChangeLog:
      	* typed-splay-tree.h: New file.
      
      gcc/jit/ChangeLog:
      	* docs/cp/topics/functions.rst (Blocks): Add switch statements to
      	list of ways to terminate a block.
      	(gccjit::block::end_with_switch): Add function description.
      	(gccjit::case_): Add class.
      	(gccjit::context::new_case): Add function description.
      	* docs/cp/topics/objects.rst: Add "case_" to class hierarchy.
      	* docs/topics/compatibility.rst (LIBGCCJIT_ABI_3): New.
      	* docs/topics/functions.rst (Blocks): Add switch statements to
      	list of ways to terminate a block.
      	(gcc_jit_block_end_with_switch): Add function description.
      	(gcc_jit_case): Add type.
      	(gcc_jit_context_new_case): Add function description.
      	(gcc_jit_case_as_object): Add function description.
      	* docs/topics/objects.rst: Add gcc_jit_case to class hierarchy.
      	* docs/_build/texinfo/libgccjit.texi: Regenerate.
      	* jit-common.h (gcc::jit::recording::case_): Add forward decl.
      	(gcc::jit::playback::case_): Add forward decl.
      	* jit-playback.c (add_case): New function.
      	(gcc::jit::playback::block::add_switch): New function.
      	* jit-playback.h (gcc::jit::playback::case_): New struct.
      	(gcc::jit::playback::block::get_function): New method.
      	(gcc::jit::playback::block::add_switch): New method.
      	* jit-recording.c: Within namespace gcc::jit...
      	(recording::context::new_case): New method.
      	(recording::function::validate): Update for change to
      	get_successor_blocks.
      	(recording::block::end_with_switch): New method.
      	(recording::block::get_successor_blocks): Update to support an
      	arbitrary number of successor blocks.
      	(recording::block::dump_edges_to_dot): Likewise.
      	(memento_of_new_rvalue_from_const <int>::get_wide_int): New.
      	(memento_of_new_rvalue_from_const <long>::get_wide_int): New.
      	(memento_of_new_rvalue_from_const <double>::get_wide_int): New.
      	(memento_of_new_rvalue_from_const <void *>::get_wide_int): New.
      	(recording::statement::get_successor_blocks): Update to support an
      	arbitrary number of successor blocks.
      	(recording::conditional::get_successor_blocks): Likewise.
      	(recording::jump::get_successor_blocks): Likewise.
      	(recording::return_::get_successor_blocks): Likewise.
      	(recording::case_::write_reproducer): New.
      	(recording::case_::make_debug_string): New.
      	(recording::switch_::switch_): New.
      	(recording::switch_::replay_into): New.
      	(recording::switch_::get_successor_blocks): New.
      	(recording::switch_::make_debug_string): New.
      	(recording::switch_::write_reproducer): New.
      	* jit-recording.h: Within namespace gcc::jit::recording...
      	(context::new_case): New.
      	(rvalue::is_constant): New.
      	(rvalue::get_wide_int): New.
      	(block::end_with_switch): New.
      	(block::get_successor_blocks): Update to support an arbitrary
      	number of successor blocks.
      	(memento_of_new_rvalue_from_const::is_constant): New.
      	(memento_of_new_rvalue_from_const::get_wide_int): New.
      	(statement::get_successor_blocks): Update to support an arbitrary
      	number of successor blocks.
      	(conditional::get_successor_blocks): Likewise.
      	(jump::get_successor_blocks): Likewise.
      	(return_::get_successor_blocks): Likewise.
      	(case_): New subclass of memento.
      	(switch_): New subclass of statement.
      	* libgccjit++.h (gccjit::case_): New subclass of gccjit::object.
      	(gccjit::context::new_case): New method.
      	(gccjit::block::end_with_switch): New method.
      	(gccjit::case_::case): New ctors.
      	(gccjit::case_::get_inner_case): New method.
      	* libgccjit.c: Include "typed-splay-tree.h"
      	(struct gcc_jit_case): New.
      	(gcc_jit_context_new_case): New function.
      	(gcc_jit_case_as_object): New function.
      	(valid_dest_for_switch): New function.
      	(valid_case_for_switch): New function.
      	(class api_call_validator): New class.
      	(class case_range_validator): New class.
      	(case_range_validator::case_range_validator): New.
      	(case_range_validator::validate): New.
      	(case_range_validator::case_compare): New.
      	(case_range_validator::get_wide_int): new.
      	(gcc_jit_block_end_with_switch): New.
      	* libgccjit.h: Add gcc_jit_case to class hierarchy comment.
      	(gcc_jit_case): New typedef.
      	(gcc_jit_context_new_case): New function.
      	(gcc_jit_case_as_object): New function.
      	(gcc_jit_block_end_with_switch): New function.
      	(LIBGCCJIT_HAVE_SWITCH_STATEMENTS): New.
      	* libgccjit.map: Add gcc_jit_block_end_with_switch,
      	gcc_jit_case_as_object and gcc_jit_context_new_case.
      
      gcc/testsuite/ChangeLog:
      	* jit.dg/all-non-failing-tests.h: Add test-switch.c.
      	* jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c: New
      	testcase.
      	* jit.dg/test-error-gcc_jit_block_end_with_switch-mismatching-case-type.c:
      	New testcase.
      	* jit.dg/test-error-gcc_jit_block_end_with_switch-overlapping-ranges.c:
      	New testcase.
      	* jit.dg/test-error-gcc_jit_context_new_case-non-const-label.c:
      	New testcase.
      	* jit.dg/test-error-gcc_jit_context_new_case-non-integer-type.c:
      	New testcase.
      	* jit.dg/test-error-gcc_jit_context_new_case-reversed-endpoints.c:
      	New testcase.
      	* jit.dg/test-switch.c: New testcase.
      	* jit.dg/test-switch.cc: New testcase.
      
      From-SVN: r225207
      David Malcolm committed