summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
Commit message (Collapse)AuthorAgeFilesLines
* Change GPLv2 files (which do not have exceptions or additions) over to GPLv3.Nick Clifton2007-09-011-4/+3
| | | | From-SVN: r128013
* reload1.c (choose_reload_regs): Set reload_spill_index for regs chosen ↵Bernd Schmidt2007-07-231-1/+8
| | | | | | | | | during find_reloads. * reload1.c (choose_reload_regs): Set reload_spill_index for regs chosen during find_reloads. From-SVN: r126854
* re PR middle-end/30761 (Error: unsupported relocation against sfp)Ulrich Weigand2007-04-261-25/+17
| | | | | | | | | PR middle-end/30761 * reload1.c (eliminate_regs_in_insn): In the single_set special case, attempt to re-recognize the insn before falling back to having reload fix it up. From-SVN: r124199
* re PR inline-asm/30505 (asm operand has impossible constraints.)Jakub Jelinek2007-03-201-15/+15
| | | | | | | | | | PR inline-asm/30505 * reload1.c (reload): Do invalid ASM checking after cleanup_subreg_operands. * gcc.target/i386/pr30505.c: New test. From-SVN: r123074
* re PR rtl-optimization/29599 (ICE when building the kernel on SH4)Kaz Kojima2007-02-151-2/+3
| | | | | | | | | PR rtl-optimization/29599 Backport from mainline. * reload1.c (eliminate_regs_in_insn): Take the destination mode into account when computing the offset. From-SVN: r121985
* reload1.c (alter_reg): Require the alignment of the stack slot to be at ↵Richard Sandiford2006-09-271-6/+14
| | | | | | | | | | | | least reg_max_ref_width bytes. gcc/ * reload1.c (alter_reg): Require the alignment of the stack slot to be at least reg_max_ref_width bytes. (scan_paradoxical_subregs): Record the largest width in reg_max_ref_width. From-SVN: r117252
* re PR rtl-optimization/21299 (internal error on invalid asm statement)Steven Bosscher2006-09-191-0/+14
| | | | | | | PR rtl-optimization/21299 * reload1.c (reload): Purge invalid ASMs in the final pass. From-SVN: r117061
* re PR rtl-optimization/28982 (Incorrect reloading of automodification ↵Richard Sandiford2006-09-131-3/+3
| | | | | | | | | | | | | | | | | | expressions) gcc/ PR rtl-optimization/28982 * reload.c (find_reloads_address_1): Use RELOAD_OTHER for the index of a PRE_MODIFY or POST_MODIFY address. * reload1.c (inc_for_reload): Use find_replacement on the original base and index registers. gcc/testsuite/ PR rtl-optimization/28982 * gcc.c-torture/execute/pr28982a.c: New test. * gcc.c-torture/execute/pr28982b.c: Likewise. From-SVN: r116919
* * reload1.c (emit_reload_insns): Fix yet another typo in my patch.Jan Hubicka2006-08-241-1/+1
| | | | From-SVN: r116384
* Patch by Paolo BonziniJan Hubicka2006-08-221-2/+2
| | | | | | | | Patch by Paolo Bonzini * reload1.c (emit_reload_insns): Fix incorrect bracketing introduced by my previous patch. From-SVN: r116325
* re PR middle-end/28071 (A file that can not be compiled in reasonable ↵Jan Hubicka2006-08-211-13/+21
| | | | | | | | | | | | time/space) PR rtl-optimization/28071 * reload1.c (reg_has_output_reload): Turn into regset. (reload_as_needed, forget_old_reloads_1, forget_marked_reloads, choose_reload_regs, emit_reload_insns): Update to new reg_has_output_reload. From-SVN: r116277
* Fix typo in previously applied patch.Jan Hubicka2006-08-171-0/+1
| | | | From-SVN: r116221
* re PR tree-optimization/27865 (tree check failure building FreePOOMA)Jan Hubicka2006-08-171-22/+60
| | | | | | | | | | PR tree-optimization/27865 * reload1.c (forget_marked_reloads): New function. (forget_old_reloads_1): When data are passed, just mark the registers for later removal. (reload_as_needed): Use the new mechanizm. From-SVN: r116220
* re PR target/28146 (-O2 produces invalid code on s390-linux-gnu: gcc-4.1.2 ↵Alexandre Oliva2006-08-171-0/+15
| | | | | | | | | | | | | | | | 20060608) PR target/28146 * reload.h (reg_equiv_alt_mem_list): New declaration. * reload1.c (reg_equiv_alt_mem_list): New definition. (reload): Initialize it and release it. (delete_output_reload): Use it. * reload.c (push_reg_equiv_alt_mem): New function. (find_reloads_toplev): Call it. (find_reloads_address, find_reloads_address_1): Likewise. (find_reloads_subreg_address): Likewise. From-SVN: r116215
* re PR target/27531 (sparc: undefined reference to .LL226 with -O2)Roger Sayle2006-06-231-1/+5
| | | | | | | | | | | | | | | | 2006-06-22 Roger Sayle <roger@eyesopen.com> Steven Bosscher <stevenb.gcc@gmail.com> PR target/27531 * reload1.c (gen_reload): Call mark_jump_label on the new insns generated by gen_move_insn to add REG_LABEL notes if necessary. * gcc.dg/pr27531-1.c: New test case. Co-Authored-By: Steven Bosscher <stevenb.gcc@gmail.com> From-SVN: r114921
* re PR middle-end/27959 (s390x miscompilation due to clobbering literal pool ↵Andreas Krebbel2006-06-141-0/+2
| | | | | | | | | | | | | | | | | base reg) 2006-06-14 Andreas Krebbel <krebbel1@de.ibm.com> PR middle-end/27959 * reload1.c (reload): Remove registers returned by update_eliminables from used_spill_regs. 2006-06-14 Andreas Krebbel <krebbel1@de.ibm.com> PR middle-end/27959 * gcc.dg/pr27959.c: New testcase. From-SVN: r114640
* local-alloc.c (rest_of_handle_local_alloc): Use VEC instead of VARRAY.Kazu Hirata2006-04-141-3/+2
| | | | | | | | | | | | * local-alloc.c (rest_of_handle_local_alloc): Use VEC instead of VARRAY. * reload1.c (reg_equiv_memory_loc_varray): Rename to reg_equiv_memory_loc_vec. Change the type to VEC(rtx,gc) *. (init_reload, reload): Use VEC instead of VARRAY. * reload.h: Update the prototype for reg_equiv_memory_loc_varray. From-SVN: r112955
* reload1.c (choose_reload_regs): Check for all RTX_AUTOINC operators.Paul Brook2006-03-291-9/+18
| | | | | | | | | 2006-03-29 Paul Brook <paul@codesourcery.com> * reload1.c (choose_reload_regs): Check for all RTX_AUTOINC operators. (inc_for_reload): Handle PRE_MODIFY and POST_MODIFY addresses. From-SVN: r112500
* bfin-protos.h (bfin_dsp_memref_p): Declare.Bernd Schmidt2006-03-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * config/bfin/bfin-protos.h (bfin_dsp_memref_p): Declare. * config/bfin/bfin.c (bfin_dsp_memref_p): New function. (bfin_valid_reg_p): Test for pseudos explicitly and use only REGNO_MODE_CODE_OK_FOR_BASE_P. New args MODE and OUTER_CODE; all callers changed. * config/bfin/bfin.h (PREG_P): Use P_REGNO_P. (IREG_P, P_REGNO_P, I_REGNO_P): New macros. (enum reg_class, REG_CLASS_CONTENTS): Add IPREGS. (BASE_REG_CLASS, REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, REGNO_OK_FOR_BASE_STRICT_P, REGNO_OK_FOR_BASE_NONSTRICT_P): Delete macros. (IREG_POSSIBLE_P, MODE_CODE_BASE_REG_CLASS, REGNO_MODE_CODE_OK_FOR_BASE_P): New macros. (REGNO_REG_CLASS): ARGP is in PREGS. * config/bfin/bfin.md (movhi_insn): Allow for addresses containing IREGS. (zero_extendhisi2, extendhisi2): Likewise; changed to define_and_split to deal with those addresses. * addresses.h: New file. * caller-save.c: Include "addresses.h". (init_caller_save): Use new base_reg_class function. * rtl-factoring.c: Include "addresses.h". (recompute_gain_for_pattern_seq): Use new function ok_for_base_p_1. * recog.c: Include "addresses.h". (preprocess_constraints): Use new base_reg_class function. * regrename.c: Include "addresses.h". (scan_rtx_address): Use new regno_ok_for_base_p and base_reg_class functions. Keep track of a new var INDEX_CODE to compute valid classes. (replace_oldest_value_addr): Likewise. (replace_oldest_value_mem): Use base_reg_class. * reload.c: Include "addresses.h". (REGNO_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P): Delete macros. (find_reloads): Use new base_reg_class function. (find_reloads_address): Likewise; also use regno_ok_for_base_p. (find_reloads_address_1): Likewise. New args OUTER_CODE and INDEX_CODE; all callers and prototype changed. * reload1.c: Include "addresses.h". (maybe_fix_stack_asms): Use base_reg_class. * regclass.c: Include "addresses.h". (ok_for_index_p_nonstrict, ok_for_base_p_nonstrict): New functions. (init_reg_autoinc): Use new base_reg_class function. (record_reg_classes): Likewise. (record_address_regs): Delete arg CLASS; add args CONTEXT, MODE, OUTER_CODE and INDEX_CODE. All callers and prototype changed. Use new args to compute necessary class. * Makefile.in (regclass.o, reload.o, reload1.o, caller-save.o, recog.o, regrename.o, rtl-factoring.o): Update dependencies. * doc/tm.texi (MODE_CODE_BASE_REG_CLASS): Document. (REGNO_MODE_CODE_OK_FOR_BASE_P): Likewise. (REG_OK_FOR_BASE_P, REG_MODE_OK_FOR_BASE_P, REG_MODE_OK_FOR_REG_BASE_P, REG_OK_FOR_INDEX_P): Delete documentation. From-SVN: r112248
* re PR target/9703 ([arm] Accessing data through constant pool more times ↵Richard Sandiford2006-02-181-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | could be solved in less instructions) * cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE. * emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx. (copy_insn_1): Likewise. Don't copy each field individually. Reindent. * read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead of RTX_SIZE. * reload1.c (eliminate_regs): Use shallow_copy_rtx. * rtl.c (rtx_size): Rename variable to... (rtx_code_size): ...this. (rtx_size): New function. (rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE. (copy_rtx): Use shallow_copy_rtx. Don't copy each field individually. Reindent. (shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE. * rtl.h (rtx_code_size): New variable. (rtx_size): Change from a variable to a function. (RTX_SIZE): Rename to... (RTX_CODE_SIZE): ...this. PR target/9703 PR tree-optimization/17106 * doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document. (Anchored Addresses): New section. * doc/invoke.texi (-fsection-anchors): Document. * doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise. (SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise. * hooks.c (hook_bool_mode_rtx_false): New function. * hooks.h (hook_bool_mode_rtx_false): Declare. * gengtype.c (create_optional_field): New function. (adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when SYMBOL_REF_IN_BLOCK_P is true. * target.h (output_anchor, use_blocks_for_constant_p): New hooks. (min_anchor_offset, max_anchor_offset): Likewise. (use_anchors_for_symbol_p): New hook. * toplev.c (compile_file): Call output_object_blocks. (target_supports_section_anchors_p): New function. (process_options): Check that -fsection-anchors is only used on targets that support it and when -funit-at-a-time is in effect. * tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL if the decl doesn't have one. * dwarf2out.c: Remove instantiations of VEC(rtx,gc). * expr.c (emit_move_multi_word, emit_move_insn): Pass the result of force_const_mem through use_anchored_address. (expand_expr_constant): New function. (expand_expr_addr_expr_1): Call it. Use the same modifier when calling expand_expr for INDIRECT_REF. (expand_expr_real_1): Pass DECL_RTL through use_anchored_address for all modifiers except EXPAND_INITIALIZER. Use expand_expr_constant. * expr.h (use_anchored_address): Declare. * loop-unroll.c: Don't declare rtx vectors here. * explow.c: Include output.h. (validize_mem): Call use_anchored_address. (use_anchored_address): New function. * common.opt (-fsection-anchors): New switch. * varasm.c (object_block_htab, anchor_labelno): New variables. (hash_section, object_block_entry_eq, object_block_entry_hash) (use_object_blocks_p, get_block_for_section, create_block_symbol) (use_blocks_for_decl_p, change_symbol_section): New functions. (get_variable_section): New function, split out from assemble_variable. (make_decl_rtl): Create a block symbol if use_object_blocks_p and use_blocks_for_decl_p say so. Use change_symbol_section if the symbol has already been created. (assemble_variable_contents): New function, split out from... (assemble_variable): ...here. Don't output any code for block symbols; just pass them to place_block_symbol. Use get_variable_section and assemble_variable_contents. (get_constant_alignment, get_constant_section, get_constant_size): New functions, split from output_constant_def_contents. (build_constant_desc): Create a block symbol if use_object_blocks_p says so. Or into SYMBOL_REF_FLAGS. (assemble_constant_contents): New function, split from... (output_constant_def_contents): ...here. Don't output any code for block symbols; just pass them to place_section_symbol. Use get_constant_section and get_constant_alignment. (force_const_mem): Create a block symbol if use_object_blocks_p and use_blocks_for_constant_p say so. Or into SYMBOL_REF_FLAGS. (output_constant_pool_1): Add an explicit alignment argument. Don't switch sections here. (output_constant_pool): Adjust call to output_constant_pool_1. Switch sections here instead. Don't output anything for block symbols; just pass them to place_block_symbol. (init_varasm_once): Initialize object_block_htab. (default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK. (default_asm_output_anchor, default_use_aenchors_for_symbol_p) (place_block_symbol, get_section_anchor, output_object_block) (output_object_block_htab, output_object_blocks): New functions. * target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro. (TARGET_ASM_OUT): Include it. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro. (TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros. (TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro. (TARGET_INITIALIZER): Include them. * rtl.c (rtl_check_failed_block_symbol): New function. * rtl.h: Include vec.h. Declare heap and gc rtx vectors. (block_symbol, object_block): New structures. (rtx_def): Add a block_symbol field to the union. (BLOCK_SYMBOL_CHECK): New macro. (rtl_check_failed_block_symbol): Declare. (SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags. (SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates. (SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2. (SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors. * output.h (output_section_symbols): Declare. (object_block): Name structure. (place_section_symbol, get_section_anchor, default_asm_output_anchor) (default_use_anchors_for_symbol_p): Declare. * Makefile.in (RTL_BASE_H): Add vec.h. (explow.o): Depend on output.h. * config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default. (TARGET_MAX_ANCHOR_OFFSET): Likewise. (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise. (rs6000_use_blocks_for_constant_p): New function. From-SVN: r111254
* re PR target/25603 (Miscompiled FORTRAN program)Denis Nagorny2006-02-161-1/+1
| | | | | | | | | | | | 2006-02-16 Denis Nagorny <denis_nagorny@linux.intel.com> PR rtl-optimization/25603 * reload.c (reg_inc_found_and_valid_p): New. Check REG_INC note. (regno_clobbered_p): Use it. Reusing SETS argument for REG_INC case. * reload1.c (choose_reload_regs): Added call of regno_clobbered_p with new meaning of SETS. From-SVN: r111162
* reload1.c (emit_reload_insns): Invalidate dead input registers used for reloads.Paul Brook2006-02-161-6/+11
| | | | | | | | | 2005-02-16 Paul Brook <paul@codesourcery.com> * reload1.c (emit_reload_insns): Invalidate dead input registers used for reloads. From-SVN: r111137
* * reload1.c (gen_reload): Also use find_replacement in UNARY_P case.J"orn Rennecke2006-02-131-1/+4
| | | | From-SVN: r110915
* reload1.c (emit_input_reload_insns): Delete code that tries to inherit using ↵Bernd Schmidt2006-02-091-62/+3
| | | | | | | | | find_equiv_reg. * reload1.c (emit_input_reload_insns): Delete code that tries to inherit using find_equiv_reg. From-SVN: r110806
* tree-vrp.c: Use XNEW/XCNEW allocation wrappers.Marcin Dalecki2006-01-311-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
* reload1.c (find_reload_regs): Note the details of reload failures in the ↵DJ Delorie2006-01-191-0/+8
| | | | | | | | | | dump file. * reload1.c (find_reload_regs): Note the details of reload failures in the dump file. (spill_failure): Likewise. From-SVN: r110006
* reload1.c (do_output_reload): Add assertion rejecting a CALL_INSN.Ian Lance Taylor2006-01-141-1/+1
| | | | | | | * reload1.c (do_output_reload): Add assertion rejecting a CALL_INSN. From-SVN: r109697
* re PR rtl-optimization/25432 (Reload ICE in gen_add2_insn)Alan Modra2005-12-231-10/+2
| | | | | | | | | | PR rtl-optimization/25432 * reload1.c (eliminate_regs_in_insn): Update insn code on successfully re-recognizing modified insn. * gcc.c-torture/compile/20051216-1.c: New test. From-SVN: r108985
* reload1.c (spill_failure): Dump failed reload data to dump file.DJ Delorie2005-12-191-0/+8
| | | | | | | * reload1.c (spill_failure): Dump failed reload data to dump file. (find_reload_regs): Likewise. From-SVN: r108830
* re PR rtl-optimization/25310 (ICE in reload_cse_simplify_operands, at ↵Ulrich Weigand2005-12-141-10/+25
| | | | | | | | | | | | | postreload.c:393) PR rtl-optimization/25310 * reload1.c (eliminate_regs_in_insn): Handle lowpart SUBREGs of the eliminable register when substituting into a PLUS. PR rtl-optimization/25310 * gcc.c-torture/compile/pr25310.c: New test. From-SVN: r108543
* re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391)J"orn Rennecke2005-11-241-64/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
* re PR middle-end/24912 (m68k build failure: ICE: in ↵Hans-Peter Nilsson2005-11-191-34/+81
| | | | | | | | | | | | | | | reload_cse_simplify_operands) PR middle-end/24912 PR middle-end/24750 * reload.c (find_reloads_address_1): Mention dependency on gen_reload. * reload1.c (gen_reload): For IN with an unary operation, try moving inner expression to OUT if trivial SET is not valid. Confirm that the result is valid. Move common code block into... (emit_insn_if_valid_for_reload): New function. From-SVN: r107231
* re PR rtl-optimization/24160 (ICE with -O1 -ftree-vectorize -msse)Richard Henderson2005-11-161-44/+87
| | | | | | | | | | | | | | | | | | | | PR rtl-opt/24160 PR target/24621 * reload1.c (reg_equiv_invariant): New. (reload): Allocate, initialize, and free it. (calculate_needs_all_insns): Check it when skipping equivalence setting insns. (alter_reg): Likewise. (eliminate_regs_1): Rename from eliminate_regs. Add new may_use_invariant argument; only use reg_equiv_invariant when true. (eliminate_regs): New. (eliminate_regs_in_insn): Use eliminate_regs_1; track when we're in a context for which may_use_invariant may be true. Co-Authored-By: J"orn Rennecke <joern.rennecke@st.com> Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com> From-SVN: r107093
* reload1.c (merge_assigned_reloads): Do not change any ↵Daniel Jacobowitz2005-09-301-4/+7
| | | | | | | | | RELOAD_FOR_OUTPUT_ADDRESS reloads. * reload1.c (merge_assigned_reloads): Do not change any RELOAD_FOR_OUTPUT_ADDRESS reloads. From-SVN: r104827
* reload1.c (fixup_eh_region_note): Remove assertion.Andreas Krebbel2005-09-071-18/+9
| | | | | | | | | | 2005-09-07 Andreas Krebbel <krebbel1@de.ibm.com> * reload1.c (fixup_eh_region_note): Remove assertion. (fixup_abnormal_edges): Reverted removal of call to find_many_sub_basic_blocks made on 2005-08-31. From-SVN: r103984
* re PR middle-end/23676 (ICE: "missing REG_EH_REGION note in the end of bb")Richard Henderson2005-09-011-1/+1
| | | | | | | | | PR 23676 * reload1.c (reload_as_needed): Check !CALL_P before calling fixup_eh_region_note. * rtlanal.c (may_trap_p): SUBREG by itself cannot trap. From-SVN: r103751
* re PR rtl-optimization/23601 (reload may drop non-call exception information)Richard Henderson2005-08-311-37/+106
| | | | | | | | | | | | | | PR rtl-opt/23601 * reload1.c (reload): Set MEM_NOTRAP_P in spill slots. (fixup_eh_region_note): New. (reload_as_needed): Call it. (fixup_abnormal_edges): Allow all throwing insns to be deleted; don't call find_many_sub_basic_blocks; call verify_flow_info. * function.c (assign_stack_local_1): Set MEM_NOTRAP_P. (keep_stack_depressed): Likewise. (assign_stack_temp_for_type): Likewise; use adjust_address_nv. From-SVN: r103680
* Fix uninitialized register read problem.James E Wilson2005-08-191-0/+1
| | | | | | | | | | | | | * builtins.c (expand_builtin_return_addr): Set current_function_accesses_prior_frames when count != 0. Use frame_pointer_rtx when count == 0. * function.h (struct function): Add accesses_prior_frames field. (current_function_accesses_prior_frames): Define. * reload1.c (init_elim_table): Check current_function_accesses_prior_frames. * doc/tm.texi (INITIAL_FRAME_ADDRESS_RTX): Update docs. From-SVN: r103294
* dwarf2out.c, [...]: Fix comment typos.Kazu Hirata2005-08-011-1/+1
| | | | | | | | | | | * dwarf2out.c, fold-const.c, ipa-type-escape.c, loop-invariant.c, predict.c, predict.def, reload1.c, reorg.c, tree-sra.c, config/arm/arm.c, config/crx/crx.c, config/i386/i386.c, config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.c, config/stormy16/stormy16.c: Fix comment typos. From-SVN: r102620
* Update FSF address.Kelley Cook2005-06-251-2/+2
| | | | From-SVN: r101317
* basic-block.h (rtl_bb_info): Break out head_, end_, global_live_at_start, ↵Jan Hubicka2005-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | global_live_at_end from ... * basic-block.h (rtl_bb_info): Break out head_, end_, global_live_at_start, global_live_at_end from ... (basic_block_def): ... here; update all references (BB_RTL): New flag. (init_rtl_bb_info): Declare. * cfgexpand.c (expand_gimple_basic_block): Init bb info, set BB_RTL flag. * cfgrtl.c: Include ggc.h (create_basic_block_structure): Init bb info. (rtl_verify_flow_info_1): Check BB_RTL flag and rtl_bb_info pointer. (init_rtl_bb_info): New function. (rtl_merge_block, cfglayout_merge_block): Copy global_live_at_end here. * cfghooks.c (merge_block): Do not copy global_live_at_end here. * cfg.c (clear_bb_flags): Skip BB_RTL flag. (dump_flow_info): Gueard global_live_* dumping. From-SVN: r101082
* Makefile.in (local-alloc.o): Depend on $(GGC_H) and reload.h.Bernd Schmidt2005-06-151-83/+70
| | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (local-alloc.o): Depend on $(GGC_H) and reload.h. * local-alloc.c: Include "ggc.h" and "reload.h". (struct equivalence): New member is_arg_equivalence. (local_alloc): Always call update_equiv_regs. (update_equiv_regs): Allocate reg_equiv_init; set reg_equiv_init_size. Detect equivalences made by stores to memory in a second pass. Return early if not optimizing. Initialize reg_equiv_init for all equivalences; treat equivalences for REG_EQUIV notes existing before this pass specially. (no_equiv): Don't clear reg_equiv_init or remove notes if the is_arg_equivalence field is set. * reload.h (reg_equiv_init, reg_equiv_init_size): Declare. * reload1.c (reg_equiv_init): No longer static. (reg_equiv_init_size): New variable. (reload): Don't allocate reg_equiv_init; don't free it when done but clear it. Restructure equivalence set up code not to set reg_equiv_init, but to clear it when we can't use an equivalence. Undo change disabling equivalences for MEM_READONLY_P memrefs. Dump equivalencing insns to dump_file. From-SVN: r100975
* Revert my previous patch.Bernd Schmidt2005-06-031-8/+11
| | | | From-SVN: r100536
* reload1.c (reload): Undo 2005-04-20 change.Bernd Schmidt2005-06-021-11/+8
| | | | | | | * reload1.c (reload): Undo 2005-04-20 change. Make sure we detect the correct set of init_insns that need deletion. From-SVN: r100481
* re PR rtl-optimization/21767 (if-convert leaves invalid REG_EQUAL notes)J"orn Rennecke2005-06-011-2/+1
| | | | | | | | | | PR rtl-optimization/21767 * rtl.h (function_invariant_p): Re-add declaration. * reload1.c (function_invariant_p): No longer static. * ifcvt.c (dead_or_predicable): Remove REG_EQUAL notes that might have become invalid. From-SVN: r100448
* reload1.c (verify_initial_elim_offsets): Add braces to avoid having a ↵Ian Lance Taylor2005-05-261-8/+10
| | | | | | | | | declaration after a statement. * reload1.c (verify_initial_elim_offsets): Add braces to avoid having a declaration after a statement. From-SVN: r100187
* reload1.c (verify_initial_elim_offsets): Return boolean status instead of ↵Ulrich Weigand2005-05-251-6/+19
| | | | | | | | | | | | | | | | | aborting. ChangeLog: * reload1.c (verify_initial_elim_offsets): Return boolean status instead of aborting. (reload): Adapt verify_initial_elim_offsets call site. Restart main loop if some initial elimination offsets changed. testsuite/ChangeLog: * gcc.dg/20050524-1.c: New test. From-SVN: r100159
* diagnostic.c (warning): Accept parameter to classify warning option.DJ Delorie2005-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * diagnostic.c (warning): Accept parameter to classify warning option. (warning0): New, for when a pointer to an error() like function is needed. * errors.c (warning): Likewise. * errors.h (warning, warning0): Adjust prototypes. * toplev.h (warning, warning0): Likewise. * attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c, c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c, c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c, fold-const.c, fortran/trans-decl.c, function.c, gcse.c, genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c, tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c, tree-ssa.c, tree.c, varasm.c: Adjust warning() callers. * config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c, config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/darwin.h, config/h8300/h8300.c, config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c, config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c, config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h, config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h, config/rs6000/aix52.h, config/rs6000/darwin.h, config/rs6000/rs6000-c.c, config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh.h, config/sh/symbian.c, config/sol2-c.c, config/sol2.c, config/stormy16/stormy16.c, config/v850/v850-c.c, config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning() callers. * ada/misc.c: Adjust warning() callers. * cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c, cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c, cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c, cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers. * fortran/trans-decl.c: Adjust warning() callers. * java/class.c, java/decl.c, java/expr.c, java/jcf-io.c, java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning() callers. * objc/objc-act.c: Adjust warning() callers. * treelang/parse.y: Adjust warning() callers. From-SVN: r98633
* lambda.h (lambda_vector_min_nz): Likewise.Nathan Sidwell2005-04-211-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lambda.h (lambda_vector_min_nz): Likewise. * langhooks.h (struct lang_hooks_for_types, struct lang_hooks): Likewise. * output.h (assemble_integer, this_is_asm_operands): Likewise. * tree.h: Likewise. * vec.h: Likewise. * tree-flow-inline.h (relink_imm_use): Use gcc_assert. * optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword comments to avoid 'abort'. Use gcc_assert as necessary. * opts.c (common_handle_option): Likewise. * pretty-print.c (pp_base_format_text): Likewise. * print-rtl.c (print_rtx): Likewise. * read-rtl.c (read_rtx_filename, read_rtx_1): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_valid_class, find_reloads_toplev, find_equiv_reg): Likewise. * reload1.c (reload, forget_old_reloads_1, function_invariant_p, merge_assigned_reloads): Likewise. * tree-inline.c (inline_forbidden_p_1, estimate_num_insns_1): Likewise. * tree-optimize.c (execute_todo): Likewise. * tree-outof-ssa.c (eliminate_phi): Likewise. * tree-ssa-alias.c (add_pointed_to_expr): Likewise. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise. * tree-ssa-operands.c (parse_ssa_operands, get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise. * tree-ssa-pre.c (find_or_generate_expression): Likewise. * tree-ssanames.c (release_ssa_name): Likewise. * tree.c (int_bit_position, int_byte_position, tree_low_cst, walk_tree): Likewise. * tree-ssa-operands.c (verify_abort): Fold into .. (verify_imm_links): ... here. From-SVN: r98519
* reload1.c (reload): Ignore equivalences between pseudos and read only memory.Jeff Law2005-04-201-2/+14
| | | | | | | * reload1.c (reload): Ignore equivalences between pseudos and read only memory. From-SVN: r98466