Skip to content
Snippets Groups Projects
  1. Jan 03, 2024
  2. Jun 29, 2023
    • Uros Bizjak's avatar
      cselib+expr+bitmap: Change return type of predicate functions from int to bool · c41332ab
      Uros Bizjak authored
      gcc/ChangeLog:
      
      	* cselib.h (rtx_equal_for_cselib_1):
      	Change return type from int to bool.
      	(references_value_p): Ditto.
      	(rtx_equal_for_cselib_p): Ditto.
      	* expr.h (can_store_by_pieces): Ditto.
      	(try_casesi): Ditto.
      	(try_tablejump): Ditto.
      	(safe_from_p): Ditto.
      	* sbitmap.h (bitmap_equal_p): Ditto.
      	* cselib.cc (references_value_p): Change return type
      	from int to void and adjust function body accordingly.
      	(rtx_equal_for_cselib_1): Ditto.
      	* expr.cc (is_aligning_offset): Ditto.
      	(can_store_by_pieces): Ditto.
      	(mostly_zeros_p): Ditto.
      	(all_zeros_p): Ditto.
      	(safe_from_p): Ditto.
      	(is_aligning_offset): Ditto.
      	(try_casesi): Ditto.
      	(try_tablejump): Ditto.
      	(store_constructor): Change "need_to_clear" and
      	"const_bounds_p" variables to bool.
      	* sbitmap.cc (bitmap_equal_p): 	Change return type from int to bool.
      c41332ab
  3. Feb 16, 2023
    • Patrick Palka's avatar
      don't declare header-defined functions both static and inline · cb3e0eac
      Patrick Palka authored
      Many functions defined in our headers are declared 'static inline' which
      is a C idiom whose use predates our move to C++ as the implementation
      language.  But in C++ the inline keyword is more than just a compiler
      hint, and is sufficient to give the function the intended semantics.
      In fact declaring a function both static and inline is a pessimization
      since static effectively disables the desired definition merging
      behavior enabled by inline, and is also a source of (harmless) ODR
      violations when a static inline function gets called from a non-static
      inline one (such as tree_operand_check calling tree_operand_length).
      
      This patch mechanically fixes the vast majority of occurrences of this
      anti-pattern throughout the compiler's headers via the command line
      
        sed -i 's/^static inline/inline/g' gcc/*.h gcc/*/*.h
      
      There's also a manual change to remove the redundant declarations
      of is_ivar and lookup_category in gcc/objc/objc-act.cc which would
      otherwise conflict with their modified definitions in objc-act.h
      (due to the difference in staticness).
      
      Besides fixing some ODR violations, this speeds up stage1 cc1plus by
      about 2% and reduces the size of its text segment by 1.5MB.
      
      gcc/ChangeLog:
      
      	* addresses.h: Mechanically drop 'static' from 'static inline'
      	functions via s/^static inline/inline/g.
      	* asan.h: Likewise.
      	* attribs.h: Likewise.
      	* basic-block.h: Likewise.
      	* bitmap.h: Likewise.
      	* cfghooks.h: Likewise.
      	* cfgloop.h: Likewise.
      	* cgraph.h: Likewise.
      	* cselib.h: Likewise.
      	* data-streamer.h: Likewise.
      	* debug.h: Likewise.
      	* df.h: Likewise.
      	* diagnostic.h: Likewise.
      	* dominance.h: Likewise.
      	* dumpfile.h: Likewise.
      	* emit-rtl.h: Likewise.
      	* except.h: Likewise.
      	* expmed.h: Likewise.
      	* expr.h: Likewise.
      	* fixed-value.h: Likewise.
      	* gengtype.h: Likewise.
      	* gimple-expr.h: Likewise.
      	* gimple-iterator.h: Likewise.
      	* gimple-predict.h: Likewise.
      	* gimple-range-fold.h: Likewise.
      	* gimple-ssa.h: Likewise.
      	* gimple.h: Likewise.
      	* graphite.h: Likewise.
      	* hard-reg-set.h: Likewise.
      	* hash-map.h: Likewise.
      	* hash-set.h: Likewise.
      	* hash-table.h: Likewise.
      	* hwint.h: Likewise.
      	* input.h: Likewise.
      	* insn-addr.h: Likewise.
      	* internal-fn.h: Likewise.
      	* ipa-fnsummary.h: Likewise.
      	* ipa-icf-gimple.h: Likewise.
      	* ipa-inline.h: Likewise.
      	* ipa-modref.h: Likewise.
      	* ipa-prop.h: Likewise.
      	* ira-int.h: Likewise.
      	* ira.h: Likewise.
      	* lra-int.h: Likewise.
      	* lra.h: Likewise.
      	* lto-streamer.h: Likewise.
      	* memmodel.h: Likewise.
      	* omp-general.h: Likewise.
      	* optabs-query.h: Likewise.
      	* optabs.h: Likewise.
      	* plugin.h: Likewise.
      	* pretty-print.h: Likewise.
      	* range.h: Likewise.
      	* read-md.h: Likewise.
      	* recog.h: Likewise.
      	* regs.h: Likewise.
      	* rtl-iter.h: Likewise.
      	* rtl.h: Likewise.
      	* sbitmap.h: Likewise.
      	* sched-int.h: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sese.h: Likewise.
      	* sparseset.h: Likewise.
      	* ssa-iterators.h: Likewise.
      	* system.h: Likewise.
      	* target-globals.h: Likewise.
      	* target.h: Likewise.
      	* timevar.h: Likewise.
      	* tree-chrec.h: Likewise.
      	* tree-data-ref.h: Likewise.
      	* tree-iterator.h: Likewise.
      	* tree-outof-ssa.h: Likewise.
      	* tree-phinodes.h: Likewise.
      	* tree-scalar-evolution.h: Likewise.
      	* tree-sra.h: Likewise.
      	* tree-ssa-alias.h: Likewise.
      	* tree-ssa-live.h: Likewise.
      	* tree-ssa-loop-manip.h: Likewise.
      	* tree-ssa-loop.h: Likewise.
      	* tree-ssa-operands.h: Likewise.
      	* tree-ssa-propagate.h: Likewise.
      	* tree-ssa-sccvn.h: Likewise.
      	* tree-ssa.h: Likewise.
      	* tree-ssanames.h: Likewise.
      	* tree-streamer.h: Likewise.
      	* tree-switch-conversion.h: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree.h: Likewise.
      	* wide-int.h: Likewise.
      
      gcc/c-family/ChangeLog:
      
      	* c-common.h: Mechanically drop static from static inline
      	functions via s/^static inline/inline/g.
      
      gcc/c/ChangeLog:
      
      	* c-parser.h: Mechanically drop static from static inline
      	functions via s/^static inline/inline/g.
      
      gcc/cp/ChangeLog:
      
      	* cp-tree.h: Mechanically drop static from static inline
      	functions via s/^static inline/inline/g.
      
      gcc/fortran/ChangeLog:
      
      	* gfortran.h: Mechanically drop static from static inline
      	functions via s/^static inline/inline/g.
      
      gcc/jit/ChangeLog:
      
      	* jit-dejagnu.h: Mechanically drop static from static inline
      	functions via s/^static inline/inline/g.
      	* jit-recording.h: Likewise.
      
      gcc/objc/ChangeLog:
      
      	* objc-act.h: Mechanically drop static from static inline
      	functions via s/^static inline/inline/g.
      	* objc-map.h: Likewise.
      	* objc-act.cc: Remove the redundant redeclarations of is_ivar
      	and lookup_category.
      cb3e0eac
  4. Jan 02, 2023
  5. Aug 03, 2022
    • Richard Earnshaw's avatar
      cselib: add function to check if SET is redundant [PR106187] · 64ce76d9
      Richard Earnshaw authored
      A SET operation that writes memory may have the same value as an
      earlier store but if the alias sets of the new and earlier store do
      not conflict then the set is not truly redundant.  This can happen,
      for example, if objects of different types share a stack slot.
      
      To fix this we define a new function in cselib that first checks for
      equality and if that is successful then finds the earlier store in the
      value history and checks the alias sets.
      
      The routine is used in two places elsewhere in the compiler:
      cfgcleanup and postreload.
      
      gcc/ChangeLog:
      
      	PR rtl-optimization/106187
      	* alias.h (mems_same_for_tbaa_p): Declare.
      	* alias.cc (mems_same_for_tbaa_p): New function.
      	* dse.cc (record_store): Use it instead of open-coding
      	alias check.
      	* cselib.h (cselib_redundant_set_p): Declare.
      	* cselib.cc: Include alias.h
      	(cselib_redundant_set_p): New function.
      	* cfgcleanup.cc: (mark_effect): Use cselib_redundant_set_p instead
      	of rtx_equal_for_cselib_p.
      	* postreload.cc (reload_cse_simplify): Use cselib_redundant_set_p.
      	(reload_cse_noop_set_p): Delete.
      64ce76d9
  6. Jan 03, 2022
  7. Jan 04, 2021
  8. Apr 09, 2020
    • Jakub Jelinek's avatar
      cselib, var-tracking: Improve debug info after the cselib sp tracking changes [PR94495] · 33c45e51
      Jakub Jelinek authored
      On the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94495#c5
      testcase GCC emits worse debug info after the PR92264 cselib.c
      changes.
      The difference at -O2 -g -dA in the assembly is (when ignoring debug info):
              # DEBUG g => [argp]
              # DEBUG k => [argp+0x20]
              # DEBUG j => [argp+0x18]
              # DEBUG a => di
              # DEBUG b => si
              # DEBUG c => dx
              # DEBUG d => cx
              # DEBUG h => [argp+0x8]
              # DEBUG e => r8
              # DEBUG i => [argp+0x10]
              # DEBUG f => r9
      ...
       .LVL4:
      +       # DEBUG h => [sp+0x10]
      +       # DEBUG i => [sp+0x18]
      +       # DEBUG j => [sp+0x20]
      +       # DEBUG k => [sp+0x28]
              # DEBUG c => entry_value
       # SUCC: EXIT [always]  count:1073741824 (estimated locally)
              ret
       .LVL5:
      +       # DEBUG k => [argp+0x20]
              # DEBUG a => bx
              # DEBUG b => si
              # DEBUG c => dx
              # DEBUG d => cx
              # DEBUG e => r8
              # DEBUG f => r9
      +       # DEBUG h => [argp+0x8]
      +       # DEBUG i => [argp+0x10]
      +       # DEBUG j => [argp+0x18]
      This means that before the changes, h, i, j, k could be all expressed
      in DW_AT_location directly with DW_OP_fbreg <some_offset>, but now we need
      to use a location list, where in the first part of the function and last
      part of the function (everything except the ret instruction) we use that
      DW_OP_fbreg <some_offset>, but for the single ret instruction we instead
      say those values live in something pointed by stack pointer + offset.
      It is true, but only because stack pointer + offset is equal to DW_OP_fbreg
      <some_offset> at that point.
      
      The var-tracking pass has for !frame_pointer_needed functions code to
      canonicalize stack pointer uses in the insns before it hands it over
      to cselib to cfa_base_rtx + offset depending on the stack depth at each
      point.  The problem is that on the last epilogue pop insn (the one right
      before ret) the canonicalization is sp = argp - 8 and add_stores records
      a MO_VAL_SET operation for that argp - 8 value (which is the
      SP_DERIVED_VALUE_P VALUE the cselib changes canonicalize sp based accesses
      on) and thus var-tracking from that point onwards tracks that that VALUE
      (2:2) now lives in sp.  At the end of function it of course needs to forget
      it again (or it would need on any changes to sp).  But when processing
      that uop, we note that the VALUE has changed and anything based on it
      changed too, so emit changes for everything.  Before that var-tracking
      itself doesn't track it in any register, so uses cselib and cselib knows
      through the permanent equivs how to compute it using argp (i.e. what
      will be DW_OP_fbreg).
      
      The following fix has two parts.  One is it detects if cselib can compute
      a certain VALUE using the cfa_base_rtx and for such VALUEs doesn't add
      the MO_VAL_SET operation, as it is better to express them using cfa_base_rtx
      rather than temporarily through something else.  And the other is make sure
      we reuse in !frame_pointer_needed the single SP_DERIVED_VALUE_P VALUE in
      other extended basic blocks too (and other VALUEs) too.  This can be done
      because we have computed the stack depths at the start of each basic block
      in vt_stack_adjustments and while cselib_reset_table is called at the end
      of each extended bb, which throws away all hard registers (but the magic
      cfa_base_rtx) and so can hint cselib.c at the start of the ebb what VALUE
      the sp hard reg has.  That means fewer VALUEs during var-tracking and more
      importantly that they will all have the cfa_base_rtx + offset equivalency.
      
      I have performed 4 bootstraps+regtests (x86_64-linux and i686-linux,
      each with this patch (that is the new cselib + var-tracking variant) and
      once with that patch reverted as well as all other cselib.c changes from
      this month; once that bootstrapped, I've reapplied the cselib.c changes and
      this patch and rebuilt cc1plus, so that the content is comparable, but built
      with the pre-Apr 2 cselib.c+var-tracking.c (that is the old cselib one)).
      
      Below are readelf -WS cc1plus | grep debug_ filtered to only have debug
      sections whose size actually changed, followed by dwlocstat results on
      cc1plus.  This shows that there was about 3% shrink in those .debug*
      sections for 32-bit and 1% shrink for 64-bit, with minor variable coverage
      changes one or the other way that are IMHO insignificant.
      
      32-bit old cselib
        [33] .debug_info       PROGBITS        00000000 29139c0 710e5fa 00      0   0  1
        [34] .debug_abbrev     PROGBITS        00000000 9a21fba 21ad6d 00      0   0  1
        [35] .debug_line       PROGBITS        00000000 9c3cd27 1a05e56 00      0   0  1
        [36] .debug_str        PROGBITS        00000000 b642b7d 7cad09 01  MS  0   0  1
        [37] .debug_loc        PROGBITS        00000000 be0d886 5792627 00      0   0  1
        [38] .debug_ranges     PROGBITS        00000000 1159fead e57218 00      0   0  1
      sum 263075589B
      32-bit new cselib + var-tracking
        [33] .debug_info       PROGBITS        00000000 29129c0 71065d1 00      0   0  1
        [34] .debug_abbrev     PROGBITS        00000000 9a18f91 21af28 00      0   0  1
        [35] .debug_line       PROGBITS        00000000 9c33eb9 195dffc 00      0   0  1
        [36] .debug_str        PROGBITS        00000000 b591eb5 7cace0 01  MS  0   0  1
        [37] .debug_loc        PROGBITS        00000000 bd5cb95 50185bf 00      0   0  1
        [38] .debug_ranges     PROGBITS        00000000 10d75154 e57068 00      0   0  1
      sum 254515196B (8560393B smaller)
      64-bit old cselib
        [33] .debug_info       PROGBITS        0000000000000000 25e64b0 84d7cc9 00      0   0  1
        [34] .debug_abbrev     PROGBITS        0000000000000000 aabe179 225e2d 00      0   0  1
        [35] .debug_line       PROGBITS        0000000000000000 ace3fa6 19a3505 00      0   0  1
        [37] .debug_loc        PROGBITS        0000000000000000 ce6e960 89707bc 00      0   0  1
        [38] .debug_ranges     PROGBITS        0000000000000000 157df11c 1c59a70 00      0   0  1
      sum 342274599B
      64-bit new cselib + var-tracking
        [33] .debug_info       PROGBITS        0000000000000000 25e64b0 84d8e86 00      0   0  1
        [34] .debug_abbrev     PROGBITS        0000000000000000 aabf336 225e8d 00      0   0  1
        [35] .debug_line       PROGBITS        0000000000000000 ace51c3 199ded5 00      0   0  1
        [37] .debug_loc        PROGBITS        0000000000000000 ce6a54d 85f62da 00      0   0  1
        [38] .debug_ranges     PROGBITS        0000000000000000 15460827 1c59a20 00      0   0  1
      sum 338610402B (3664197B smaller)
      32-bit old cselib
      cov%	samples	cumul
      0..10	1231599/48%	1231599/48%
      11..20	31017/1%	1262616/49%
      21..30	36495/1%	1299111/51%
      31..40	35846/1%	1334957/52%
      41..50	47179/1%	1382136/54%
      51..60	41203/1%	1423339/56%
      61..70	65504/2%	1488843/58%
      71..80	59656/2%	1548499/61%
      81..90	104399/4%	1652898/65%
      91..100	882231/34%	2535129/100%
      32-bit new cselib + var-tracking
      cov%	samples	cumul
      0..10	1230542/48%	1230542/48%
      11..20	30385/1%	1260927/49%
      21..30	36393/1%	1297320/51%
      31..40	36053/1%	1333373/52%
      41..50	47670/1%	1381043/54%
      51..60	41599/1%	1422642/56%
      61..70	65902/2%	1488544/58%
      71..80	59911/2%	1548455/61%
      81..90	104607/4%	1653062/65%
      91..100	882067/34%	2535129/100%
      64-bit old cselib
      cov%	samples	cumul
      0..10	1233211/48%	1233211/48%
      11..20	31120/1%	1264331/49%
      21..30	39230/1%	1303561/51%
      31..40	38887/1%	1342448/52%
      41..50	47519/1%	1389967/54%
      51..60	45264/1%	1435231/56%
      61..70	69431/2%	1504662/59%
      71..80	62114/2%	1566776/61%
      81..90	104587/4%	1671363/65%
      91..100	876085/34%	2547448/100%
      64-bit new cselib + var-tracking
      cov%	samples	cumul
      0..10	1233471/48%	1233471/48%
      11..20	31093/1%	1264564/49%
      21..30	39217/1%	1303781/51%
      31..40	38851/1%	1342632/52%
      41..50	47488/1%	1390120/54%
      51..60	45224/1%	1435344/56%
      61..70	69409/2%	1504753/59%
      71..80	62140/2%	1566893/61%
      81..90	104616/4%	1671509/65%
      91..100	875939/34%	2547448/100%
      
      2020-04-09  Jakub Jelinek  <jakub@redhat.com>
      
      	PR debug/94495
      	* cselib.h (cselib_record_sp_cfa_base_equiv,
      	cselib_sp_derived_value_p): Declare.
      	* cselib.c (cselib_record_sp_cfa_base_equiv,
      	cselib_sp_derived_value_p): New functions.
      	* var-tracking.c (add_stores): Don't record MO_VAL_SET for
      	cselib_sp_derived_value_p values.
      	(vt_initialize): Call cselib_record_sp_cfa_base_equiv at the
      	start of extended basic blocks other than the first one
      	for !frame_pointer_needed functions.
      33c45e51
  9. Jan 01, 2020
  10. Oct 01, 2019
    • Richard Sandiford's avatar
      Remove clobber_high · 17d184e5
      Richard Sandiford authored
      The AArch64 SVE tlsdesc patterns were the main motivating reason
      for clobber_high.  It's no longer needed now that the patterns use
      calls instead.
      
      At the time, one of the possible future uses for clobber_high was for
      asm statements.  However, the current code wouldn't handle that case
      without modification, so I think we might as well remove it for now.
      We can always reapply it in future if it turns out to be useful again.
      
      2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* rtl.def (CLOBBER_HIGH): Delete.
      	* doc/rtl.texi (clobber_high): Remove documentation.
      	* rtl.h (SET_DEST): Remove CLOBBER_HIGH from the list of codes.
      	(reg_is_clobbered_by_clobber_high): Delete.
      	(gen_hard_reg_clobber_high): Likewise.
      	* alias.c (record_set): Remove CLOBBER_HIGH handling.
      	* cfgexpand.c (expand_gimple_stmt): Likewise.
      	* combine-stack-adj.c (single_set_for_csa): Likewise.
      	* combine.c (find_single_use_1, set_nonzero_bits_and_sign_copies)
      	(can_combine_p, is_parallel_of_n_reg_sets, try_combine)
      	(record_dead_and_set_regs_1, reg_dead_at_p_1): Likewise.
      	* cse.c (invalidate_reg): Remove clobber_high parameter.
      	(invalidate): Update call accordingly.
      	(canonicalize_insn): Remove CLOBBER_HIGH handling.
      	(invalidate_from_clobbers, invalidate_from_sets_and_clobbers)
      	(count_reg_usage, insn_live_p): Likewise.
      	* cselib.h (cselib_invalidate_rtx): Remove sett argument.
      	* cselib.c (cselib_invalidate_regno, cselib_invalidate_rtx): Likewise.
      	(cselib_invalidate_rtx_note_stores): Update call accordingly.
      	(cselib_expand_value_rtx_1): Remove CLOBBER_HIGH handling.
      	(cselib_invalidate_regno, cselib_process_insn): Likewise.
      	* dce.c (deletable_insn_p, mark_nonreg_stores_1): Likewise.
      	(mark_nonreg_stores_2): Likewise.
      	* df-scan.c (df_find_hard_reg_defs, df_uses_record): Likewise.
      	(df_get_call_refs): Likewise.
      	* dwarf2out.c (mem_loc_descriptor): Likewise.
      	* emit-rtl.c (verify_rtx_sharing): Likewise.
      	(copy_insn_1, copy_rtx_if_shared_1): Likewise.
      	(hard_reg_clobbers_high, gen_hard_reg_clobber_high): Delete.
      	* genconfig.c (walk_insn_part): Remove CLOBBER_HIGH handling.
      	* genemit.c (gen_exp, gen_insn): Likewise.
      	* genrecog.c (validate_pattern, remove_clobbers): Likewise.
      	* haifa-sched.c (haifa_classify_rtx): Likewise.
      	* ira-build.c (create_insn_allocnos): Likewise.
      	* ira-costs.c (scan_one_insn): Likewise.
      	* ira.c (equiv_init_movable_p, memref_referenced_p): Likewise.
      	(rtx_moveable_p, interesting_dest_for_shprep): Likewise.
      	* jump.c (mark_jump_label_1): Likewise.
      	* lra-int.h (lra_insn_reg::clobber_high): Delete.
      	* lra-eliminations.c (lra_eliminate_regs_1): Remove CLOBBER_HIGH
      	handling.
      	(mark_not_eliminable): Likewise.
      	* lra-lives.c (process_bb_lives): Likewise.
      	* lra.c (new_insn_reg): Remove clobber_high parameter.
      	(collect_non_operand_hard_regs): Likewise.  Update call to new
      	insn_reg.  Remove CLOBBER_HIGH handling.
      	(lra_set_insn_recog_data): Remove CLOBBER_HIGH handling.  Update call
      	to collect_non_operand_hard_regs.
      	(add_regs_to_insn_regno_info): Remove CLOBBER_HIGH handling.
      	Update call to new_insn_reg.
      	(lra_update_insn_regno_info): Remove CLOBBER_HIGH handling.
      	* postreload.c (reload_cse_simplify, reload_combine_note_use)
      	(move2add_note_store): Likewise.
      	* print-rtl.c (print_pattern): Likewise.
      	* recog.c (store_data_bypass_p_1, store_data_bypass_p): Likewise.
      	(if_test_bypass_p): Likewise.
      	* regcprop.c (kill_clobbered_value, kill_set_value): Likewise.
      	* reginfo.c (reg_scan_mark_refs): Likewise.
      	* reload1.c (maybe_fix_stack_asms, eliminate_regs_1): Likewise.
      	(elimination_effects, mark_not_eliminable, scan_paradoxical_subregs)
      	(forget_old_reloads_1): Likewise.
      	* reorg.c (find_end_label, try_merge_delay_insns, redundant_insn)
      	(own_thread_p, fill_simple_delay_slots, fill_slots_from_thread)
      	(dbr_schedule): Likewise.
      	* resource.c (update_live_status, mark_referenced_resources)
      	(mark_set_resources): Likewise.
      	* rtl.c (copy_rtx): Likewise.
      	* rtlanal.c (reg_referenced_p, set_of_1, single_set_2, noop_move_p)
      	(note_pattern_stores): Likewise.
      	(reg_is_clobbered_by_clobber_high): Delete.
      	* sched-deps.c (sched_analyze_reg, sched_analyze_insn): Remove
      	CLOBBER_HIGH handling.
      
      From-SVN: r276393
      17d184e5
  11. Jan 01, 2019
  12. Aug 06, 2018
    • Alan Hayward's avatar
      cse support for clobber_high · 99788e06
      Alan Hayward authored
      gcc/
      	* cse.c (invalidate_reg): New function extracted from...
      	(invalidate): ...here.
      	(canonicalize_insn): Check for clobber high.
      	(invalidate_from_clobbers): invalidate clobber highs.
      	(invalidate_from_sets_and_clobbers): Likewise.
      	(count_reg_usage): Check for clobber high.
      	(insn_live_p): Likewise.
      	* cselib.c (cselib_expand_value_rtx_1):Likewise.
      	(cselib_invalidate_regno): Check for clobber in setter.
      	(cselib_invalidate_rtx): Pass through setter.
      	(cselib_invalidate_rtx_note_stores):
      	(cselib_process_insn): Check for clobber high.
      	* cselib.h (cselib_invalidate_rtx): Add operand.
      
      From-SVN: r263330
      99788e06
  13. Jan 03, 2018
  14. Mar 31, 2017
    • Jakub Jelinek's avatar
      re PR debug/80025 (ICE w/ -O2 (-O3, -Ofast) -g -ftracer (infinite recursion in... · 005f12bf
      Jakub Jelinek authored
      re PR debug/80025 (ICE w/ -O2 (-O3, -Ofast) -g -ftracer (infinite recursion in rtx_equal_for_cselib_1))
      
      	PR debug/80025
      	* cselib.h (rtx_equal_for_cselib_1): Add depth argument.
      	(rtx_equal_for_cselib_p): Pass 0 to it.
      	* cselib.c (cselib_hasher::equal): Likewise.
      	(rtx_equal_for_cselib_1): Add depth argument.  If depth
      	is 128, don't look up VALUE locs and punt.  Increment
      	depth in recursive calls when walking VALUE locs.
      
      	* gcc.dg/torture/pr80025.c: New test.
      
      From-SVN: r246606
      005f12bf
  15. Jan 01, 2017
  16. May 02, 2016
  17. Jan 04, 2016
  18. Jul 16, 2015
    • Martin Liska's avatar
      Add new object_allocator and clean-up allocator usage. · fb0b2914
      Martin Liska authored
      	* c-format.c (static void check_format_info_main): Use
      	object_allocator instead of pool_allocator.
      	(check_format_arg): Likewise.
      	(check_format_info_main): Likewise.
      	* alloc-pool.h
      	(object_allocator): Add new class.
      	(pool_allocator::initialize): Use the underlying class.
      	(pool_allocator::allocate): Likewise.
      	(pool_allocator::remove): Likewise.
      	(operator new): A new generic allocator.
      	* asan.c (struct asan_mem_ref): Remove unused members.
      	(asan_mem_ref_new): Replace new operator with
      	object_allocator::allocate.
      	(free_mem_ref_resources): Change deallocation.
      	* cfg.c (initialize_original_copy_tables): Replace pool_allocator
      	with object_allocator.
      	* config/sh/sh.c (add_constant): Replace new operator with
      	object_allocator::allocate.
      	(sh_reorg): Change call to a release method.
      	* cselib.c (struct elt_list): Remove unused members.
      	(new_elt_list): Replace new operator with
      	object_allocator::allocate.
      	(new_elt_loc_list): Likewise.
      	(new_cselib_val): Likewise.
      	(unchain_one_elt_list): Change delete operator with remove method.
      	(unchain_one_elt_loc_list): Likewise.
      	(unchain_one_value): Likewise.
      	(cselib_finish): Release newly added static allocators.
      	* cselib.h (struct cselib_val): Remove unused members.
      	(struct elt_loc_list): Likewise.
      	* df-problems.c (df_chain_alloc): Replace pool_allocator with
      	object_allocator.
      	* df-scan.c (struct df_scan_problem_data): Likewise.
      	(df_scan_alloc): Likewise.
      	* df.h (struct dataflow): Likewise.
      	* dse.c (struct read_info_type): Likewise.
      	(struct insn_info_type): Likewise.
      	(struct dse_bb_info_type): Likewise.
      	(struct group_info): Likewise.
      	(struct deferred_change): Likewise.
      	(get_group_info): Likewise.
      	(delete_dead_store_insn): Likewise.
      	(free_read_records): Likewise.
      	(replace_read): Likewise.
      	(check_mem_read_rtx): Likewise.
      	(scan_insn): Likewise.
      	(dse_step1): Likewise.
      	(dse_step7): Likewise.
      	* et-forest.c (struct et_occ): Remove unused members.
      	(et_new_occ): Use allocate instead of new operator.
      	(et_new_tree): Likewise.
      	(et_free_tree): Call release method explicitly.
      	(et_free_tree_force): Likewise.
      	(et_free_pools): Likewise.
      	(et_split): Use remove instead of delete operator.
      	* et-forest.h (struct et_node): Remove unused members.
      	* ipa-cp.c: Change pool_allocator to object_allocator.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-profile.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ira-build.c (initiate_cost_vectors): Cast return value.
      	(ira_allocate_cost_vector): Likewise.
      	* ira-color.c (struct update_cost_record): Remove unused members.
      	* lra-int.h (struct lra_live_range): Likewise.
      	(struct lra_copy): Likewise.
      	(struct lra_insn_reg): Likewise.
      	* lra-lives.c (lra_live_ranges_finish): Release new static allocator.
      	* lra.c (new_insn_reg): Replace new operator with allocate method.
      	(free_insn_regs): Same for operator delete.
      	(finish_insn_regs): Release new static allocator.
      	(finish_insn_recog_data): Likewise.
      	(lra_free_copies): Replace delete operator with remove method.
      	(lra_create_copy): Replace operator new with allocate method.
      	(invalidate_insn_data_regno_info): Same for remove method.
      	* regcprop.c (struct queued_debug_insn_change): Remove unused members.
      	(free_debug_insn_changes): Replace delete operator with remove method.
      	(replace_oldest_value_reg): Replace operator new with allocate method.
      	(pass_cprop_hardreg::execute): Release new static variable.
      	* sched-deps.c (sched_deps_init): Change pool_allocator to
      	object_allocator.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* stmt.c (expand_case): Likewise.
      	(expand_sjlj_dispatch_table): Likewise.
      	* tree-sra.c (struct access): Remove unused members.
      	(struct assign_link): Likewise.
      	(sra_deinitialize): Release newly added static pools.
      	(create_access_1):Replace operator new with allocate method.
      	(build_accesses_from_assign): Likewise.
      	(create_artificial_child_access): Likewise.
      	* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Change
      	pool_allocator to object_allocator.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c (allocate_vn_table): Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* var-tracking.c (onepart_pool_allocate): New function.
      	(unshare_variable): Use the newly added function.
      	(variable_merge_over_cur): Likewise.
      	(variable_from_dropped): Likewise.
      	(variable_was_changed): Likewise.
      	(set_slot_part): Likewise.
      	(emit_notes_for_differences_1): Likewise.
      	(vt_finalize): Release newly added static pools.
      
      From-SVN: r225869
      fb0b2914
  19. Jun 01, 2015
    • Martin Liska's avatar
      Change use to type-based pool allocator in cselib.c. · a78a26f1
      Martin Liska authored
      	* cselib.c (new_elt_list):Use new type-based pool allocator.
      	(new_elt_loc_list) Likewise.
      	(unchain_one_elt_list) Likewise.
      	(unchain_one_elt_loc_list) Likewise.
      	(unchain_one_value) Likewise.
      	(new_cselib_val) Likewise.
      	(cselib_init) Likewise.
      	(cselib_finish) Likewise.
      
      From-SVN: r223952
      a78a26f1
  20. May 02, 2015
    • Trevor Saunders's avatar
      make fp_setter_insn take a rtx_insn * · 8df68a82
      Trevor Saunders authored
      gcc/ChangeLog:
      
      2015-05-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
      
      	* cselib.c (fp_setter_insn): Take a rtx_insn *.
      	* cselib.h (fp_setter_insn): Adjust.
      
      From-SVN: r222739
      8df68a82
  21. Jan 05, 2015
  22. Oct 29, 2014
    • Richard Sandiford's avatar
      decl.c, [...]: Remove redundant enum from machine_mode. · ef4bddc2
      Richard Sandiford authored
      gcc/ada/
      	* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
      	gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
      	Remove redundant enum from machine_mode.
      
      gcc/c-family/
      	* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
      	enum from machine_mode.
      
      gcc/c/
      	* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
      	machine_mode.
      
      gcc/cp/
      	* constexpr.c: Remove redundant enum from machine_mode.
      
      gcc/fortran/
      	* trans-types.c, trans-types.h: Remove redundant enum from
      	machine_mode.
      
      gcc/go/
      	* go-lang.c: Remove redundant enum from machine_mode.
      
      gcc/java/
      	* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
      	machine_mode.
      
      gcc/lto/
      	* lto-lang.c: Remove redundant enum from machine_mode.
      
      gcc/
      	* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
      	builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
      	cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
      	config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
      	config/aarch64/aarch64.c, config/aarch64/aarch64.h,
      	config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
      	config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
      	config/arc/arc.h, config/arc/predicates.md,
      	config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
      	config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
      	config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
      	config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
      	config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
      	config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
      	config/cr16/cr16-protos.h, config/cr16/cr16.c,
      	config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
      	config/darwin-protos.h, config/darwin.c,
      	config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
      	config/epiphany/epiphany.md, config/fr30/fr30.c,
      	config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
      	config/h8300/h8300-protos.h, config/h8300/h8300.c,
      	config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
      	config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
      	config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
      	config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
      	config/iq2000/iq2000.c, config/iq2000/iq2000.md,
      	config/lm32/lm32-protos.h, config/lm32/lm32.c,
      	config/m32c/m32c-protos.h, config/m32c/m32c.c,
      	config/m32r/m32r-protos.h, config/m32r/m32r.c,
      	config/m68k/m68k-protos.h, config/m68k/m68k.c,
      	config/mcore/mcore-protos.h, config/mcore/mcore.c,
      	config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
      	config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
      	config/mips/mips-protos.h, config/mips/mips.c,
      	config/mmix/mmix-protos.h, config/mmix/mmix.c,
      	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
      	config/moxie/moxie.c, config/msp430/msp430-protos.h,
      	config/msp430/msp430.c, config/nds32/nds32-cost.c,
      	config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
      	config/nds32/nds32-protos.h, config/nds32/nds32.c,
      	config/nios2/nios2-protos.h, config/nios2/nios2.c,
      	config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
      	config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
      	config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
      	config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
      	config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
      	config/s390/predicates.md, config/s390/s390-protos.h,
      	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
      	config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
      	config/sh/sh.md, config/sparc/predicates.md,
      	config/sparc/sparc-protos.h, config/sparc/sparc.c,
      	config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
      	config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
      	config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
      	config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
      	config/tilepro/tilepro.c, config/v850/v850-protos.h,
      	config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
      	config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
      	config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
      	dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
      	doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
      	dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
      	except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
      	fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
      	fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
      	genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
      	graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
      	internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
      	ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
      	libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
      	loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
      	lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
      	lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
      	output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
      	recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
      	regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
      	rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
      	sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
      	simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
      	targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
      	tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
      	tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
      	tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
      	tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
      	tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
      	tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
      	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
      	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
      	tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
      	var-tracking.c, varasm.c: Remove redundant enum from
      	machine_mode.
      gcc/
      	* gengtype.c (main): Treat machine_mode as a scalar typedef.
      	* genmodes.c (emit_insn_modes_h): Hide inline functions if
      	USED_FOR_TARGET.
      
      From-SVN: r216834
      ef4bddc2
  23. Sep 18, 2014
    • Kito Cheng's avatar
      Add header guard to several header files. · f1717f8d
      Kito Cheng authored
      2014-09-19  Kito Cheng  <kito@0xlab.org>
      
      	* except.h: Fix header guard.
      	* addresses.h: Add missing header guard.
      	* cfghooks.h: Likewise.
      	* collect-utils.h: Likewise.
      	* collect2-aix.h: Likewise.
      	* conditions.h: Likewise.
      	* cselib.h: Likewise.
      	* dwarf2asm.h: Likewise.
      	* graphds.h: Likewise.
      	* graphite-scop-detection.h: Likewise.
      	* gsyms.h: Likewise.
      	* hw-doloop.h: Likewise.
      	* incpath.h: Likewise.
      	* ipa-inline.h: Likewise.
      	* ipa-ref.h: Likewise.
      	* ira-int.h: Likewise.
      	* ira.h: Likewise.
      	* lra-int.h: Likewise.
      	* lra.h: Likewise.
      	* lto-section-names.h: Likewise.
      	* read-md.h: Likewise.
      	* reload.h: Likewise.
      	* rtl-error.h: Likewise.
      	* sdbout.h: Likewise.
      	* targhooks.h: Likewise.
      	* tree-affine.h: Likewise.
      	* xcoff.h: Likewise.
      	* xcoffout.h: Likewise.
      
      From-SVN: r215365
      f1717f8d
  24. Aug 26, 2014
    • David Malcolm's avatar
      cselib (also touches sched-deps.c) · 12ea1b95
      David Malcolm authored
      gcc/
      2014-08-26  David Malcolm  <dmalcolm@redhat.com>
      
      	* cselib.h (struct elt_loc_list): Strengthen field "setting_insn"
      	from rtx to rtx_insn *.
      	(cselib_lookup_from_insn): Likewise for final param.
      	(cselib_subst_to_values_from_insn): Likewise.
      	(cselib_add_permanent_equiv): Likewise.
      
      	* cselib.c (cselib_current_insn): Likewise for this variable.
      	(cselib_subst_to_values_from_insn): Likewise for param "insn".
      	(cselib_lookup_from_insn): Likewise.
      	(cselib_add_permanent_equiv): Likewise for param "insn" and local
      	"save_cselib_current_insn".
      	(cselib_process_insn): Replace use of NULL_RTX with NULL.
      
      	* sched-deps.c (add_insn_mem_dependence): Strengthen param "insn"
      	from rtx to rtx_insn *.
      
      From-SVN: r214550
      12ea1b95
    • David Malcolm's avatar
      cselib_record_sets_hook takes an rtx_insn · 46665961
      David Malcolm authored
      gcc/
      	* cselib.h (cselib_record_sets_hook):  Strengthen initial param
      	"insn" from rtx to rtx_insn *.
      
      	* cselib.c (cselib_record_sets_hook): Likewise.
      
      	* var-tracking.c (add_with_sets): Likewise, renaming back from
      	"uncast_insn" to "insn" and eliminating the checked cast from rtx
      	to rtx_insn *.
      
      From-SVN: r214535
      46665961
    • David Malcolm's avatar
      cselib and incdec · dd60a84c
      David Malcolm authored
      gcc/
      	* rtl.h (for_each_inc_dec): Strengthen param 1 from rtx * to
      	rtx_insn **.
      	(check_for_inc_dec): Strengthen param "insn" from rtx to
      	rtx_insn *.
      
      	* cselib.h (cselib_process_insn): Likewise.
      
      	* cselib.c (cselib_record_sets): Likewise.
      	(cselib_process_insn): Likewise.
      
      	* dse.c (struct insn_info): Likewise for field "insn".
      	(check_for_inc_dec_1): Likewise for local "insn".
      	(check_for_inc_dec): Likewise for param "insn".
      	(scan_insn): Likewise.
      	(dse_step1): Likewise for local "insn".
      
      	* rtlanal.c (for_each_inc_dec): Strengthen param 1 from rtx * to
      	rtx_insn **.  Use for_each_rtx_in_insn rather than for_each_rtx.
      
      From-SVN: r214531
      dd60a84c
  25. Jan 02, 2014
  26. Dec 10, 2013
    • Oleg Endo's avatar
      cgraph.h (cgraph_node_set_iterator, [...]): Remove typedef. · 84562394
      Oleg Endo authored
      	* gcc/cgraph.h (cgraph_node_set_iterator, varpool_node_set_iterator):
      	Remove typedef.
      	(cgraph_inline_failed_enum, cgraph_inline_failed_t): Remove typedef and
      	rename to cgraph_inline_failed_t.
      	* gcc/tree-ssa-alias.h (ao_ref_s, ao_ref): Remove typedef and rename
      	to ao_ref.
      	* gcc/reload.h (reg_equivs_s, reg_equivs_t): Remove typedef and rename
      	to reg_equivs_t.
      	* gcc/conditions.h (CC_STATUS): Remove typedef.
      	* gcc/bitmap.h (bitmap_obstack): Remove typedef.
      	(bitmap_element_def, bitmap_element): Remove typedef and rename to
      	bitmap_element.
      	(bitmap_head_def, bitmap_head): Remove typedef and rename to
      	bitmap_head.
      	(bitmap_iterator): Remove typedef.
      	* gcc/target.h (cumulative_args_t, print_switch_type,
      	secondary_reload_info): Remove typedef.
      	* gcc/dwarf2out.h (dw_cfi_oprnd_struct, dw_cfi_oprnd): Remove
      	dw_cfi_oprnd_struct alias.
      	(dw_cfi_struct, dw_cfi_node): Remove typedef and rename to dw_cfi_node.
      	(dw_fde_struct, dw_fde_node): Remove typedef and rename to dw_fde_node.
      	(cfa_loc, dw_cfa_location): Remove typedef and rename to
      	dw_cfa_location.
      	(dw_vec_struct, dw_vec_const): Remove typedef and rename to
      	dw_vec_const.
      	(dw_val_struct, dw_val_node): Remove typedef and rename to dw_val_node.
      	(dw_loc_descr_struct, dw_loc_descr_node): Remove typedef and rename to
      	dw_loc_descr_node.
      	* gcc/params.h (param_info, compiler_param): Remove typedef.
      	* gcc/opts.h (cl_deferred_param): Remove typedef.
      	* gcc/sreal.h (sreal): Remove typedef.
      	* gcc/ddg.h (dep_type, dep_data_type): Remove typedef.
      	* gcc/graphite-clast-to-gimple.h (cloog_prog_clast, bb_pbb_def): Remove
      	typedef.
      	* gcc/lto-streamer.h (lto_decl_stream_e_t, lto_encoder_entry,
      	lto_symtab_encoder_iterator, res_pair): Remove typedef.
      	* gcc/tree-affine.h (affine_tree_combination, aff_tree): Remove typedef
      	and rename to aff_tree.
      	* gcc/sched-int.h (region): Remove typedef.
      	* gcc/diagnostic.h (diagnostic_info,
      	diagnostic_classification_change_t): Remove typedef.
      	* gcc/tree-ssa-loop.h (affine_iv_d): Remove typedef and rename to
      	affine_iv.
      	* gcc/sbitmap.h (sbitmap_iterator): Remove typedef.
      	* gcc/ssa-iterators.h (immediate_use_iterator_d, imm_use_iterator):
      	Remove typedef and rename to imm_use_iterator.
      	(ssa_operand_iterator_d, ssa_op_iter): Remove typedef and rename to
      	ssa_op_iter.
      	* gcc/ggc-internal.h (ggc_statistics): Remove typedef.
      	* gcc/cselib.h (cselib_val_struct, cselib_val): Remove typedef and
      	rename to cselib_val.
      	* gcc/tree-core.h (alias_pair): Remove typedef.
      	(constructor_elt_d, constructor_elt): Remove typedef and rename to
      	constructor_elt.
      	(ssa_use_operand_d, ssa_use_operand_t): Remove typedef and rename to
      	ssa_use_operand_t.
      	* gcc/graphite-sese-to-poly.h (base_alias_pair): Remove typedef.
      	* gcc/tree-data-ref.h (conflict_function): Remove typedef.
      	* gcc/tree-inline.h (copy_body_data): Remove typedef.
      	* gcc/ipa-inline.h (condition, size_time_entry, inline_param_summary_t,
      	edge_growth_cache_entry): Remove typedef.
      	* gcc/regrename.h (operand_rr_info, insn_rr_info): Remove typedef.
      	* gcc/gimple-iterator.h (gimple_stmt_iterator_d, gimple_stmt_iterator):
      	Remove typedef and rename to gimple_stmt_iterator.
      	* gcc/basic-block.h (ce_if_block, ce_if_block_t): Remove typedef and
      	rename to ce_if_block.
      	(edge_iterator): Remove typedef.
      	* gcc/ipa-prop.h (ipa_agg_jf_item, ipa_agg_jf_item_t): Remove typedef
      	and rename to ipa_agg_jf_item.
      	(ipa_agg_jump_function_t, ipa_param_descriptor_t, ipa_node_params_t,
      	ipa_parm_adjustment_t): Remove typedef.
      	(ipa_jump_func, ipa_jump_func_t): Remove typedef and rename to
      	ipa_jump_func.
      	(ipa_edge_args, ipa_edge_args_t): Remove typedef and rename to
      	ipa_edge_args.
      	* gcc/gcov-io.h (gcov_bucket_type): Remove typedef.
      	(gcov_working_set_info, gcov_working_set_t): Remove typedef and rename
      	to gcov_working_set_t.
      	* gcc/ira-int.h (minmax_set_iterator, ira_allocno_iterator,
      	ira_object_iterator, ira_allocno_object_iterator, ira_pref_iterator,
      	ira_copy_iterator, ira_object_conflict_iterator): Remove typedef.
      	* gcc/tree-iterator.h (tree_stmt_iterator): Remove typedef.
      	* gcc/rtl.h (addr_diff_vec_flags, mem_attrs, reg_attrs,
      	replace_label_data): Remove typedef.
      	(rtunion_def, rtunion): Remove typedef and rename to rtunion.
      	* gcc/hard-reg-set.h (hard_reg_set_iterator): Remove typedef.
      	* gcc/sel-sched-ir.h (_list_iterator, sel_global_bb_info_def,
      	sel_region_bb_info_def, succ_iterator): Remove typedef.
      	(deps_where_def, deps_where_t): Remove typedef and rename to
      	deps_where_t.
      	* gcc/coretypes.h: Adapt forward declarations.
      	* gcc/tree-scalar-evolution.h: Likewise.
      	* gcc/tree-ssa-address.h: Likewise.
      	* gcc/tree-ssa-operands.h: Likewise.
      	* gcc/function.h: Likewise.
      	* gcc/config/frv/frv-protos.h: Likewise.
      	* gcc/targhooks.h: Likewise.
      	* gcc/basic_block.h: Likewise.
      	* gcc/rtl.def: Adapt documentation.
      	* gcc/doc/tm.texi: Likewise.
      	* gcc/ipa-cp.c: Adapt uses.
      	* gcc/bitmap.c: Likewise.
      	* gcc/dwarf2out.c: Likewise.
      	* gcc/target.def: Likewise.
      	* gcc/ipa-inline-analysis.c: Likewise.
      	* gcc/dwarf2cfi.c: Likewise.
      	* gcc/tree-ssa-loop-ivopts.c: Likewise.
      	* gcc/lto-cgraph.c: Likewise.
      	* gcc/config/frv/frv.c: Likewise.
      	* gcc/ifcvt.c: Likewise.
      	* gcc/ipa-prop.c: Likewise.
      
      From-SVN: r205863
      84562394
  27. Jan 10, 2013
  28. Nov 20, 2012
    • Jakub Jelinek's avatar
      re PR middle-end/54921 (wrong code with -Os -fno-omit-frame-pointer... · 40155239
      Jakub Jelinek authored
      re PR middle-end/54921 (wrong code with -Os -fno-omit-frame-pointer -fsched2-use-superblocks -fstack-protector -ftree-slp-vectorize)
      
      	PR rtl-optimization/54921
      	* cselib.h (fp_setter_insn): New prototype.
      	* cselib.c (fp_setter_insn): New function.
      	(cselib_process_insn): If frame_pointer_needed,
      	call cselib_invalidate_rtx (stack_pointer_rtx) after
      	processing a frame pointer setter.
      	* var-tracking.c (fp_setter): Removed.
      	(vt_initialize): Use fp_setter_insn instead of fp_setter.
      
      	* gcc.dg/pr54921.c: New test.
      
      From-SVN: r193647
      40155239
  29. Oct 16, 2012
    • Jakub Jelinek's avatar
      re PR debug/54796 (Non-addressable stack parameter debug quality regression) · 0fe03ac3
      Jakub Jelinek authored
      	PR debug/54796
      	* rtl.h: Document jump flag on VALUE.
      	* cselib.h (cselib_set_value_sp_based,
      	cselib_sp_based_value_p): New prototypes.
      	* alias.c (find_base_term): For cselib_sp_based_value_p
      	return static_reg_base_value[STACK_POINTER_REGNUM].
      	* cselib.c (SP_BASED_VALUE_P): Define.
      	(cselib_set_value_sp_based, cselib_sp_based_value_p): New functions.
      	* var-tracking.c (add_stores): Call cselib_set_value_sp_based
      	for not yet preserved VALUEs of sp on sp assignments if
      	hard_frame_pointer_adjustment != -1.
      	(vt_initialize): When setting hard_frame_pointer_adjustment,
      	disassociate sp from its previous value and call
      	cselib_set_value_sp_based on a new VALUE created for sp.
      
      	* gcc.dg/guality/pr54796.c: New test.
      
      From-SVN: r192494
      0fe03ac3
  30. Mar 01, 2012
    • Alexandre Oliva's avatar
      re PR debug/52001 (Huge compile-time regression with var-tracking) · 0f68ba3e
      Alexandre Oliva authored
      PR debug/52001
      PR rtl-optimization/52417
      * cselib.c (cselib_any_perm_equivs): New variable.
      (cselib_reset_table): Check that it's not set when not
      preserving constants.
      (cselib_add_permanent_equiv): Set it.
      (cselib_have_permanent_equivalences): New.
      (cselib_init, cselib_finish): Reset it.
      * cselib.h (cselib_have_permanent_equivalences): Declare.
      * alias.c (get_addr): Restore earlier behavior when there
      aren't permanent equivalences.
      
      From-SVN: r184750
      0f68ba3e
  31. Feb 13, 2012
  32. Dec 31, 2011
    • Alexandre Oliva's avatar
      cselib.h (cselib_add_permanent_equiv): Declare. · 6f2ffb4b
      Alexandre Oliva authored
      * cselib.h (cselib_add_permanent_equiv): Declare.
      (canonical_cselib_val): New.
      * cselib.c (new_elt_loc_list): Rework to support value
      equivalences.  Adjust all callers.
      (preserve_only_constants): Retain value equivalences.
      (references_value_p): Retain preserved values.
      (rtx_equal_for_cselib_1): Handle value equivalences.
      (cselib_invalidate_regno): Use canonical value.
      (cselib_add_permanent_equiv): New.
      * alias.c (find_base_term): Reset locs lists while recursing.
      * var-tracking.c (val_bind): New.  Don't add equivalences
      present in cselib table, compared with code moved from...
      (val_store): ... here.
      (val_resolve): Use val_bind.
      (VAL_EXPR_HAS_REVERSE): Drop.
      (add_uses): Do not create MOps for addresses.  Do not mark
      non-REG non-MEM expressions as requiring resolution.
      (reverse_op): Record reverse as a cselib equivalence.
      (add_stores): Use it.  Do not create MOps for addresses.
      Do not require resolution for non-REG non-MEM expressions.
      Simplify support for reverse operations.
      (compute_bb_dataflow): Drop reverse support.
      (emit_notes_in_bb): Likewise.
      (create_entry_value): Rename to...
      (record_entry_value): ... this.  Use cselib equivalences.
      (vt_add_function_parameter): Adjust.
      
      From-SVN: r182760
      6f2ffb4b
  33. Feb 03, 2011
    • Alexandre Oliva's avatar
      re PR debug/43092 (Wrong debuginfo with VTA and -fomit-frame-pointer/-mno-accumulate-outgoing-args) · 4deef538
      Alexandre Oliva authored
      PR debug/43092
      PR rtl-optimization/43494
      * rtl.h (for_each_inc_dec_fn): New type.
      (for_each_inc_dec): Declare.
      * rtlanal.c (struct for_each_inc_dec_ops): New type.
      (for_each_inc_dec_find_inc_dec): New fn.
      (for_each_inc_dec_find_mem): New fn.
      (for_each_inc_dec): New fn.
      * dse.c (struct insn_size): Remove.
      (replace_inc_dec, replace_inc_dec_mem): Remove.
      (emit_inc_dec_insn_before): New fn.
      (check_for_inc_dec): Use it, along with for_each_inc_dec.
      (canon_address): Pass mem modes to cselib_lookup.
      * cselib.h (cselib_lookup): Add memmode argument.  Adjust callers.
      (cselib_lookup_from_insn): Likewise.
      (cselib_subst_to_values): Likewise.
      * cselib.c (find_slot_memmode): New var.
      (cselib_find_slot): New fn.  Use it instead of
      htab_find_slot_with_hash everywhere.
      (entry_and_rtx_equal_p): Use find_slot_memmode.
      (autoinc_split): New fn.
      (rtx_equal_for_cselib_p): Rename and implement in terms of...
      (rtx_equal_for_cselib_1): ... this.  Take memmode, pass it on.
      Deal with autoinc.  Special-case recursion into MEMs.
      (cselib_hash_rtx): Likewise.
      (cselib_lookup_mem): Infer pmode from address mode.  Distinguish
      address and MEM modes.
      (cselib_subst_to_values): Add memmode, pass it on.
      Deal with autoinc.
      (cselib_lookup): Add memmode argument, pass it on.
      (cselib_lookup_from_insn): Add memmode.
      (cselib_invalidate_rtx): Discard obsolete push_operand handling.
      (struct cselib_record_autoinc_data): New.
      (cselib_record_autoinc_cb): New fn.
      (cselib_record_sets): Use it, along with for_each_inc_dec.  Pass MEM
      mode to cselib_lookup.  Reset autoinced REGs here instead of...
      (cselib_process_insn): ... here.
      * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode
      to cselib_lookup.
      (add_uses): Likewise, also to cselib_subst_to_values.
      (add_stores): Likewise.
      * sched-deps.c 	(add_insn_mem_dependence): Pass mode to
      cselib_subst_to_values.
      (sched_analyze_1, sched_analyze_2): Likewise.  Adjusted.
      * gcse.c (do_local_cprop): Adjusted.
      * postreload.c (reload_cse_simplify_set): Adjusted.
      (reload_cse_simplify_operands): Adjusted.
      * sel-sched-dump (debug_mem_addr_value): Pass mode.
      
      From-SVN: r169782
      4deef538
  34. Dec 03, 2010
    • Laurynas Biveinis's avatar
      basic-block.h (struct edge_prediction): Remove forward declaration. · fba4cb03
      Laurynas Biveinis authored
      2010-12-01  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* basic-block.h (struct edge_prediction): Remove forward
      	declaration.
      	* tree-flow.h (struct edge_prediction): Move from here...
      	* predict.c (struct edge_prediction): ...to here.
      	* cselib.h (struct elt_list): Move from here...
      	* cselib.c (struct elt_list): ...to here.
      
      From-SVN: r167409
      fba4cb03
    • Laurynas Biveinis's avatar
      tree.h (struct call_expr_arg_iterator_d): Remove GTY tag. · 1aa67003
      Laurynas Biveinis authored
      2010-11-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* tree.h (struct call_expr_arg_iterator_d): Remove GTY tag.
      	(const_call_expr_arg_iterator_d): Likewise.
      	(expanded_location): Likewise.
      	* c-tree.h (struct c_arg_tag_d): Likewise.
      	* dwarf2out.c (struct cfa_loc): Likewise.
      	(struct skeleton_chain_struct): Likewise.
      	* except.c (struct ttypes_filter): Likewise.
      	* cselib.h (struct cselib_val_struct): Likewise.
      	(elt_loc_list): Likewise.
      	(elt_list): Likewise.
      	* varasm.c (struct addr_const): Likewise.
      	* tree-flow.h (struct edge_prediction): Likewise.
      	(struct int_tree_map): Likewise.
      	(struct _edge_var_map): Likewise.
      
      ada:
      
      2010-11-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* gcc-interface/decl.c (struct subst_pair_d): Remove GTY tag.
      	(variant_desc_d): Likewise.
      
      cp:
      
      2010-11-30  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
      
      	* cp-tree.h (struct aggr_init_expr_arg_iterator_d): Remove GTY
      	tag.
      
      From-SVN: r167406
      1aa67003
  35. Jun 30, 2010
    • Jakub Jelinek's avatar
      re PR debug/44694 (Long var tracking compile time of GiNaC tests) · 9de9cbaf
      Jakub Jelinek authored
      	PR debug/44694
      	* cselib.h (cselib_preserve_cfa_base_value): Add regno argument.
      	* cselib.c (cfa_base_preserved_regno): New static variable.
      	(cselib_reset_table): Don't reset cfa_base_preserved_regno instead
      	of REGNO (cfa_base_preserved_val->locs->loc).
      	(cselib_preserve_cfa_base_value): Add regno argument, set
      	cfa_base_preserved_regno to it.
      	(cselib_invalidate_regno): Allow removal of registers other than
      	cfa_base_preserved_regno from cfa_base_preserved_val.
      	(cselib_finish): Set cfa_base_preserved_regno to INVALID_REGNUM.
      	* var-tracking.c (adjust_mems): Replace sp or hfp even outside
      	of MEM addresses, if not on LHS.
      	(reverse_op): Don't add reverse ops for cfa_base_rtx.
      	(vt_init_cfa_base): Adjust cselib_preserve_cfa_base_value caller.
      
      From-SVN: r161587
      9de9cbaf
  36. Mar 30, 2010
    • Alexandre Oliva's avatar
      re PR debug/42977 ("-fcompare-debug failure" with "-O2 -finline-functions... · 5847e8da
      Alexandre Oliva authored
      re PR debug/42977 ("-fcompare-debug failure" with "-O2 -finline-functions -fomit-frame-pointer -ftracer -fsched2-use-superblocks -fPIC")
      
      	PR debug/42977
      	* cselib.c (n_useless_values): Document handling of debug locs.
      	(n_useless_debug_values, n_debug_values): New variables.
      	(new_elt_loc_list): Don't add to debug values, keep count.
      	(promote_debug_loc): New.
      	(cselib_reset_table): Zero new variables.
      	(entry_and_rtx_equal_p): Promote debug locs.
      	(discard_useless_locs): Increment n_useless_debug_values for
      	debug values.
      	(remove_useless_values): Adjust n_useless_values and n_debug_values
      	with n_useless_debug_values.
      	(add_mem_for_addr): Promote debug locs.
      	(cselib_lookup_mem): Likewise.
      	(cselib_lookup_addr): Renamed to...
      	(cselib_lookup_addr_1): ... this.  Promote debug locs.
      	Don't call...
      	(cselib_log_lookup): ... this.  Turn into...
      	(cselib_lookup_addr): ... new wrapper.
      	(cselib_lookup_from_insn): New.
      	(cselib_invalidate_regno): Increment n_useless_debug_values for
      	debug values.
      	(cselib_invalidate_mem): Likewise.
      	(cselib_process_insn): Take n_deleted and n_debug_values into
      	account to guard remove_useless_value call.
      	(cselib_finish): Zero n_useless_debug_values.
      	* cselib.h (cselib_lookup_from_insn): Declare.
      	* sched-deps.c (sched_analyze_1): Use cselib_lookup_from_insn.
      	(sched_analyze_2): Likewise.
      
      From-SVN: r157837
      5847e8da
  37. Mar 16, 2010
    • Jakub Jelinek's avatar
      re PR debug/43051 (VTA causes a stack living parameter unavailable in most of the function) · 457eeaae
      Jakub Jelinek authored
      	PR debug/43051
      	PR debug/43092
      	* cselib.c (cselib_preserve_constants,
      	cfa_base_preserved_val): New static variables.
      	(preserve_only_constants): New function.
      	(cselib_reset_table): If cfa_base_preserved_val is non-NULL, don't
      	clear its REG_VALUES.  If cselib_preserve_constants, don't 
      	empty the whole hash table, but preserve there VALUEs with constants,
      	cfa_base_preserved_val and cfa_base_preserved_val plus constant.
      	(cselib_preserve_cfa_base_value): New function.
      	(cselib_invalidate_regno): Don't invalidate cfa_base_preserved_val.
      	(cselib_init): Change argument to int bitfield.  Set
      	cselib_preserve_constants to whether CSELIB_PRESERVE_CONSTANTS
      	is in it.
      	(cselib_finish): Clear cselib_preserve_constants and
      	cfa_base_preserved_val.
      	* cselib.h (enum cselib_record_what): New enum.
      	(cselib_init): Change argument to int.
      	(cselib_preserve_cfa_base_value): New prototype.
      	* postreload.c (reload_cse_regs_1): Adjust cselib_init caller.
      	* dse.c (dse_step1): Likewise.
      	* cfgcleanup.c (thread_jump): Likewise.
      	* sched-deps.c (sched_analyze): Likewise.
      	* gcse.c (local_cprop_pass): Likewise.
      	* simplify-rtx.c (simplify_replace_fn_rtx): Add argument to callback.
      	If FN is non-NULL, call the callback always and whenever it returns
      	non-NULL just return that.  Only do rtx_equal_p if FN is NULL.
      	* rtl.h (simplify_replace_fn_rtx): Add argument to callback.
      	* combine.c (propagate_for_debug_subst): Add old_rtx argument,
      	compare from with old_rtx and if it isn't rtx_equal_p, return NULL.
      	* Makefile.in (var-tracking.o): Depend on $(RECOG_H).
      	* var-tracking.c: Include recog.h.
      	(bb_stack_adjust_offset): Remove.
      	(vt_stack_adjustments): Don't call it, instead just gather the
      	adjustments using insn_stack_adjust_offset_pre_post on each bb insn.
      	(adjust_stack_reference): Remove.
      	(compute_cfa_pointer): New function.
      	(hard_frame_pointer_adjustment, cfa_base_rtx): New static variables.
      	(struct adjust_mem_data): New type.
      	(adjust_mems, adjust_mem_uses, adjust_mem_stores, adjust_insn): New
      	functions.
      	(get_address_mode): New function.
      	(replace_expr_with_values): Use it.
      	(use_type): Don't do cselib_lookup for VAR_LOC_UNKNOWN_P.
      	Use get_address_mode.  For cfa_base_rtx return MO_CLOBBER.
      	(adjust_sets): Remove.
      	(add_uses): Don't add extra MO_VAL_USE for cfa_base_rtx plus constant.
      	Use get_address_mode.
      	(get_adjusted_src): Remove.
      	(add_stores): Don't call it.  Never reuse expr SET.  Don't add extra
      	MO_VAL_USE for cfa_base_rtx plus constant.  Use get_address_mode.
      	(add_with_sets): Don't call adjust_sets.
      	(fp_setter, vt_init_cfa_base): New functions.
      	(vt_initialize): Change return type to bool.  Move most of pool etc.
      	initialization to the beginning of the function from end.  Pass
      	CSELIB_RECORD_MEMORY | CSELIB_PRESERVE_CONSTANTS to cselib_init.
      	If !frame_pointer_needed, call vt_stack_adjustment before mos
      	vector is filled, call vt_init_cfa_base if argp/framep has been
      	eliminated to sp.  If frame_pointer_needed and argp/framep has
      	been eliminated to hard frame pointer, set
      	hard_frame_pointer_adjustment and call vt_init_cfa_base after
      	encountering fp setter in the prologue.  For MO_ADJUST, call
      	log_op_type before pusing the op into mos vector, not afterwards.
      	Call adjust_insn before cselib_process_insn/add_with_sets,
      	call cancel_changes (0) afterwards.
      	(variable_tracking_main_1): Adjust for vt_initialize calling
      	vt_stack_adjustments and returning whether it succeeded or not.
      
      	* gcc.dg/guality/pr43051-1.c: New test.
      
      From-SVN: r157476
      457eeaae
Loading