aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
AgeCommit message (Collapse)AuthorFilesLines
2012-08-02Revert "PR 34548"Richard Henderson1-7/+0
This reverts commit 190051. From-SVN: r190110
2012-08-01re PR middle-end/34548 (GCC generates too many alignment adds for alloca)Richard Henderson1-0/+7
PR 34548 * function.h (struct rtl_data): Add max_dynamic_stack_alignment. * cfgexpand.c (gimple_expand_cfg): Initialise it. * explow.c (allocate_dynamic_stack_space): Set it. Simplify alignment requirements given the known alignment of dynamic_offset. * function.c (instantiate_virtual_regs): Align dtnamic_offset. From-SVN: r190051
2012-07-19re PR rtl-optimization/53942 (unable to find a register to spill in class ↵Jakub Jelinek1-2/+17
'CREG') PR rtl-optimization/53942 * function.c (assign_parm_setup_reg): Avoid zero/sign extension directly from likely spilled non-fixed hard registers, move them to pseudo first. * gcc.dg/pr53942.c: New test. From-SVN: r189681
2012-07-16function.c (stack_protect_epilogue): Use expand_call to expand ↵Steven Bosscher1-1/+2
targetm.stack_protect_fail. * function.c (stack_protect_epilogue): Use expand_call to expand targetm.stack_protect_fail. * stmt.c (expand_expr_stmt): Remove now-unused function. * tree.h (expand_expr_stmt): Remove prototype. * doc/tm.texi.in (TARGET_STACK_PROTECT_FAIL): Document that this hook must return a CALL_EXPR. * doc/tm.texi: Regenerate. From-SVN: r189522
2012-07-16system.h (dump_file): Do not define.Steven Bosscher1-1/+0
gcc/ * system.h (dump_file): Do not define. * tree-pass.h: Include dumpfile.h, which is a new file containing... (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name, dump_file, dump_flags, dump_file_name, get_dump_file_info, struct dump_file_info): all of this, moved to... * dumpfile.h: Here, new file. * tree-dump.h: Include dumpfile.h, but not tree-pass.h. (dump_stmt): Remove prototype for C++ specific function. (dump_enumerated_decls): Move prototype from here... * tree-flow.h (dump_enumerated_decls): ... to here. (get_ref_base_and_extent) Move prototype from here ... * tree.h (get_ref_base_and_extent) ... to here. * tree-ssa-live.c: Do not inclde tree-pretty-print.h, because gimple-pretty-print.h is enough. Do not include tree-dump.h, include timevar.h and dumpfile.h instead. (struct numbered_tree_d, compare_decls_by_uid, dump_enumerated_decls_push, dump_enumerated_decls): Move from here ... * tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid, dump_enumerated_decls_push, dump_enumerated_decls):... to here. Do not include timevar.h. * tree.c: Do not include timevar.h. * tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and timevar.h. (dump_cfg_stats): Use current_function_name. (gimple_cfg2vcg): Likewise. (dump_function_to_file): Likewise. * df-scan.c: Do not include tree-pass.h and timevar.h. Include dumpfile.h. (df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not use print_current_pass. * df-problems.c: Include dumpfile.h. Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it leads to errors in the code not selected. (df_note_compute): Do not print_rtl_with_bb here. Fix compilation bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here. * lcm.c: Include dumpfile.h. Remove obsolete include of insn-attr.h. * dojump.c (do_compare_rtx_and_jump): Remove failure printing for missing probability notes. * stmt.c: Include dumpfile.h. (emit_case_decision_tree): Re-enable printing expand details only if TDF_DETAILS. * alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, function.c, fwprop.c, gcse.c, gimple-fold.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-interchange.c, graphite-optimize-isl.c, graphite-poly.c, graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, loop-unroll.c, loop-unswitch.c, lower-subreg.c, lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, store-motion.c, tracer.c, trans-mem.c, tree-affine.c, tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, tree-data-ref.c, tree-diagnostic.c, tree-dump.c, tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, tree-mudflap.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-ssa-uncprop.c, tree-ssa-uninit.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-loop.c, tree-vect-loop-manip.c, tree-vectorizer.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h only if needed. If tree-pass.h is included, do not include timevar.h and dumpfile.h. If tree-pass.h is not included but dump_file, or dump_flags, or the TDF_* flags are used, include dumpfile.h. If gimple-pretty-print.h is included, don't include tree-pretty-print.h. Remove assorted unnecessary includes. * config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c, config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c, config/spu/spu.c, config/mep/mep.c, config/i386/i386.c: Include dumpfile.h. * config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h. * arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep, spu/t-spu-elf: Fix dependencies. c-family/ * c-gimplify.c: Include dumpfile.h instead of tree-dump.h. * c-ada-spec.c: Likewise. * c-dump.c (dump_stmt): Move to cp/dump.c, the only user. c/ * c-decl.c: Include dumpfile.h instead of tree-dump.h. * Make-lang.in: Fix dependencies. cp/ * dump.c (dump_stmt): Moved here from c-dump.c. * optimize.c: Include dumpfile.h instead of tree-dump.h. * class.c: Likewise. * decl2.c: Likewise. * Make-lang.in: Fix dependencies. fortran/ * f95-lang.c: Include dumpfile.h instead of tree-dump.h. * Make-lang.in: Fix dependencies. java/ * java-gimplify.c Include dumpfile.h instead of tree-dump.h * Make-lang.in: Fix dependencies. lto/ * lto.c: Do not include timevar.h. * Make-lang.in: Fix dependencies. ada/ * gcc-interface/utils.c: Include timevar.h. * Make-lang.in: Fix dependencies. From-SVN: r189519
2012-07-08basic-block.h: Re-group most prototypes per file.Steven Bosscher1-3/+10
gcc/ * basic-block.h: Re-group most prototypes per file. (struct edge_list): Remove num_blocks field. (dump_bb_info): Adjust prototypes. (dump_reg_info): Move prototype to regs.h. * function.h: Do not include tree.h. Include vec.h, vecir.h, input.h and machmode.h to compensate. (function_name): New prototype. * gimple.h: Include tree.h to compensate for basic-block.h change. * langhooks.h: Note that tree.h is only necessary for enum tree_code. * regs.h (dump_reg_info): Prototype here. * regset.h: Adjust file reference in comment. (debug_regset): Remove prototype. * rtl.h: Include flags.h for flag_var_tracking_assignments. (MAY_HAVE_DEBUG_INSNS): Define as flag_var_tracking_assignments instead of no-longer-available tree.h's MAY_HAVE_DEBUG_STMTS. (dump_reg_info, dump_flow_info): Remove prototypes. * bb-reorder.c (set_edge_can_fallthru_flag): Move from cfganal.c to here, the only user. Make static. (reorder_basic_blocks): Call dump_reg_info before dump_flow_info. * cfg.c: Do not include tm.h, tree.h, rtl.h, hard-reg-set.h, regs.h, flags.h, function.h, except.h, diagnostic-core.h, tm_p.h, timevar.h, tree-pass.h, cfgloop.h, and tree-flow.h. Include basic-block.h, the first header I'd expect to be included. (reg_obstack): Move to df-core.c. (free_edge): Remove bogus ATTRIBUTE_UNUSED. (remove_edge_raw): Do not call tree-ssa's redirect_edge_var_map_clear. (redirect_edge_succ_nodup): Move to cfghooks.c. (dump_regset, debug_regset): Move to df-core.c. (dump_bb_info): Move to cfgrtl.c. (dump_reg_info): Move to regstat.c. (dump_flow_info): Move to cfgrtl.c. (debug_flow_info): Likewise. (dump_edge_info): Do not look at cfun, a CFG without cfun is nonsense. * cfganal.c: Do not include tm.h, rtl.h, obstack.h, hard-reg-set.h, insn-config.h, recog.h, diagnostic-core.h, tm_p.h, and cfgloop.h. (flow_active_insn_p, forwarder_block_p, can_fallthru, could_fall_through): Move to cfgrtl.c. (set_edge_can_fallthru_flag): Moved to bb-reorder.c. (create_edge_list): Do not set edge_list's removed num_blocks. (print_edge_list): Look at n_basic_blocks instead of num_blocks. (flow_nodes_print): Remove. (flow_edge_list_print): Remove. (inverted_post_order_compute): Use FOR_ALL_BB. *cfgrtl.c (dump_flow_info): Moved from cfg.c. Do not call dump_reg_info. (debug_flow_info): Moved from cfg.c (dump_bb_info): Moved from cfg.c. Take 'verbose' argument to avoid looking at TDF_* flags from tree-pass.h. (flow_active_insn_p, forwarder_block_p, can_fallthru, could_fall_through): Moved from cfganal.c. (print_rtl_with_bb): Adjust dump_bb_info calls. * cfghooks.c (redirect_edge_succ_nodup): Moved from cfg.c. (remove_edge): Call redirect_edge_var_map_clear if IR_GIMPLE. (cfgcleanup.c): Look at MAY_HAVE_DEBUG_INSNS, not MAY_HAVE_DEBUG_STMTS. * cselib.c: Include tree.h with a FIXME. * df-core.c (reg_obstack): Moved from cfg.c. (dump_regset): Likewise. (debug_regset): Likewise. Make a DEBUG_FUNCTION. * final.c (compute_alignments): Call dump_reg_info before dump_flow_info. * function.c (function_name): New function. (current_function_name): Use it. * ifcvt.c (rest_of_handle_if_conversion): Call dump_reg_info before dump_flow_info. * ira-conflicts.c: Include tree.h with a note. * regstat.c (dump_reg_info): Moved here from cfg.c. * loop-init.c: Include regs.h instead of hard-reg-set.h. (rtl_loop_init): Call dump_reg_info before dump_flow_info. (rtl_loop_done): Likewise. * mcf.c: Include tree.h before langhooks.h. * predict.c (maybe_hot_count_p): Assert we have cfun. (probably_never_executed_bb_p): Likewise. * profile.c (compute_branch_probabilities): Use gimple_dump_cfg instead of dump_flow_info. * sched-deps.c: Include tree.h with a FIXME. (call_may_noreturn_p): Add FIXME note why this function has to look at function decls instead of function decl flags. * sched-vis.c: Include tree.h with a FIXME. (print_rtl_slim): Adjust dump_bb_info uses. * statistics.c (statistics_fini_pass_2): Use current_function_name to avoid including tree.h. (statistics_counter_event): Use function_name for the same reason. (statistics_histogram_event): Likewise. * tracer.c (tracer): Remove bogus gcc_assert. Use brief_dump_cfg instead of dump_flow_info. * var-tracking.c (variable_tracking_main_1): Call dump_reg_info before dump_flow_info. * doc/cfg.texi: Update CFG documentation. * Makefile.in (RTL_H): Depend on FLAGS_H. (GIMPLE_H): Depend on TREE_H. (FUNCTION_H): Depend on VEC_H, vecir.h, INPUT_H and MACHMODE_H, but no longer on TREE_H. (C_COMMON_H): Depend on TREE_H. (cselib.o, cse.o, cfganal.o, loop-init.o, ira-conflicts.o, sched-deps.o, sched-vis.o): Fixup dependencies. c-family/ * c-common.h: Include tree.h. cp/ * decl.c (cp_finish_decl): Add FIXME at add_local_decl call site. From-SVN: r189359
2012-06-24output.h: (current_function_is_leaf...Steven Bosscher1-17/+1
* output.h: (current_function_is_leaf, current_function_sp_is_unchanging, current_function_uses_only_leaf_regs): Remove. * function.c (current_function_is_leaf, current_function_sp_is_unchanging, current_function_uses_only_leaf_regs): Remove. (rest_of_handle_check_leaf_regs): Set crtl->uses_only_leaf_regs instead of current_function_uses_only_leaf_regs. * function.h (struct rtl_data): New fields sp_is_unchanging, is_leaf, uses_only_leaf_regs. * resource.c (init_resource_info): Replace current_function_is_leaf, current_function_sp_is_unchanging, and current_function_uses_only_leaf_regs with new crtl fields. * sdbout.c (sdbout_symbol): Likewise. * df-core.c (rest_of_handle_df_initialize): Likewise. * ira.c (ira): Likewise. * final.c (final_start_function): Likewise. * reorg.c (fill_simple_delay_slots): Likewise. * regrename.c (check_new_reg_p): Likewise. * stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise. (notice_stack_pointer_modification): Likewise. * dbxout.c (dbxout_symbol): Likewise. (dbxout_parms): Likewise. * sel-sched.c (init_regs_for_mode): Likewise. * dwarf2out.c (dbx_reg_number): Likewise. (multiple_reg_loc_descriptor): Likewise. * config/i386/i386.c (ix86_frame_pointer_required): Likewise. (gen_pop): Likewise. (ix86_select_alt_pic_regnum): Likewise. (ix86_compute_frame_layout): Likewise. (ix86_finalize_stack_realign_flags): Likewise. (ix86_expand_epilogue): Likewise. * config/rs6000/rs6000.c (rs6000_stack_info): Likewise. * config/h8300/h8300.c (byte_reg): Likewise. * config/c6x/c6x.c (must_reload_pic_reg_p): Likewise. (c6x_save_reg): Likewise. (c6x_compute_frame_layout): Likewise. * config/pa/pa.c (pa_compute_frame_size): Likewise. (pa_output_function_prologue): Likewise. * config/stormy16/stormy16.c (struct xstormy16_stack_layout): Likewise. * config/sparc/sparc.md (attr "leaf_function"): Likewise. * config/sparc/sparc.c (sparc_initial_elimination_offset): Likewise. (sparc_expand_prologue): Likewise. (sparc_flat_expand_prologue): Likewise. (sparc_asm_function_prologue): Likewise. (sparc_output_mi_thunk): Likewise. (sparc_frame_pointer_required): Likewise. * config/epiphany/epiphany.c (epiphany_compute_function_type): Likewise. (epiphany_compute_frame_size): Likewise. * config/lm32/lm32.c (lm32_compute_frame_size): Likewise. * config/cris/cris.c (cris_md_asm_clobbers): Likewise. (cris_frame_pointer_required): Likewise. * config/tilepro/tilepro.c (emit_sp_adjust): Likewise. (tilepro_current_function_is_leaf): Likewise. * config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Likewise. * config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise. * config/ia64/ia64.c (find_gr_spill): Likewise. (ia64_compute_frame_size): Likewise. (ia64_can_eliminate): Likewise. (ia64_initial_elimination_offset): Likewise. * config/m68k/m68k.c (m68k_save_reg): Likewise. (m68k_expand_epilogue): Likewise. * config/rx/rx.c (rx_get_stack_layout): Likewise. * config/tilegx/tilegx.c (tilegx_current_function_is_leaf): Likewise. * config/picochip/picochip.c (picochip_can_eliminate_link_sp_save): Likewise. (picochip_output_frame_debug): Likewise. * config/sh/sh.c (sh_media_register_for_return): Likewise. (sh_allocate_initial_value): Likewise. (sh_output_mi_thunk): Likewise. * config/microblaze/microblaze.c (microblaze_must_save_register): Likewise. (compute_frame_size): Likewise. (microblaze_initial_elimination_offset): Likewise. (microblaze_expand_prologue): Likewise. (microblaze_expand_epilogue): Likewise. * config/frv/frv.c (frv_expand_epilogue): Likewise. (frv_frame_pointer_required): Likewise. * config/spu/spu.c (get_pic_reg): Likewise. (direct_return): Likewise. (spu_expand_prologue): Likewise. (spu_expand_epilogue): Likewise. (spu_initial_elimination_offset): Likewise. * config/mips/mips.c (mips_global_pointer): Likewise. (mips_cfun_might_clobber_call_saved_reg_p): Likewise. (mips_compute_frame_info): Likewise. * config/mep/mep.c (mep_interrupt_saved_reg): Likewise. (mep_reload_pointer): Likewise. * config/rl78/rl78.c (need_to_save): Likewise. * config/cr16/cr16.c (cr16_compute_save_regs): Likewise. * config/score/score.c (score_compute_frame_size): Likewise. (score_function_prologue): Likewise. * config/bfin/bfin.c (must_save_p): Likewise. (expand_prologue_reg_save): Likewise. (expand_epilogue_reg_restore): Likewise. (bfin_frame_pointer_required): Likewise. (n_regs_saved_by_prologue): Likewise. (add_to_reg): Likewise. (expand_interrupt_handler_prologue): Likewise. (expand_interrupt_handler_epilogue): Likewise. (bfin_expand_prologue): Likewise. * config/avr/avr.c (avr_regs_to_save): Likewise. (avr_prologue_setup_frame): Likewise. (expand_epilogue): Likewise. * config/s390/s390.c (s390_regs_ever_clobbered): Likewise. (s390_register_info): Likewise. (s390_frame_info): Likewise. (s390_init_frame_layout): Likewise. (s390_emit_prologue): Likewise. From-SVN: r188918
2012-06-17cfglayout.h: Remove.Steven Bosscher1-5/+0
2012-06-17 Steven Bosscher <steven@gcc.gnu.org> * cfglayout.h: Remove. * cfglayout.c: Remove. * function.h (struct function): Remove x_last_location field. * function.c: Do not include cfglayout.h. (expand_function_start): Do not call no-op force_next_line_note. (expand_function_end): Likewise. * cfgrtl.c: Do not include cfglayout.h. Include gt-cfgrtl.h. (unlink_insn_chain): Moved here from cfglayout.c. (skip_insns_after_block, label_for_bb, record_effective_endpoints, into_cfg_layout_mode, outof_cfg_layout_mode, pass_into_cfg_layout_mode, pass_outof_cfg_layout_mode, relink_block_chain, fixup_reorder_chain, verify_insn_chain, fixup_fallthru_exit_predecessor, force_one_exit_fallthru, cfg_layout_can_duplicate_bb_p, duplicate_insn_chain, cfg_layout_duplicate_bb, cfg_layout_initialize, break_superblocks, cfg_layout_finalize): Likewise. (rtl_can_remove_branch_p): Likewise. * rtl.h (insn_scope): Move prototype from cfglayout.h here. (duplicate_insn_chain): Likewise. (force_next_line_note): Remove prototype. * emit-rtl.c: Do not include tree-flow.h, egad. Include vecprim.h. (last_location): Remove #define to emit.x_last_location. (force_next_line_note): Remove no-op function. (init_emit): Don't set x_last_location. (block_locators_locs, block_locators_blocks, locations_locators_locs, locations_locators_vals, prologue_locator, epilogue_locator, curr_location, last_location, curr_block, last_block, curr_rtl_loc): Move POD to here from cfglayout.c. (insn_locators_alloc, insn_locators_finalize, insn_locators_free, set_curr_insn_source_location, get_curr_insn_source_location, set_curr_insn_block, get_curr_insn_block, curr_insn_locator, locator_scope, insn_scope, locator_location, locator_line, insn_line, locator_file, insn_file, locator_eq): Move to here from cfglayout.c. * cfghooks.h: Remove double-include protection. (can_copy_bbs_p, copy_bbs): Move prototypes from cfglayout.h to here. * cfghooks.c (can_copy_bbs_p, copy_bbs): Move to here from cfglayout.c. * final.c: Do not include cfglayout.h. (choose_inner_scope, change_scope): Move to here from cfglayout.c. (reemit_insn_block_notes): Likewise. Make static. * tree-flow.h (tree_could_trap_p, operation_could_trap_helper_p, operation_could_trap_p, tree_could_throw_p): Move from here... * tree.h: ... to here. * gengtype.c (open_base_files): Remove cfglayout.h from the list. * profile.c: Do not include cfghooks.h. * cfgloopmanip.c: Do not include cfglayout.h and cfghooks.h. * modulo-sched.c: Likewise. * loop-unswitch.c: Do not include cfglayout.h. * sched-ebb.c: Likewise. * tracer.c: Likewise. * ddg.c: Likewise. * tree-vect-loop-manip.c: Likewise. * loop-init.c: Likewise. * dwarf2out.c: Likewise. * hw-doloop.c: Likewise. * loop-unroll.c: Likewise. * cfgcleanup.c: Likewise. * bb-reorder.c: Likewise. * sched-rgn.c: Likewise. * tree-cfg.c: Likewise. * config/alpha/alpha.c: Likewise. * config/spu/spu.c: Likewise. * config/sparc/sparc.c: Likewise. * config/sh/sh.c: Likewise. * config/c6x/c6x.c: Likewise. * config/ia64/ia64.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/score/score.c: Likewise. * config/mips/mips.c: Likewise. * config/bfin/bfin.c: Likewise. * Makefile.in (CFGAYOUT_H): Remove, and fixup users. * config/rs6000/t-rs6000 (rs6000.o): Do not depend on cfglayout.h. * config/spu/t-spu-elf (spu.o: $): Likewise. * config/sparc/t-sparc (sparc.o): Do not depend on CFGLAYOUT_H. From-SVN: r188712
2012-06-15re PR middle-end/38474 (compile time explosion in ↵Michael Matz1-5/+12
dataflow_set_preserve_mem_locs at -O3) PR middle-end/38474 * cfgexpand.c (add_alias_set_conflicts): Remove. (expand_used_vars): Don't call it. (aggregate_contains_union_type): Remove. * function.c (n_temp_slots_in_use): New static data. (make_slot_available, assign_stack_temp_for_type): Update it. (init_temp_slots): Zero it. (remove_unused_temp_slot_addresses): Use it for quicker removal. (remove_unused_temp_slot_addresses_1): Use htab_clear_slot. From-SVN: r188667
2012-06-15re PR middle-end/53590 (compiler fails to generate SIMD instruction for FP ↵Eric Botcazou1-0/+1
division) PR middle-end/53590 * common.opt (-fdelete-dead-exceptions): New switch. * doc/invoke.texi (Code Gen Options): Document it. * cse.c (count_reg_usage) <CALL_INSN>: Use !insn_nothrow_p in lieu of insn_could_throw_p predicate. Do not skip an insn that could throw if dead exceptions can be deleted. (insn_live_p): Likewise, do not return true in that case. * dce.c (can_alter_cfg): New flag. (deletable_insn_p): Do not return false for an insn that can throw if the CFG can be altered and dead exceptions can be deleted. (init_dce): Set can_alter_cfg to false for fast DCE, true otherwise. * dse.c (scan_insn): Use !insn_nothrow_p in lieu of insn_could_throw_ predicate. Do not preserve an insn that could throw if dead exceptions can be deleted. * function.h (struct function): Add can_delete_dead_exceptions flag. * function.c (allocate_struct_function): Set it. * lto-streamer-in.c (input_struct_function_base): Stream it. * lto-streamer-out.c (input_struct_function_base): Likewise. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Do not mark a statement that could throw as necessary if dead exceptions can be deleted. ada/ * gcc-interface/misc.c (gnat_init_options_struct): Set opts->x_flag_delete_dead_exceptions to 1. From-SVN: r188651
2012-05-29integrate.c: Remove.Steven Bosscher1-1/+127
* integrate.c: Remove. * integrate.h: Remove. * Makefile.in: Remove make rules for integrate.c and INTEGRATE_H. * config/arm/t-arm: Remove INTEGRATE_H dependency for target files. * config/rs6000/t-rs6000: Likewise * config/spu/t-spu-elf: Likewise. * function.h (get_hard_reg_initial_val, has_hard_reg_initial_val, get_hard_reg_initial_reg, emit_initial_value_sets): Move prototypes from integrate.h to here. (initial_value_entry): New prototype. * reload.h (allocate_initial_values): Remove prototype. * tree.h (set_decl_abstract_flags, set_decl_origin_self): Likewise. * cse.c (fixed_base_plus_p): Don't handle virtual registers for integrate.c. * dwarf2out.c (set_decl_origin_self, set_block_origin_self, set_decl_abstract_flags, set_block_abstract_flags): Move from integrate.c to here, the only user. * expmed.c (extract_fixed_bit_field): Remove outdated comment about integrate.c. * function.c: Don't include integrate.h. (struct initial_value_pair, struct initial_value_struct, get_hard_reg_initial_val, has_hard_reg_initial_val, get_hard_reg_initial_reg, emit_initial_value_sets): Move from integrate.c to here. (initial_value_entry): New function. * genemit.c (main): Don't print integrate.h include line. * ira.c: Don't include integrate.h. (allocate_initial_values): Move from integrate.c to here. (ira): Update allocate_initial_values call. * tree-inline.c: Don't include integrate.h. (function_attribute_inlinable_p): Moved from integrate.c to here. * cfgexpand.c: Don't include integrate.h. * except.c: Likewise. * langhooks.c: Likewise. * passes.c: Likewise. * toplev.c: Likewise. * config/frv/frv.c: Likewise. * config/pa/pa.c: Likewise. * config/spu/spu.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/mep/mep.c: Likewise. * config/score/score.c: Likewise. * config/picochip/picochip.c: Likewise. * config/sh/sh.c: Likewise. * config/alpha/alpha.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/v850/v850.c: Likewise. * config/mmix/mmix.c: Likewise. * config/bfin/bfin.c: Likewise. * config/arm/arm.c: Likewise. * config/s390/s390.c: Likewise. * config/m32r/m32r.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/c6x/c6x.c: Include function.h instead of integrate.h. * config/tilegx/tilegx.c: Likewise. * config/tilepro/tilepro.c: Likewise. From-SVN: r187969
2012-05-29rtl.h (assign_stack_temp, [...]): Remove 'keep' argument.Michael Matz1-122/+18
* rtl.h (assign_stack_temp, assign_stack_temp_for_type, assign_temp): Remove 'keep' argument. (mark_temp_addr_taken): Remove prototype. * tree.h (expand_decl): Remove prototype. * function.c (struct temp_slot): Remove addr_taken and keep member. (assign_stack_temp_for_type) Don't initialize above, remove keep argument. (assign_stack_temp, assign_temp): Remove keep argument. (mark_temp_addr_taken): Remove. (preserve_temp_slots): Remove handling of addr_taken and keep members. (free_temp_slots): Ditto. * expr.c (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Remove dead code. * stmt.c (expand_asm_operands): Remove dead code. (expand_decl): Remove. * c-decl.c (finish_struct): Don't call expand_decl. * builtins.c (expand_builtin_cexpi): Adjust calls to assign_temp and assign_stack_temp. * calls.c (save_fixed_argument_area, initialize_argument_information, expand_call, emit_library_call_value_1, store_one_arg): Ditto. * expmed.c (extract_bit_field_1): Ditto. * expr.c (emit_group_load_1, emit_group_store, copy_blkmode_from_reg, emit_push_insn, expand_assignment, store_field, expand_constructor, expand_cond_expr_using_cmove, expand_expr_real_2, expand_expr_real_1): Ditto. * stmt.c (expand_asm_operands, expand_return): Ditto. * function.c (pop_temp_slots): Call free_temp_slots. * calls.c (store_one_arg): Don't call preserve_temp_slots or free_temp_slots. * expr.c (expand_assignment): Don't call free_temp_slots. * config/arm/arm.c (neon_expand_vector_init): Ditto. * config/i386/i386.c (ix86_expand_vector_set): Ditto. (ix86_expand_vector_extract): Ditto. * config/ia64/ia64.c (spill_xfmode_rfmode_operand, ia64_expand_movxf_movrf): Ditto. * config/mips/mips.c (mips_expand_vi_general): Ditto. * config/mmix/mmix.md (floatdisf2, floatunsdisf2, truncdfsf2, extendsfdf2): Ditto. * config/rs6000/rs6000.c (rs6000_expand_vector_init, rs6000_expand_vector_set, rs6000_expand_vector_extract, rs6000_allocate_stack_temp): Ditto. * config/rs6000/rs6000.md (fix_trunctfsi2_fprs): Ditto. * config/sparc/sparc.c (emit_soft_tfmode_libcall, sparc_emit_float_lib_cmp, sparc_emit_float_lib_cmp, sparc_expand_vector_init): Ditto. From-SVN: r187965
2012-05-29expr.c (expand_expr_real_1 <normal_inner_ref>): Don't allocate a kept temp.Michael Matz1-4/+1
* expr.c (expand_expr_real_1 <normal_inner_ref>): Don't allocate a kept temp. (expand_expr_real_1 <COMPOUND_LITERAL_EXPR>): Make unreachable. * gimple-fold.c (canonicalize_constructor_val): Canonicalize COMPOUND_LITERAL_EXPR. * function.c (expand_function_start): Don't call expand_decl, instead assert that we have RTL assigned. * tree-ssa-live.c (remove_unused_locals): Clear nonlocal_goto_save_area if its backing variable is removed. * stmt.c (expand_asm_operands): Remove handling of non-lvalues as mem inputs. (expand_decl): Assert that this does nothing. * calls.c (expand_call): Don't call mark_temp_addr_taken. * c-tree.h (c_expand_decl): Remove prototype. c-family/ * c-common.h (c_expand_decl): Remove prototype. ada/ * gcc-interface/utils.c (create_var_decl_1): Don't call expand_decl. From-SVN: r187962
2012-05-12function.c (requires_stack_frame_p): If the function can throw non-call ↵Eric Botcazou1-0/+4
exceptions... * function.c (requires_stack_frame_p): If the function can throw non-call exceptions, return true if the insn can throw internally. From-SVN: r187429
2012-05-05rtl.h (plus_constant, [...]): Merge into a single plus_constant function.Richard Sandiford1-4/+4
gcc/ * rtl.h (plus_constant, plus_constant_mode): Merge into a single plus_constant function. * explow.c (plus_constant, plus_constant_mode): Likewise. Assert that the mode is sensible. (use_anchored_address, round_push, allocate_dynamic_stack_space) (probe_stack_range, anti_adjust_stack_and_probe): Update calls to plus_constant. * alias.c (canon_rtx): Likewise. (init_alias_analysis): Likewise. * builtins.c (expand_builtin_return_addr) (expand_builtin_setjmp_setup, expand_builtin_longjmp) (expand_builtin_nonlocal_goto, expand_builtin_update_setjmp_buf) (expand_builtin_apply_args_1, expand_builtin_apply, expand_movstr) (expand_builtin_stpcpy): Likewise. * calls.c (save_fixed_argument_area, restore_fixed_argument_area) (compute_argument_addresses, internal_arg_pointer_based_exp) (expand_call, emit_library_call_value_1): Likewise. * cfgexpand.c (expand_one_stack_var_at, expand_debug_expr): Likewise. * combine-stack-adj.c (try_apply_stack_adjustment): Likewise. * combine.c (combine_simplify_rtx, force_to_mode): Likewise. * cse.c (insert_const_anchor, find_reg_offset_for_const) (use_related_value, fold_rtx): Likewise. * cselib.c (cselib_subst_to_values): Likewise. * dse.c (record_store, check_mem_read_rtx): Likewise. * dwarf2out.c (rtl_for_decl_location, gen_variable_die): Likewise. * emit-rtl.c (adjust_address_1): Likewise. * except.c (sjlj_emit_function_enter) (expand_builtin_extract_return_addr) (expand_builtin_frob_return_addr): Likewise. * expmed.c (expand_divmod): Likewise. * expr.c (move_by_pieces, store_by_pieces, store_by_pieces_1) (emit_move_resolve_push, push_block, emit_push_insn, store_expr) (expand_expr_addr_expr_1, expand_expr_real_1): Likewise. * function.c (assign_stack_local_1) (instantiate_virtual_regs_in_rtx): Likewise. * optabs.c (prepare_cmp_insn): Likewise. * recog.c (offsettable_address_addr_space_p): Likewise. * reload.c (find_reloads_address, form_sum) (find_reloads_subreg_address): Likewise. * reload1.c (init_reload, eliminate_regs_1) (eliminate_regs_in_insn): Likewise. * simplify-rtx.c (simplify_unary_operation_1) (simplify_binary_operation_1, simplify_plus_minus): Likewise. * var-tracking.c (compute_cfa_pointer, prepare_call_arguments) (vt_add_function_parameter): Likewise. * config/alpha/alpha.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/vms.h (EH_RETURN_HANDLER_RTX): Likewise. * config/alpha/alpha.c (alpha_legitimize_address_1) (get_unaligned_address, alpha_expand_unaligned_load) (alpha_expand_unaligned_store, alpha_expand_unaligned_load_words) (alpha_expand_unaligned_store_words, alpha_expand_block_clear) (alpha_expand_builtin_establish_vms_condition_handler) (alpha_setup_incoming_varargs, emit_frame_store_1) (alpha_expand_prologue, alpha_expand_epilogue) (alpha_use_linkage): Likewise. * config/alpha/alpha.md: Likewise. * config/arm/arm.c (arm_trampoline_init, legitimize_pic_address) (arm_load_pic_register, arm_pic_static_addr, arm_legitimize_address) (thumb_legitimize_address, arm_gen_load_multiple_1) (arm_gen_store_multiple_1, arm_gen_multiple_op, gen_ldm_seq) (gen_stm_seq, gen_const_stm_seq, arm_block_move_unaligned_straight) (arm_block_move_unaligned_loop, arm_gen_movmemqi, arm_reload_in_hi) (arm_reload_out_hi, arm_reorg, vfp_emit_fstmd, emit_multi_reg_push) (emit_sfm, thumb_set_frame_pointer, arm_expand_prologue) (thumb1_emit_multi_reg_push, thumb1_expand_prologue) (thumb_expand_movmemqi, arm_set_return_address) (thumb_set_return_address): Likewise. * config/arm/arm.md: Likewise. * config/avr/avr.c (avr_incoming_return_addr_rtx) (avr_prologue_setup_frame, expand_epilogue) (avr_const_address_lo16): Likewise. * config/bfin/bfin.h (EH_RETURN_HANDLER_RTX): Likewise. * config/bfin/bfin.c (setup_incoming_varargs, bfin_load_pic_reg) (bfin_expand_prologue, bfin_trampoline_init, bfin_expand_call) (bfin_output_mi_thunk): Likewise. * config/c6x/c6x.c (c6x_initialize_trampoline) (c6x_output_mi_thunk): Likewise. * config/cr16/cr16.h (EH_RETURN_HANDLER_RTX): Likewise. * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise. * config/cris/cris.c (cris_return_addr_rtx, cris_split_movdx) (cris_expand_prologue, cris_expand_epilogue, cris_gen_movem_load) (cris_emit_movem_store, cris_trampoline_init): Likewise. * config/cris/cris.md: Likewise. * config/darwin.c (machopic_indirect_data_reference) (machopic_legitimize_pic_address): Likewise. * config/epiphany/epiphany.c (epiphany_emit_save_restore) (epiphany_expand_prologue, epiphany_expand_epilogue) (epiphany_trampoline_init): Likewise. * config/epiphany/epiphany.md: Likewise. * config/fr30/fr30.c (fr30_move_double): Likewise. * config/frv/frv.c (frv_dwarf_store, frv_expand_prologue) (frv_expand_block_move, frv_expand_block_clear, frv_return_addr_rtx) (frv_index_memory, unspec_got_name, frv_find_base_term) (frv_output_dwarf_dtprel): Likewise. * config/h8300/h8300.c (h8300_push_pop, h8300_return_addr_rtx) (h8300_swap_into_er6, h8300_swap_out_of_er6): Likewise. * config/i386/i386.h (RETURN_ADDR_RTX): Likewise. * config/i386/i386.c (setup_incoming_varargs_64) (setup_incoming_varargs_ms_64, choose_baseaddr) (ix86_emit_save_reg_using_mov, ix86_adjust_stack_and_probe) (ix86_emit_probe_stack_range, ix86_expand_prologue) (ix86_emit_restore_reg_using_pop, ix86_emit_leave) (ix86_expand_epilogue, legitimize_pic_address, ix86_legitimize_address) (ix86_split_long_move, ix86_expand_movmem, ix86_expand_setmem) (ix86_static_chain, ix86_trampoline_init, x86_this_parameter) (x86_output_mi_thunk): Likewise. * config/i386/i386.md: Likewise. * config/ia64/ia64.c (ia64_expand_load_address) (ia64_expand_tls_address, ia64_expand_move, ia64_split_tmode) (do_spill, ia64_trampoline_init): Likewise. * config/iq2000/iq2000.c (iq2000_va_start) (iq2000_emit_frame_related_store, iq2000_expand_prologue) (iq2000_expand_eh_return, iq2000_setup_incoming_varargs) (iq2000_print_operand, iq2000_legitimize_address): Likewise. * config/lm32/lm32.c (lm32_setup_incoming_varargs): Likewise. * config/m32c/m32c.c (m32c_return_addr_rtx) (m32c_expand_insv): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs) (m32r_legitimize_pic_address, m32r_print_operand) (m32r_print_operand_address): Likewise. * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise. * config/m68k/m68k.h (RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/m68k/m68k.c (m68k_emit_movem, m68k_expand_prologue) (m68k_expand_epilogue, legitimize_pic_address) (m68k_output_mi_thunk): Likewise. * config/m68k/m68k.md: Likewise. * config/mcore/mcore.c (mcore_expand_prolog): Likewise. (mcore_expand_epilog): Likewise. * config/mcore/mcore.md: Likewise. * config/mep/mep.c (mep_allocate_initial_value) (mep_expand_prologue, mep_expand_epilogue): Likewise. * config/microblaze/microblaze.c (double_memory_operand) (microblaze_block_move_loop): Likewise. * config/mips/mips.c (mips_strip_unspec_address, mips_add_offset) (mips_setup_incoming_varargs, mips_va_start, mips_block_move_loop) (mips_print_operand, mips16e_save_restore_reg, mips_save_restore_reg) (mips_expand_prologue, mips_epilogue_set_cfa) (mips_expand_epilogue): Likewise. * config/mips/mips.md: Likewise. * config/mmix/mmix.c (mmix_dynamic_chain_address, mmix_return_addr_rtx) (mmix_expand_prologue, mmix_expand_epilogue): Likewise. * config/mn10300/mn10300.c (mn10300_gen_multiple_store) (mn10300_builtin_saveregs, mn10300_trampoline_init): Likewise. * config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/moxie/moxie.c (moxie_static_chain): Likewise. * config/pa/pa.c (legitimize_pic_address, hppa_legitimize_address) (store_reg, set_reg_plus_d, pa_expand_prologue, load_reg) (pa_return_addr_rtx, hppa_builtin_saveregs) (pa_trampoline_init): Likewise. * config/pa/pa.md: Likewise. * config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise. * config/picochip/picochip.c (picochip_static_chain): Likewise. * config/rs6000/rs6000.h (RS6000_SAVE_TOC): Likewise. * config/rs6000/rs6000.c (rs6000_legitimize_address) (setup_incoming_varargs, print_operand, rs6000_return_addr) (rs6000_emit_eh_reg_restore, rs6000_emit_probe_stack_range) (rs6000_emit_epilogue) (rs6000_machopic_legitimize_pic_address): Likewise. * config/rx/rx.c (gen_rx_rtsd_vector, gen_rx_popm_vector): Likewise. * config/s390/s390.h (INITIAL_FRAME_ADDRESS_RTX): Likewise. (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/s390/s390.c (s390_decompose_address, legitimize_pic_address) (s390_delegitimize_address, print_operand, annotate_constant_pool_refs) (replace_constant_pool_ref, s390_return_addr_rtx, s390_back_chain_rtx) (save_fpr, restore_fpr, save_gprs, restore_gprs, s390_emit_prologue) (s390_emit_epilogue, s390_function_profiler): Likewise. * config/s390/s390.md: Likewise. * config/score/score.c (score_add_offset, score_prologue): Likewise. * config/sh/sh.c (expand_block_move, push_regs, sh_builtin_saveregs) (sh_output_mi_thunk): Likewise. * config/sh/sh.md: Likewise. * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS, FRAME_ADDR_RTX) (RETURN_ADDR_RTX, INCOMING_RETURN_ADDR_RTX): Likewise. * config/sparc/sparc.c (sparc_legitimize_pic_address) (sparc_emit_probe_stack_range, emit_save_or_restore_regs) (emit_window_save, sparc_flat_expand_prologue, sparc_struct_value_rtx) (emit_and_preserve): Likewise. * config/sparc/sparc.md: Likewise. * config/spu/spu.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/spu/spu.c (spu_expand_insv, spu_machine_dependent_reorg) (spu_setup_incoming_varargs, ea_load_store_inline) (spu_expand_load): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_prologue) (combine_bnp): Likewise. * config/tilegx/tilegx.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilegx/tilegx.c (tilegx_setup_incoming_varargs) (tilegx_expand_unaligned_load, tilegx_trampoline_init): Likewise. * config/tilepro/tilepro.h (DYNAMIC_CHAIN_ADDRESS): Likewise. * config/tilepro/tilepro.c (tilepro_setup_incoming_varargs) (tilepro_expand_unaligned_load, tilepro_trampoline_init): Likewise. * config/v850/v850.c (expand_prologue, expand_epilogue): Likewise. * config/v850/v850.md: Likewise. * config/vax/elf.h (EH_RETURN_STACKADJ_RTX): Likewise. (EH_RETURN_HANDLER_RTX): Likewise. * config/vax/vax.h (DYNAMIC_CHAIN_ADDRESS, RETURN_ADDR_RTX): Likewise. * config/vax/vax.c (vax_add_reg_cfa_offset, vax_expand_prologue) (print_operand_address, vax_trampoline_init): Likewise. * config/xtensa/xtensa.c (xtensa_expand_prologue, xtensa_return_addr) (xtensa_function_value_regno_p): Likewise. From-SVN: r187199
2012-03-21Makefile.in (cfgexpand.o): Add $(REGS_H) and $(INTEGRATE_H) dependencies.Richard Guenther1-27/+0
2012-03-21 Richard Guenther <rguenther@suse.de> * Makefile.in (cfgexpand.o): Add $(REGS_H) and $(INTEGRATE_H) dependencies. * cfgexpand.c (gimple_expand_cfg): Fold in pass_init_function, pass_jump, pass_initial_value_sets and pass_unshare_all_rtl. * passes.c (init_optimization_passes): Remove pass_init_function, pass_jump, pass_initial_value_sets and pass_unshare_all_rtl. * tree-pass.h (pass_init_function): Remove. (pass_jump): Remove. (pass_initial_value_sets): Remove. (pass_unshare_all_rtl): Remove. * integrate.c (pass_initial_value_sets): Remove. * emit-rtl.c (pass_unshare_all_rtl): Remove. * tree.h (init_function_for_compilation): Remove. * function.c (init_function_for_compilation): Remove. (pass_init_function): Remove. * cfgcleanup.c (rest_of_handle_jump): Remove. (pass_jump): Remove. From-SVN: r185598
2012-03-05re PR debug/51902 (lexical_blocks inside inlined_subroutines generate ↵Jakub Jelinek1-8/+64
duplicate debug_ranges) PR debug/51902 * tree.h (BLOCK_SAME_RANGE): Define. * function.c (block_fragments_nreverse): Clear BLOCK_SAME_RANGE if BLOCK_FRAGMENT_CHAIN is non-NULL, but has it cleared. Also clear BLOCK_SAME_RANGE if fragment chain's supercontext fragment isn't equal to supercontext fragment's fragment chain. Adjust BLOCK_SUPERCONTEXT to point to supercontext fragment's fragment origin. (blocks_nreverse_all): Likewise. (reorder_blocks_1): Compute BLOCK_SAME_RANGE bits. Set BLOCK_SUPERCONTEXT to supercontext fragment instead of supercontext fragment's fragment origin. * dwarf2out.c (add_high_low_attributes): If stmt has the same range as its parent (or parents thereof etc.), use the parent's DW_AT_ranges value instead of creating a new .debug_ranges range. From-SVN: r184958
2012-01-24rtl.texi (MEM_IN_STRUCT_P, [...]): Delete.Richard Sandiford1-8/+1
gcc/ * doc/rtl.texi (MEM_IN_STRUCT_P, MEM_SCALAR_P): Delete. (in_struct, return_val): Remove MEM documentation. * rtl.h (rtx_def): Remove MEM meanings from in_struct and return_val. (MEM_IN_STRUCT_P, MEM_SCALAR_P): Delete. (MEM_COPY_ATTRIBUTES): Remove references to MEM_IN_STRUCT_P and MEM_SCALAR. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * cfgexpand.c (add_alias_set_conflicts): Likewise. * expr.c (store_field): Likewise. * function.c (assign_stack_temp_for_type): Likewise. * ifcvt.c (noce_try_cmove_arith): Likewise. * reload1.c (reload): Likewise. * config/alpha/alpha.c (alpha_set_memflags_1): Likewise. (alpha_set_memflags): Likewise. * config/m32c/m32c.c (m32c_immd_dbl_mov): Nullify. gcc/testsuite/ * gcc.dg/memcpy-4.c: Don't expect /s on MEMs. From-SVN: r183486
2012-01-20re PR target/51106 (ICE in move_insn, at haifa-sched.c:2314)Andrey Belevantsev1-1/+1
gcc:/ 2012-01-20 Andrey Belevantsev <abel@ispras.ru> PR target/51106 * function.c (instantiate_virtual_regs_in_insn): Use delete_insn_and_edges when removing a wrong asm insn. testsuite:/ 2012-01-20 Jakub Jelinek <jakub@redhat.com> PR target/51106 * gcc.dg/torture/pr51106-1.c: New test. * gcc.dg/torture/pr51106-2.c: New test. From-SVN: r183325
2012-01-17re PR target/51872 (Shrink-wrapping with -mminimal-toc causes bootstrap failure)Jakub Jelinek1-9/+13
PR bootstrap/51872 * hard-reg-set.h (struct hard_reg_set_container): New type. * target.h (struct hard_reg_set_container): Forward declare. * target.def (set_up_by_prologue): New target hook. * doc/tm.texi.in (TARGET_SET_UP_BY_PROLOGUE): Document it. * doc/tm.texi: Regenerated. * function.c (thread_prologue_and_epilogue_insns): Change set_up_by_prologue HARD_REG_SET into struct hard_reg_set_container. Call targetm.set_up_by_prologue on it. * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): New function. (TARGET_SET_UP_BY_PROLOGUE): Redefine to it. From-SVN: r183254
2012-01-09sched-int.h (bb_note): Move to...Richard Sandiford1-107/+163
gcc/ * sched-int.h (bb_note): Move to... * basic-block.h: ...here. * haifa-sched.c (bb_note): Move to... * cfgrtl.c: ...here. * function.c (next_block_for_reg): New function. (move_insn_for_shrink_wrap): Likewise. (prepare_shrink_wrap): Rewrite to use the above. From-SVN: r183028
2011-12-12re PR rtl-optimization/51495 (ICE: in force_nonfallthru_and_redirect, at ↵Jakub Jelinek1-3/+16
cfgrtl.c:1171 with computed goto) PR rtl-optimization/51495 * function.c (thread_prologue_and_epilogue_insns): Don't add to bb_tail basic blocks that have EDGE_COMPLEX predecessor edges from basic blocks not needing prologue. * gcc.c-torture/compile/pr51495.c: New test. From-SVN: r182265
2011-12-09re PR middle-end/40154 (internal compiler error: in do_SUBST, at combine.c:681)Joern Rennecke1-4/+3
PR middle-end/40154 * emit-rtl.c (set_dst_reg_note): New function. * rtl.h (set_dst_reg_note): Declare. * optabs.c (expand_binop, expand_absneg_bit): Use set_dst_reg_note. (emit_libcall_block, expand_fix): Likewise. * function.c (assign_parm_setup_reg, expand_function_start): Likewise. * expmed.c (expand_mult_const, expand_divmod): Likewise. * reload1.c (gen_reload): Likewise. From-SVN: r182162
2011-11-30re PR target/50725 (-O3 -mstackrealign -march=core2 generates invalid ↵Jakub Jelinek1-0/+3
prologue code in callee procedure) PR target/50725 * function.c (thread_prologue_and_epilogue_insns): If stack_realign_drap, add drap_reg to SET_UP_BY_PROLOGUE regset. * gcc.target/i386/pr50725.c: New test. From-SVN: r181860
2011-11-28re PR middle-end/50907 (EDGE_CROSSING incorrectly set across same section ↵Jakub Jelinek1-0/+1
with -freorder-blocks-and-partition -fPIC -fprofile-use) PR middle-end/50907 * function.c (convert_jumps_to_returns): When redirecting an edge succ to EXIT_BLOCK_PTR, clear EDGE_CROSSING flag. * gcc.dg/tree-prof/pr50907.c: New test. From-SVN: r181787
2011-11-16re PR rtl-optimization/51051 (build fails on cris-elf building libstdc++-v3)Alan Modra1-1/+2
PR rtl-optimization/51051 PR bootstrap/51086 * function.c (thread_prologue_and_epilogue_insns): Guard emitting return with single_succ_p test. From-SVN: r181391
2011-11-09function.h (requires_stack_frame_p): New prototype.Jakub Jelinek1-1/+1
* function.h (requires_stack_frame_p): New prototype. * function.c (requires_stack_frame_p): No longer static. * config/i386/i386.c (ix86_finalize_stack_realign_flags): If stack_realign_fp was just a conservative guess for a function which doesn't use sp/fp/argp at all, clear frame_pointer_needed and stack realignment. From-SVN: r181236
2011-11-09function.c (bb_active_p): Delete.Alan Modra1-225/+458
* function.c (bb_active_p): Delete. (dup_block_and_redirect, active_insn_between): New functions. (convert_jumps_to_returns, emit_return_for_exit): New functions, split out from.. (thread_prologue_and_epilogue_insns): ..here. Delete shadowing variables. Don't do prologue register clobber tests when shrink wrapping already failed. Delete all last_bb_active code. Instead compute tail block candidates for duplicating exit path. Remove these from antic set. Duplicate tails when reached from both blocks needing a prologue/epilogue and blocks not needing such. * ifcvt.c (dead_or_predicable): Test both flag_shrink_wrap and HAVE_simple_return. * bb-reorder.c (get_uncond_jump_length): Make global. * bb-reorder.h (get_uncond_jump_length): Declare. * cfgrtl.c (rtl_create_basic_block): Comment typo fix. (rtl_split_edge): Likewise. Warning fix. (rtl_duplicate_bb): New function. (rtl_cfg_hooks): Enable can_duplicate_block_p and duplicate_block. * Makefile.in (function.o): Update dependencies. From-SVN: r181188
2011-10-24re PR rtl-optimization/50833 (ICE: in maybe_record_trace_start, at ↵Bernd Schmidt1-1/+1
dwarf2cfi.c:2243 with -fshrink-wrap) PR rtl-optimization/50833 * function.c (thread_prologue_and_epilogue_insns): Expect the return insn optimization only if optimize. From-SVN: r180377
2011-10-21reg-notes.def (DEP_CONTROL): New.Bernd Schmidt1-30/+0
* reg-notes.def (DEP_CONTROL): New. * sched-ebb.c (add_deps_for_risky_insns): Add a REG_DEP_CONTROL when not doing speculation. * rtlanal.c (record_hard_reg_sets, find_all_hard_reg_sets, record_hard_reg_uses_1, record_hard_reg_uses): New functions. * function.c (record_hard_reg_sets, record_hard_reg_uses, record_hard_reg_uses_1): Remove; move to rtlanal.c. * lists.c (copy_INSN_LIST, concat_INSN_LIST): New functions. * haifa-sched.c: Swap includes of "rtl.h" and "hard-reg-set.h". (MUST_RECOMPUTE_SPEC_P): New macro. (real_insn_for_shadow): New function. (cond_clobbered_p, recompute_todo_spec, check_clobbered_conditions, toggle_cancelled_flags): New static functions. (schedule_insn): Relax an assert to only check for empty hard back dependencies. Skip cancelled dependencies. Call check_clobbered_conditions. (copy_insn_list): Remove function, renamed moved to lists.c. (save_backtrack_point): Use new spelling copy_INSN_LIST. (unschedule_insns_until): Ensure TODO_SPEC is reset properly. (restore_last_backtrack_point): Likewise. Call toggle_cancelled_flags. (estimate_insn_tick): Ignore cancelled dependencies. (haifa_speculate_insn): Move declaration. (try_ready): Move code into recompute_todo_spec and call it. Tweak some asserts. Ensure predicated patterns are restored if necessary. Dump DEP_CONTROL flag. (haifa_change_pattern): Merge with sched_change_pattern. (sched_change_pattern): Remove function. * sched-deps.c (NON_FLUSH_JUMP_KIND, NON_FLUSH_JUMP): Remove. All uses changed to simply not test NON_FLUSH_JUMP_P. (ds_to_dk, dk_to_ds, dump_dep, ds_to_dt, dump_ds, check_dep): Handle REG_DEP_CONTROL. (dep_spec_p): If DO_PREDICATION, REG_DEP_CONTROL is speculative. (reg_pending_control_uses, control_dependency_cache): New static variables. (sched_get_reverse_condition_uncached): New function. (sd_find_dep_between): Remove pointless assert. Look in control_dependency_cache. (ask_dependency_caches, set_dependency_caches, sd_delete_dep, extend_dependency_caches, sched_deps_finish): Handle REG_DEP_CONTROL and control_dependency_cache. (sd_unresolve_dep): Use dep_spec_p. (add_dependence): Now a wrapper around add_dependence_1, handling REG_DEP_CONTROL specially. (flush_pending_lists): Clear pending_jump_insns. (sched_analyze_1): Handle pending_jump_insns like a memory flush. (sched_analyze_2): Unconditionally add to pending memory flushes, keep previous behaviour but apply it to pending_jump_insns instead. (sched_analyze_insn): Defer adding jump reg dependencies using reg_pending_control_uses; add them to the control_uses list. Handle pending_jump_insns and control_uses when adding dependence lists. (deps_analyze_insn): Update INSN_COND_DEPS. (deps_analyze_insn): Add jumps to pending_jump_insns rather than last_pending_memory_flush. (init_deps): Initialize pending_jump_insns. (free_deps): Free control_uses. (remove_from_deps): Remove from pending_jump_insns. (init_deps_global): Allocate reg_pending_control_uses). (finish_deps_global): Free it. (add_dependence_1): Renamed from add_dependence. Handle REG_DEP_CONTROL. * rtl.h (record_hard_reg_uses, find_all_hard_reg_sets): Declare. (copy_INSN_LIST, concat_INSN_LIST): Declare. * sched-int.h (struct deps_reg): Add control_uses. (struct deps_desc): Add pending_jump_insns. (struct _haifa_deps_insn_data): Add cond_deps. (struct _haifa_insn_data): Add must_recompute_spec and predicated_pat. (INSN_COND_DEPS, PREDICATED_PAT): New macros. (BITS_PER_DEP_WEAK): Adjust for two extra bits in the word. (DEP_CONTROL): New macro. (DEP_TYPES): Include it. (HARD_DEP): Adjust definition. (DEP_CANCELLED): New macro. (enum SCHED_FLAGS): Add DO_PREDICATION. (sched_get_reverse_condition_uncached, real_insn_for_shadow): Declare. * sched-rgn.c (concat_INSN_LIST): Remove function. (deps_join): Handle pending_jump_insns. (free_pending_lists): Likewise. * config/c6x/c6x.c (c6x_set_sched_flags): Set DO_PREDICATION for final schedule. From-SVN: r180302
2011-10-18re PR tree-optimization/50735 (gcc.dg/torture/vector-2.c:52:1: ICE: ↵Jakub Jelinek1-1/+4
verify_ssa failed at -O1 and above) PR tree-optimization/50735 * function.c (gimplify_parameters): Use create_tmp_var instead of create_tmp_reg. If parm is not TREE_ADDRESSABLE and type is complex or vector type, set DECL_GIMPLE_REG_P. From-SVN: r180154
2011-10-15re PR rtl-optimization/49941 (segmentation fault in redirect_jump_2)Alan Modra1-10/+16
PR rtl-optimization/49941 * jump.c (mark_jump_label_1): Set JUMP_LABEL for simple_return jumps. * rtl.h (set_return_jump_label): Declare. * function.c (set_return_jump_label): New function, extracted.. (thread_prologue_and_epilogue_insns): ..from here. Use it in another instance to set return jump_label. * cfgrtl.c (force_nonfallthru_and_redirect): Use set_return_jump_label. * reorg.c (find_end_label): Likewise. From-SVN: r180027
2011-10-13function.c (gimplify_parameters): Set number of arguments of call to ↵Tom de Vries1-1/+1
BUILT_IN_ALLOCA_WITH_ALIGN to 2. 2011-10-13 Tom de Vries <tom@codesourcery.com> * function.c (gimplify_parameters): Set number of arguments of call to BUILT_IN_ALLOCA_WITH_ALIGN to 2. From-SVN: r179901
2011-10-12function.c (prepare_shrink_wrap, [...]): New function.Bernd Schmidt1-12/+147
* function.c (prepare_shrink_wrap, bb_active_p): New function. (thread_prologue_and_epilogue_insns): Use bb_active_p. Call prepare_shrink_wrap, then recompute bb_active_p for the last block. From-SVN: r179848
2011-10-11Convert standard builtin functions from being arrays to using a functional ↵Michael Meissner1-1/+1
interface From-SVN: r179820
2011-10-07re PR middle-end/50527 (inconsistent vla align)Tom de Vries1-2/+4
2011-10-07 Tom de Vries <tom@codesourcery.com> PR middle-end/50527 * tree.c (build_common_builtin_nodes): Add local_define_builtin for BUILT_IN_ALLOCA_WITH_ALIGN. Mark that BUILT_IN_ALLOCA_WITH_ALIGN can throw. * builtins.c (expand_builtin_alloca): Handle BUILT_IN_ALLOCA_WITH_ALIGN arglist. Set align for BUILT_IN_ALLOCA_WITH_ALIGN. (expand_builtin): Handle BUILT_IN_ALLOCA_WITH_ALIGN. (is_inexpensive_builtin): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * tree-ssa-ccp.c (evaluate_stmt): Set align for BUILT_IN_ALLOCA_WITH_ALIGN. (fold_builtin_alloca_for_var): Rename to ... (fold_builtin_alloca_with_align): Set DECL_ALIGN from 2nd BUILT_IN_ALLOCA_WITH_ALIGN argument. (ccp_fold_stmt): Try folding BUILT_IN_ALLOCA_WITH_ALIGN using fold_builtin_alloca_with_align. (optimize_stack_restore): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN): Declare using DEF_BUILTIN_STUB. * ipa-pure-const.c (special_builtin_state): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1) (call_may_clobber_ref_p_1): Same. * function.c (gimplify_parameters): Lower vla to BUILT_IN_ALLOCA_WITH_ALIGN. * gimplify.c (gimplify_vla_decl): Same. * cfgexpand.c (expand_call_stmt): Handle BUILT_IN_ALLOCA_WITH_ALIGN. * tree-mudflap.c (mf_xform_statements): Same. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary) (mark_all_reaching_defs_necessary_1, propagate_necessity): Same. * varasm.c (incorporeal_function_p): Same. * tree-object-size.c (alloc_object_size): Same. * gimple.c (gimple_build_call_from_tree): Same. From-SVN: r179655
2011-10-07function.c (frame_required_for_rtx): Remove function.Bernd Schmidt1-29/+45
* function.c (frame_required_for_rtx): Remove function. (requires_stack_frame_p): New arg set_up_by_prologue. All callers changed. Compute a set of mentioned registers and compare against the new arg rather than calling frame_required_for_rtx. (thread_prologue_and_epilogue_insns): Compute the set_up_by_prologue reg set. Convert the unconverted_simple_returns mechanism to store jump insns rather than their basic blocks. Also check the orig_entry_edge destination for new blocks. From-SVN: r179654
2011-10-06function.c (thread_prologue_and_epilogue_insns): Emit split prologue on the ↵Bernd Schmidt1-5/+1
orig_entry_edge. * function.c (thread_prologue_and_epilogue_insns): Emit split prologue on the orig_entry_edge. Don't account for it in prologue_clobbered. From-SVN: r179627
2011-10-06function.c (thread_prologue_and_epilogue_insns): Build a vector of ↵Bernd Schmidt1-16/+12
unconverted simple return blocks rather than trying to... * function.c (thread_prologue_and_epilogue_insns): Build a vector of unconverted simple return blocks rather than trying to recompute them later based on bb_flags bitmap tests. From-SVN: r179619
2011-10-06function.c (thread_prologue_and_epilogue_insns): Mark last_bb_active as ↵Andreas Krebbel1-1/+1
possibly unused. 2011-10-06 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * function.c (thread_prologue_and_epilogue_insns): Mark last_bb_active as possibly unused. It is unused for targets which do neither have "return" nor "simple_return" expanders. From-SVN: r179601
2011-10-05function.c (thread_prologue_and_epilogue_insns): Don't shrink-wrap if ↵Bernd Schmidt1-0/+1
profiling after the prologue. * function.c (thread_prologue_and_epilogue_insns): Don't shrink-wrap if profiling after the prologue. From-SVN: r179577
2011-10-05re PR bootstrap/50621 (Bootstrap failure)Bernd Schmidt1-2/+3
PR bootstrap/50621 * config/i386/i386.c (ix86_add_cfa_restore_note): Omit notes only if the function was not shrink-wrapped. (ix86_expand_epilogue): Ensure queued cfa_adjust notes are attached to an insn. * function.c (thread_prologue_and_epilogue_insns): Make sure the shrink_wrapped flag is set even if there is no dump file. From-SVN: r179560
2011-10-05invoke.texi (-fshrink-wrap): Document.Bernd Schmidt1-129/+603
* doc/invoke.texi (-fshrink-wrap): Document. * opts.c (default_options_table): Add it. * common.opt (fshrink-wrap): Add. * function.c (emit_return_into_block): Remove useless declaration. (record_hard_reg_uses_1, record_hard_reg_uses, frame_required_for_rtx, requires_stack_frame_p, gen_return_pattern): New static functions. (emit_return_into_block): New arg simple_p. All callers changed. Use gen_return_pattern. (thread_prologue_and_epilogue_insns): Implement shrink-wrapping. * config/i386/i386.md (return): Expand into a simple_return. (simple_return): New expander): (simple_return_internal, simple_return_internal_long, simple_return_pop_internal_long, simple_return_indirect_internal): Renamed from return_internal, return_internal_long, return_pop_internal_long and return_indirect_internal; changed to use simple_return. * config/i386/i386.c (ix86_expand_epilogue): Adjust to expand simple returns. (ix86_pad_returns): Likewise. * function.h (struct rtl_data): Add member shrink_wrapped. * cfgcleanup.c (outgoing_edges_match): If shrink-wrapped, edges that are not jumps or sibcalls can't be compared. * gcc.target/i386/sw-1.c: New test. From-SVN: r179553
2011-08-27rtl.texi (simple_return): Document.Bernd Schmidt1-1/+5
* doc/rtl.texi (simple_return): Document. (parallel, PATTERN): Here too. * doc/md.texi (return): Mention it's allowed to expand to simple_return in some cases. (simple_return): Document standard pattern. * gengenrtl.c (special_rtx): SIMPLE_RETURN is special. * final.c (final_scan_insn): Use ANY_RETURN_P on body. * reorg.c (function_return_label, function_simple_return_label): New static variables, replacing... (end_of_function_label): ... this. (simplejump_or_return_p): New static function. (optimize_skip, steal_delay_list_from_fallthrough, fill_slots_from_thread): Use it. (relax_delay_slots): Likewise. Use ANY_RETURN_P on body. (rare_destination, follow_jumps): Use ANY_RETURN_P on body. (find_end_label): Take a new arg which is one of the two return rtxs. Depending on which, set either function_return_label or function_simple_return_label. All callers changed. (make_return_insns): Make both kinds. (dbr_schedule): Adjust for two kinds of end labels. * function.c (emit_return_into_block): Set JUMP_LABEL properly. * genemit.c (gen_exp): Handle SIMPLE_RETURN. (gen_expand, gen_split): Use ANY_RETURN_P. * df-scan.c (df_uses_record): Handle SIMPLE_RETURN. * rtl.def (SIMPLE_RETURN): New code. * ifcvt.c (find_if_case_1): Be more careful about redirecting jumps to the EXIT_BLOCK. * jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p, returnjump_p_1): Handle SIMPLE_RETURNs. * print-rtl.c (print_rtx): Likewise. * rtl.c (copy_rtx): Likewise. * bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P. * combine.c (simplify_set): Likewise. * resource.c (find_dead_or_set_registers, mark_set_resources): Likewise. * emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1, copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs. (init_emit_regs): Initialize simple_return_rtx. * cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to force_nonfallthru_and_redirect. * rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN. (GR_SIMPLE_RETURN): New enum value. (simple_return_rtx): New macro. * basic-block.h (force_nonfallthru_and_redirect): Adjust declaration. * cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label argument. All callers changed. Be careful about what kinds of returnjumps to generate. * config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb, ix86_pad_short_function): Likewise. * config/arm/arm.c (arm_final_prescan_insn): Handle both kinds of return. * config/mips/mips.md (any_return): New code_iterator. (optab): Add cases for return and simple_return. (return): Expand to a simple_return. (simple_return): New pattern. (*<optab>, *<optab>_internal for any_return): New patterns. (return_internal): Remove. * config/mips/mips.c (mips_expand_epilogue): Make the last insn a simple_return_internal. From-SVN: r178135
2011-07-29* function.c: Remove unwanted commit.Uros Bizjak1-10/+0
From-SVN: r176925
2011-07-29re PR target/47715 ([x32] TLS doesn't work)Uros Bizjak1-0/+10
PR target/47715 * config/i386/i386.md (*load_tp_x32): New. (*load_tp_x32_zext): Ditto. (*add_tp_x32): Ditto. (*add_tp_x32_zext): Ditto. (*load_tp_<mode>): Disable for TARGET_X32 targets. (*add_tp_<mode>): Ditto. * config/i386/i386.c (get_thread_pointer): Load thread pointer in ptr_mode and convert to Pmode if needed. From-SVN: r176924
2011-07-28rtlanal.c (tablejump_p): False for returns.Bernd Schmidt1-2/+19
* rtlanal.c (tablejump_p): False for returns. * reorg.c (first_active_target_insn): New static function. (find_end_label): Set JUMP_LABEL for a new returnjump. (optimize_skip, get_jump_flags, rare_destination, mostly_true_jump, get_branch_condition, steal_delay_list_from_target, own_thread_p, fill_simple_delay_slots, follow_jumps, fill_slots_from_thread, fill_eager_delay_slots, relax_delay_slots, make_return_insns, dbr_schedule): Adjust to handle ret_rtx in JUMP_LABELs. * jump.c (delete_related_insns): Likewise. (jump_to_label_p): New function. (redirect_target): New static function. (redirect_exp_1): Use it. Adjust to handle ret_rtx in JUMP_LABELS. (redirect_jump_1): Assert that the new label is nonnull. (redirect_jump): Likewise. (redirect_jump_2): Check for ANY_RETURN_P rather than NULL labels. * ifcvt.c (find_if_case_1): Take care when redirecting jumps to the exit block. (dead_or_predicable): Change NEW_DEST arg to DEST_EDGE. All callers changed. Ensure that the right label is passed to redirect_jump. * function.c (emit_return_into_block, thread_prologue_and_epilogue_insns): Ensure new returnjumps have ret_rtx in their JUMP_LABEL. * print-rtl.c (print_rtx): Handle ret_rtx in a JUMP_LABEL. * emit-rtl.c (skip_consecutive_labels): Allow the caller to pass ret_rtx as label. * cfglayout.c (fixup_reorder_chain): Use force_nonfallthru_and_redirect rather than force_nonfallthru. (duplicate_insn_chain): Copy JUMP_LABELs for returns. * rtl.h (ANY_RETURN_P): New macro. (jump_to_label_p): Declare. * resource.c (find_dead_or_set_registers): Handle ret_rtx in JUMP_LABELs. (mark_target_live_regs): Likewise. * basic-block.h (force_nonfallthru_and_redirect): Declare. * cfgrtl.c (force_nonfallthru_and_redirect): No longer static. * config/alpha/alpha.c (alpha_tablejump_addr_vec, alpha_tablejump_best_label): Remove functions. * config/alpha/alpha-protos.c (alpha_tablejump_addr_vec, alpha_tablejump_best_label): Remove declarations. * config/sh/sh.c (barrier_align, split_branches): Adjust for ret_rtx in JUMP_LABELs. * config/arm/arm.c (is_jump_table): Likewise. From-SVN: r176881
2011-07-19rtl.texi (MEM_OFFSET_KNOWN_P): Document.Richard Sandiford1-7/+4
gcc/ * doc/rtl.texi (MEM_OFFSET_KNOWN_P): Document. (MEM_OFFSET): Change from returning an rtx to returning a HOST_WIDE_INT. * rtl.h (MEM_OFFSET_KNOWN_P): New macro. (MEM_OFFSET): Return a HOST_WIDE_INT rather than an rtx. * emit-rtl.h (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_offset): Declare. * alias.c (ao_ref_from_mem): Adjust uses of MEM_OFFSET, using MEM_OFFSET_KNOWN_P to test whether the offset is known, and MEM_OFFSET to get a HOST_WIDE_INT offset. (nonoverlapping_memrefs_p): Likewise. Adjust calls to... (adjust_offset_for_component_ref): Take a bool "known_p" parameter and a HOST_WIDE_INT "offset" parameter. * builtins.c (get_memory_rtx): As for ao_ref_from_mem. Adjust calls to set_mem_offset, passing a HOST_WIDE_INT rather than an rtx. Use clear_mem_offset to clear the offset. * cfgcleanup.c (merge_memattrs): Likewise. * dwarf2out.c (tls_mem_loc_descriptor): Likewise. * function.c (assign_parm_find_stack_rtl): Likewise. (assign_parm_setup_stack): Likewise. * print-rtl.c (print_rtx): Likewise. * reload.c (find_reloads_subreg_address): Likewise. * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise. * var-tracking.c (INT_MEM_OFFSET): Likewise. * emit-rtl.c (set_reg_attrs_from_value): Likewise. (get_mem_align_offset): Likewise. (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_offset): New function. * config/mips/mips.c (r10k_safe_mem_expr_p): Take a HOST_WIDE_INT offset rather than an rtx. Assume both the expressio and offset are available. (r10k_needs_protection_p_1): Update accordingly, checking the expression and offset availability here instead. From-SVN: r176477
2011-07-19rtl.texi (MEM_SIZE_KNOWN_P): Document.Richard Sandiford1-2/+1
gcc/ * doc/rtl.texi (MEM_SIZE_KNOWN_P): Document. (MEM_SIZE): Change from returning an rtx to returning a HOST_WIDE_INT. * rtl.h (MEM_SIZE_KNOWN_P): New macro. (MEM_SIZE): Return a HOST_WIDE_INT rather than an rtx. * emit-rtl.h (set_mem_size): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_size): Declare. * emit-rtl.c (set_mem_size): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_size): New function. * alias.c (ao_ref_from_mem): Adjust uses of MEM_SIZE, using MEM_SIZE_KNOWN_P to test whether the size is known, and MEM_SIZE to get a HOST_WIDE_INT size. Adjust calls to set_mem_size, passing a HOST_WIDE_INT rather than an rtx. Use clear_mem_size to clear the size. (nonoverlapping_memrefs_p): Likewise. * builtins.c (get_memory_rtx, expand_builtin_memcmp): Likewise. (expand_builtin_init_trampoline): Likewise. * calls.c (compute_argument_addresses): Likewise. * cfgcleanup.c (merge_memattrs): Likewise. * dce.c (find_call_stack_args): Likewise. * dse.c (record_store, scan_insn): Likewise. * dwarf2out.c (dw_sra_loc_expr): Likewise. * expr.c (emit_block_move_hints): Likewise. * function.c (assign_parm_find_stack_rtl): Likewise. * print-rtl.c (print_rtx): Likewise. * reload.c (find_reloads_subreg_address): Likewise. * rtlanal.c (may_trap_p_1): Likewise. * var-tracking.c (track_expr_p): Likewise. * varasm.c (assemble_trampoline_template): Likewise. * config/arm/arm.c (arm_print_operand): Likewise. * config/h8300/h8300.c (h8sx_emit_movmd): Likewise. * config/i386/i386.c (expand_movmem_via_rep_mov): Likewise. (expand_setmem_via_rep_stos, expand_constant_movmem_prologue) (expand_constant_setmem_prologue): Likewise. * config/mips/mips.c (mips_get_unaligned_mem): Likewise. * config/rs6000/rs6000.c (expand_block_move): Likewise. (adjacent_mem_locations): Likewise. * config/s390/s390.c (s390_expand_setmem): Likewise. (s390_expand_insv): Likewise. * config/s390/s390.md (*extzv<mode>, *extv<mode>): Likewise. (*extendqi<mode>2_short_displ): Likewise. * config/sh/sh.c (expand_block_move): Likewise. * config/sh/sh.md (extv, extzv): Likewise. From-SVN: r176476
2011-07-12tm.texi.in (FUNCTION_ARG_PADDING): Mention TARGET_FUNCTION_ARG_ROUND_BOUNDARY.Bernd Schmidt1-5/+7
* doc/tm.texi.in (FUNCTION_ARG_PADDING): Mention TARGET_FUNCTION_ARG_ROUND_BOUNDARY. (TARGET_FUNCTION_ARG_ROUND_BOUNDARY): Add hook. * function.c (locate_and_pad_parm): Take it into account. * target.def (function_arg_round_boundary): New hook. * targhooks.c (default_function_arg_round_boundary): New function. * targhooks.h (default_function_arg_round_boundary): Declare. * doc/tm.texi: Regenerate. From-SVN: r176207