1. 31 May, 2019 1 commit
    • New .md construct: define_insn_and_rewrite · f4fde1b3
      Several SVE patterns need define_insn_and_splits that generate the
      same insn_code, but with different operands.  That's probably a
      niche requirement, but it's cropping up often enough on the ACLE
      branch that I think it would be good to have a syntactic sugar for it.
      
      This patch therefore adds a new construct called define_insn_and_rewrite.
      It's basically a define_insn_and_split with an implicit split pattern,
      obtained by copying the insn pattern and replacing match_operands with
      match_dups and match_operators with match_op_dups.
      
      2019-05-31  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* doc/md.texi: Document define_insn_and_rewrite.
      	* rtl.def (DEFINE_INSN_AND_REWRITE): New rtx code.
      	* gensupport.c (queue_elem): Update comment.
      	(replace_operands_with_dups): New function.
      	(gen_rewrite_sequence): Likewise.
      	(process_rtx): Handle DEFINE_INSN_AND_REWRITE.
      	* read-rtl.c (apply_subst_iterator): Likewise.
      	(add_condition_to_rtx, named_rtx_p): Likewise.
      	(rtx_reader::read_rtx_operand): Likewise.
      	* config/aarch64/aarch64-sve.md
      	(while_ult<GPI:mode><PRED_ALL:mode>_cc): Rename to...
      	(*while_ult<GPI:mode><PRED_ALL:mode>_cc): ...this and use
      	define_insn_and_rewrite.
      	(*cond_<optab><mode>_any): Turn into define_insn_and_rewrites.
      	Remove separate define_split.
      
      From-SVN: r271815
      Richard Sandiford committed
  2. 09 Jan, 2019 1 commit
    • PR other/16615 [1/5] · 67914693
      2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR other/16615 [1/5]
      
      	contrib/
      	* mklog: Mechanically replace "can not" with "cannot".
      
      	gcc/
      	* Makefile.in: Mechanically replace "can not" with "cannot".
      	* alias.c: Likewise.
      	* builtins.c: Likewise.
      	* calls.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine-stack-adj.c: Likewise.
      	* combine.c: Likewise.
      	* common/config/i386/i386-common.c: Likewise.
      	* config/aarch64/aarch64.c: Likewise.
      	* config/alpha/sync.md: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/arc/predicates.md: Likewise.
      	* config/arm/arm-c.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/arm/arm.h: Likewise.
      	* config/arm/arm.md: Likewise.
      	* config/arm/cortex-r4f.md: Likewise.
      	* config/csky/csky.c: Likewise.
      	* config/csky/csky.h: Likewise.
      	* config/darwin-f.c: Likewise.
      	* config/epiphany/epiphany.md: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/i386/sol2.h: Likewise.
      	* config/m68k/m68k.c: Likewise.
      	* config/mcore/mcore.h: Likewise.
      	* config/microblaze/microblaze.md: Likewise.
      	* config/mips/20kc.md: Likewise.
      	* config/mips/sb1.md: Likewise.
      	* config/nds32/nds32.c: Likewise.
      	* config/nds32/predicates.md: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/rs6000/e300c2c3.md: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/s390/s390.h: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/sh/sh.md: Likewise.
      	* config/spu/vmx2spu.h: Likewise.
      	* cprop.c: Likewise.
      	* dbxout.c: Likewise.
      	* df-scan.c: Likewise.
      	* doc/cfg.texi: Likewise.
      	* doc/extend.texi: Likewise.
      	* doc/fragments.texi: Likewise.
      	* doc/gty.texi: Likewise.
      	* doc/invoke.texi: Likewise.
      	* doc/lto.texi: Likewise.
      	* doc/md.texi: Likewise.
      	* doc/objc.texi: Likewise.
      	* doc/rtl.texi: Likewise.
      	* doc/tm.texi: Likewise.
      	* dse.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* emit-rtl.h: Likewise.
      	* except.c: Likewise.
      	* expmed.c: Likewise.
      	* expr.c: Likewise.
      	* fold-const.c: Likewise.
      	* genautomata.c: Likewise.
      	* gimple-fold.c: Likewise.
      	* hard-reg-set.h: Likewise.
      	* ifcvt.c: Likewise.
      	* ipa-comdats.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-devirt.c: Likewise.
      	* ipa-fnsummary.c: Likewise.
      	* ipa-icf.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-polymorphic-call.c: Likewise.
      	* ipa-profile.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-split.c: Likewise.
      	* ipa-visibility.c: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-conflicts.c: Likewise.
      	* ira-costs.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira-lives.c: Likewise.
      	* ira.c: Likewise.
      	* ira.h: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lra-assigns.c: Likewise.
      	* lra-constraints.c: Likewise.
      	* lra-eliminations.c: Likewise.
      	* lra-lives.c: Likewise.
      	* lra-remat.c: Likewise.
      	* lra-spills.c: Likewise.
      	* lra.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* predict.c: Likewise.
      	* profile-count.h: Likewise.
      	* profile.c: Likewise.
      	* recog.c: Likewise.
      	* ree.c: Likewise.
      	* reload.c: Likewise.
      	* reload1.c: Likewise.
      	* reorg.c: Likewise.
      	* resource.c: Likewise.
      	* rtl.def: Likewise.
      	* rtl.h: Likewise.
      	* rtlanal.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched.c: Likewise.
      	* shrink-wrap.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* symtab.c: Likewise.
      	* target.def: Likewise.
      	* toplev.c: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-core.h: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-nrv.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-phionlycprop.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* tree.c: Likewise.
      	* tree.h: Likewise.
      	* vr-values.c: Likewise.
      
      	gcc/ada/
      	* exp_ch9.adb: Mechanically replace "can not" with "cannot".
      	* libgnat/s-regpat.ads: Likewise.
      	* par-ch4.adb: Likewise.
      	* set_targ.adb: Likewise.
      	* types.ads: Likewise.
      
      	gcc/cp/
      	* cp-tree.h: Mechanically replace "can not" with "cannot".
      	* parser.c: Likewise.
      	* pt.c: Likewise.
      
      	gcc/fortran/
      	* class.c: Mechanically replace "can not" with "cannot".
      	* decl.c: Likewise.
      	* expr.c: Likewise.
      	* gfc-internals.texi: Likewise.
      	* intrinsic.texi: Likewise.
      	* invoke.texi: Likewise.
      	* io.c: Likewise.
      	* match.c: Likewise.
      	* parse.c: Likewise.
      	* primary.c: Likewise.
      	* resolve.c: Likewise.
      	* symbol.c: Likewise.
      	* trans-array.c: Likewise.
      	* trans-decl.c: Likewise.
      	* trans-intrinsic.c: Likewise.
      	* trans-stmt.c: Likewise.
      
      	gcc/go/
      	* go-backend.c: Mechanically replace "can not" with "cannot".
      	* go-gcc.cc: Likewise.
      
      	gcc/lto/
      	* lto-partition.c: Mechanically replace "can not" with "cannot".
      	* lto-symtab.c: Likewise.
      	* lto.c: Likewise.
      
      	gcc/objc/
      	* objc-act.c: Mechanically replace "can not" with "cannot".
      
      	libbacktrace/
      	* backtrace.h: Mechanically replace "can not" with "cannot".
      
      	libgcc/
      	* config/c6x/libunwind.S: Mechanically replace "can not" with
      	"cannot".
      	* config/tilepro/atomic.h: Likewise.
      	* config/vxlib-tls.c: Likewise.
      	* generic-morestack-thread.c: Likewise.
      	* generic-morestack.c: Likewise.
      	* mkmap-symver.awk: Likewise.
      
      	libgfortran/
      	* caf/single.c: Mechanically replace "can not" with "cannot".
      	* io/unit.c: Likewise.
      
      	libobjc/
      	* class.c: Mechanically replace "can not" with "cannot".
      	* objc/runtime.h: Likewise.
      	* sendmsg.c: Likewise.
      
      	liboffloadmic/
      	* include/coi/common/COIResult_common.h: Mechanically replace
      	"can not" with "cannot".
      	* include/coi/source/COIBuffer_source.h: Likewise.
      
      	libstdc++-v3/
      	* include/ext/bitmap_allocator.h: Mechanically replace "can not"
      	with "cannot".
      
      From-SVN: r267783
      Sandra Loosemore committed
  3. 01 Jan, 2019 1 commit
  4. 24 Sep, 2018 1 commit
    • Change EQ_ATTR_ALT to support up to 64 alternatives · 882c3f17
      On S/390 there is a need to support more than 32 instruction
      alternatives per define_insn.  Currently this is not explicitly
      prohibited or unsupported: MAX_RECOG_ALTERNATIVES is equal 35, and,
      futhermore, the related code uses uint64_t for bitmaps in most places.
      
      However, genattrtab contains the logic to convert (eq_attr "attribute"
      "value") RTXs to (eq_attr_alt bitmap) RTXs, where bitmap contains
      alternatives, whose "attribute" has the corresponding "value".
      Unfortunately, bitmap is only 32 bits.
      
      When adding the 33rd alternative, this led to (eq_attr "type" "larl")
      becoming (eq_attr_alt -1050625 1), where -1050625 == 0xffeff7ff.  The
      cleared bits 12, 21 and 32 correspond to two existing and one newly
      added insn of type "larl".  compute_alternative_mask sign extended this
      to 0xffffffffffeff7ff, which contained non-existent alternatives, and
      this made simplify_test_exp fail with "invalid alternative specified".
      
      I'm not sure why it didn't fail the same way before, since the top bit,
      which led to sign extension, should have been set even with 32
      alternatives.  Maybe simplify_test_exp was not called for "type"
      attribute for some reason?
      
      This patch widens EQ_ATTR_ALT bitmap to 64 bits, making it possible to
      gracefully handle up to 64 alternatives.  It eliminates the problem with
      the 33rd alternative on S/390.
      
      gcc/ChangeLog:
      
      2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* genattrtab.c (mk_attr_alt): Use alternative_mask.
      	(attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
              types.
      	(check_attr_test): Use alternative_mask.
      	(get_attr_value): Likewise.
      	(compute_alternative_mask): Use alternative_mask and XWINT.
      	(make_alternative_compare): Use alternative_mask.
      	(attr_alt_subset_p): Use XWINT.
      	(attr_alt_subset_of_compl_p): Likewise.
      	(attr_alt_intersection): Use alternative_mask and XWINT.
      	(attr_alt_union): Likewise.
      	(attr_alt_complement): Use HOST_WIDE_INT and XWINT.
              (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
      	(simplify_test_exp): Use alternative_mask and XWINT.
      	(write_test_expr): Use alternative_mask and XWINT, adjust bit
              number calculation to support 64 bits.  Generate code that
              checks 64-bit masks.
      	(main): Use alternative_mask.
      	* rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
      
      From-SVN: r264537
      Ilya Leoshkevich committed
  5. 06 Aug, 2018 1 commit
    • Add CLOBBER_HIGH expression · 601e86a5
      Includes documentation.
      
      2018-08-06  Alan Hayward  <alan.hayward@arm.com>
      
      	* doc/rtl.texi (clobber_high): Add.
      	(parallel): Add in clobber high
      	* rtl.c (rtl_check_failed_code3): Add function.
      	* rtl.def (CLOBBER_HIGH): Add expression.
      	* rtl.h (RTL_CHECKC3): Add macro.
      	(rtl_check_failed_code3): Add declaration.
      	(XC3EXP): Add macro.
      
      From-SVN: r263326
      Alan Hayward committed
  6. 03 Jan, 2018 1 commit
  7. 20 Dec, 2017 2 commits
    • poly_int: SUBREG_BYTE · 91914e56
      This patch changes SUBREG_BYTE from an int to a poly_int.
      Since valid SUBREG_BYTEs must be contained within the mode of the
      SUBREG_REG, the required range is the same as for GET_MODE_SIZE,
      i.e. unsigned short.  The patch therefore uses poly_uint16(_pod)
      for the SUBREG_BYTE.
      
      Using poly_uint16_pod rtx fields requires a new field code ('p').
      Since there are no other uses of 'p' besides SUBREG_BYTE, the patch
      doesn't add an XPOLY or whatever; all uses should go via SUBREG_BYTE
      instead.
      
      The patch doesn't bother implementing 'p' support for legacy
      define_peepholes, since none of the remaining ones have subregs
      in their patterns.
      
      As it happened, the rtl documentation used SUBREG as an example of a
      code with mixed field types, accessed via XEXP (x, 0) and XINT (x, 1).
      Since there's no direct replacement for XINT, and since people should
      never use it even if there were, the patch changes the example to use
      INT_LIST instead.
      
      The patch also changes subreg-related helper functions so that they too
      take and return polynomial offsets.  This makes the patch quite big, but
      it's mostly mechanical.  The patch generally sticks to existing choices
      wrt signedness.
      
      2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/rtl.texi: Update documentation of SUBREG_BYTE.  Document the
      	'p' format code.  Use INT_LIST rather than SUBREG as the example of
      	a code with an XINT and an XEXP.  Remove the implication that
      	accessing an rtx field using XINT is expected to work.
      	* rtl.def (SUBREG): Change format from "ei" to "ep".
      	* rtl.h (rtunion::rt_subreg): New field.
      	(XCSUBREG): New macro.
      	(SUBREG_BYTE): Use it.
      	(subreg_shape): Change offset from an unsigned int to a poly_uint16.
      	Update constructor accordingly.
      	(subreg_shape::operator ==): Update accordingly.
      	(subreg_shape::unique_id): Return an unsigned HOST_WIDE_INT rather
      	than an unsigned int.
      	(subreg_lsb, subreg_lowpart_offset, subreg_highpart_offset): Return
      	a poly_uint64 rather than an unsigned int.
      	(subreg_lsb_1): Likewise.  Take the offset as a poly_uint64 rather
      	than an unsigned int.
      	(subreg_size_offset_from_lsb, subreg_size_lowpart_offset)
      	(subreg_size_highpart_offset): Return a poly_uint64 rather than
      	an unsigned int.  Take the sizes as poly_uint64s.
      	(subreg_offset_from_lsb): Return a poly_uint64 rather than
      	an unsigned int.  Take the shift as a poly_uint64 rather than
      	an unsigned int.
      	(subreg_regno_offset, subreg_offset_representable_p): Take the offset
      	as a poly_uint64 rather than an unsigned int.
      	(simplify_subreg_regno): Likewise.
      	(byte_lowpart_offset): Return the memory offset as a poly_int64
      	rather than an int.
      	(subreg_memory_offset): Likewise.  Take the subreg offset as a
      	poly_uint64 rather than an unsigned int.
      	(simplify_subreg, simplify_gen_subreg, subreg_get_info)
      	(gen_rtx_SUBREG, validate_subreg): Take the subreg offset as a
      	poly_uint64 rather than an unsigned int.
      	* rtl.c (rtx_format): Describe 'p' in comment.
      	(copy_rtx, rtx_equal_p_cb, rtx_equal_p): Handle 'p'.
      	* emit-rtl.c (validate_subreg, gen_rtx_SUBREG): Take the subreg
      	offset as a poly_uint64 rather than an unsigned int.
      	(byte_lowpart_offset): Return the memory offset as a poly_int64
      	rather than an int.
      	(subreg_memory_offset): Likewise.  Take the subreg offset as a
      	poly_uint64 rather than an unsigned int.
      	(subreg_size_lowpart_offset, subreg_size_highpart_offset): Take the
      	mode sizes as poly_uint64s rather than unsigned ints.  Return a
      	poly_uint64 rather than an unsigned int.
      	(subreg_lowpart_p): Treat subreg offsets as poly_ints.
      	(copy_insn_1): Handle 'p'.
      	* rtlanal.c (set_noop_p): Treat subregs offsets as poly_uint64s.
      	(subreg_lsb_1): Take the subreg offset as a poly_uint64 rather than
      	an unsigned int.  Return the shift in the same way.
      	(subreg_lsb): Return the shift as a poly_uint64 rather than an
      	unsigned int.
      	(subreg_size_offset_from_lsb): Take the sizes and shift as
      	poly_uint64s rather than unsigned ints.  Return the offset as
      	a poly_uint64.
      	(subreg_get_info, subreg_regno_offset, subreg_offset_representable_p)
      	(simplify_subreg_regno): Take the offset as a poly_uint64 rather than
      	an unsigned int.
      	* rtlhash.c (add_rtx): Handle 'p'.
      	* genemit.c (gen_exp): Likewise.
      	* gengenrtl.c (type_from_format, gendef): Likewise.
      	* gensupport.c (subst_pattern_match, get_alternatives_number)
      	(collect_insn_data, alter_predicate_for_insn, alter_constraints)
      	(subst_dup): Likewise.
      	* gengtype.c (adjust_field_rtx_def): Likewise.
      	* genrecog.c (find_operand, find_matching_operand, validate_pattern)
      	(match_pattern_2): Likewise.
      	(rtx_test::SUBREG_FIELD): New rtx_test::kind_enum.
      	(rtx_test::subreg_field): New function.
      	(operator ==, safe_to_hoist_p, transition_parameter_type)
      	(print_nonbool_test, print_test): Handle SUBREG_FIELD.
      	* genattrtab.c (attr_rtx_1): Say that 'p' is deliberately not handled.
      	* genpeep.c (match_rtx): Likewise.
      	* print-rtl.c (print_poly_int): Include if GENERATOR_FILE too.
      	(rtx_writer::print_rtx_operand): Handle 'p'.
      	(print_value): Handle SUBREG.
      	* read-rtl.c (apply_int_iterator): Likewise.
      	(rtx_reader::read_rtx_operand): Handle 'p'.
      	* alias.c (rtx_equal_for_memref_p): Likewise.
      	* cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Likewise.
      	* caller-save.c (replace_reg_with_saved_mem): Treat subreg offsets
      	as poly_ints.
      	* calls.c (expand_call): Likewise.
      	* combine.c (combine_simplify_rtx, expand_field_assignment): Likewise.
      	(make_extraction, gen_lowpart_for_combine): Likewise.
      	* loop-invariant.c (hash_invariant_expr_1, invariant_expr_equal_p):
      	Likewise.
      	* cse.c (remove_invalid_subreg_refs): Take the offset as a poly_uint64
      	rather than an unsigned int.  Treat subreg offsets as poly_ints.
      	(exp_equiv_p): Handle 'p'.
      	(hash_rtx_cb): Likewise.  Treat subreg offsets as poly_ints.
      	(equiv_constant, cse_insn): Treat subreg offsets as poly_ints.
      	* dse.c (find_shift_sequence): Likewise.
      	* dwarf2out.c (rtl_for_decl_location): Likewise.
      	* expmed.c (extract_low_bits): Likewise.
      	* expr.c (emit_group_store, undefined_operand_subword_p): Likewise.
      	(expand_expr_real_2): Likewise.
      	* final.c (alter_subreg): Likewise.
      	(leaf_renumber_regs_insn): Handle 'p'.
      	* function.c (assign_parm_find_stack_rtl, assign_parm_setup_stack):
      	Treat subreg offsets as poly_ints.
      	* fwprop.c (forward_propagate_and_simplify): Likewise.
      	* ifcvt.c (noce_emit_move_insn, noce_emit_cmove): Likewise.
      	* ira.c (get_subreg_tracking_sizes): Likewise.
      	* ira-conflicts.c (go_through_subreg): Likewise.
      	* ira-lives.c (process_single_reg_class_operands): Likewise.
      	* jump.c (rtx_renumbered_equal_p): Likewise.  Handle 'p'.
      	* lower-subreg.c (simplify_subreg_concatn): Take the subreg offset
      	as a poly_uint64 rather than an unsigned int.
      	(simplify_gen_subreg_concatn, resolve_simple_move): Treat
      	subreg offsets as poly_ints.
      	* lra-constraints.c (operands_match_p): Handle 'p'.
      	(match_reload, curr_insn_transform): Treat subreg offsets as poly_ints.
      	* lra-spills.c (assign_mem_slot): Likewise.
      	* postreload.c (move2add_valid_value_p): Likewise.
      	* recog.c (general_operand, indirect_operand): Likewise.
      	* regcprop.c (copy_value, maybe_mode_change): Likewise.
      	(copyprop_hardreg_forward_1): Likewise.
      	* reginfo.c (simplifiable_subregs_hasher::hash, simplifiable_subregs)
      	(record_subregs_of_mode): Likewise.
      	* rtlhooks.c (gen_lowpart_general, gen_lowpart_if_possible): Likewise.
      	* reload.c (operands_match_p): Handle 'p'.
      	(find_reloads_subreg_address): Treat subreg offsets as poly_ints.
      	* reload1.c (alter_reg, choose_reload_regs): Likewise.
      	(compute_reload_subreg_offset): Likewise, and return an poly_int64.
      	* simplify-rtx.c (simplify_truncation, simplify_binary_operation_1):
      	(test_vector_ops_duplicate): Treat subreg offsets as poly_ints.
      	(simplify_const_poly_int_tests<N>::run): Likewise.
      	(simplify_subreg, simplify_gen_subreg): Take the subreg offset as
      	a poly_uint64 rather than an unsigned int.
      	* valtrack.c (debug_lowpart_subreg): Likewise.
      	* var-tracking.c (var_lowpart): Likewise.
      	(loc_cmp): Handle 'p'.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255882
      Richard Sandiford committed
    • poly_int: rtx constants · 0c12fc9b
      This patch adds an rtl representation of poly_int values.
      There were three possible ways of doing this:
      
      (1) Add a new rtl code for the poly_ints themselves and store the
          coefficients as trailing wide_ints.  This would give constants like:
      
            (const_poly_int [c0 c1 ... cn])
      
          The runtime value would be:
      
            c0 + c1 * x1 + ... + cn * xn
      
      (2) Like (1), but use rtxes for the coefficients.  This would give
          constants like:
      
            (const_poly_int [(const_int c0)
                             (const_int c1)
                             ...
                             (const_int cn)])
      
          although the coefficients could be const_wide_ints instead
          of const_ints where appropriate.
      
      (3) Add a new rtl code for the polynomial indeterminates,
          then use them in const wrappers.  A constant like c0 + c1 * x1
          would then look like:
      
            (const:M (plus:M (mult:M (const_param:M x1)
                                     (const_int c1))
                             (const_int c0)))
      
      There didn't seem to be that much to choose between them.  The main
      advantage of (1) is that it's a more efficient representation and
      that we can refer to the cofficients directly as wide_int_storage.
      
      2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/rtl.texi (const_poly_int): Document.  Also document the
      	rtl sharing behavior.
      	* gengenrtl.c (excluded_rtx): Return true for CONST_POLY_INT.
      	* rtl.h (const_poly_int_def): New struct.
      	(rtx_def::u): Add a cpi field.
      	(CASE_CONST_UNIQUE, CASE_CONST_ANY): Add CONST_POLY_INT.
      	(CONST_POLY_INT_P, CONST_POLY_INT_COEFFS): New macros.
      	(wi::rtx_to_poly_wide_ref): New typedef
      	(const_poly_int_value, wi::to_poly_wide, rtx_to_poly_int64)
      	(poly_int_rtx_p): New functions.
      	(trunc_int_for_mode): Declare a poly_int64 version.
      	(plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
      	(immed_wide_int_const): Take a poly_wide_int_ref rather than
      	a wide_int_ref.
      	(strip_offset): Declare.
      	(strip_offset_and_add): New function.
      	* rtl.def (CONST_POLY_INT): New rtx code.
      	* rtl.c (rtx_size): Handle CONST_POLY_INT.
      	(shared_const_p): Use poly_int_rtx_p.
      	* emit-rtl.h (gen_int_mode): Take a poly_int64 instead of a
      	HOST_WIDE_INT.
      	(gen_int_shift_amount): Likewise.
      	* emit-rtl.c (const_poly_int_hasher): New class.
      	(const_poly_int_htab): New variable.
      	(init_emit_once): Initialize it when NUM_POLY_INT_COEFFS > 1.
      	(const_poly_int_hasher::hash): New function.
      	(const_poly_int_hasher::equal): Likewise.
      	(gen_int_mode): Take a poly_int64 instead of a HOST_WIDE_INT.
      	(immed_wide_int_const): Rename to...
      	(immed_wide_int_const_1): ...this and make static.
      	(immed_wide_int_const): New function, taking a poly_wide_int_ref
      	instead of a wide_int_ref.
      	(gen_int_shift_amount): Take a poly_int64 instead of a HOST_WIDE_INT.
      	(gen_lowpart_common): Handle CONST_POLY_INT.
      	* cse.c (hash_rtx_cb, equiv_constant): Likewise.
      	* cselib.c (cselib_hash_rtx): Likewise.
      	* dwarf2out.c (const_ok_for_output_1): Likewise.
      	* expr.c (convert_modes): Likewise.
      	* print-rtl.c (rtx_writer::print_rtx, print_value): Likewise.
      	* rtlhash.c (add_rtx): Likewise.
      	* explow.c (trunc_int_for_mode): Add a poly_int64 version.
      	(plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
      	Handle existing CONST_POLY_INT rtxes.
      	* expmed.h (expand_shift): Take a poly_int64 instead of a
      	HOST_WIDE_INT.
      	* expmed.c (expand_shift): Likewise.
      	* rtlanal.c (strip_offset): New function.
      	(commutative_operand_precedence): Give CONST_POLY_INT the same
      	precedence as CONST_DOUBLE and put CONST_WIDE_INT between that
      	and CONST_INT.
      	* rtl-tests.c (const_poly_int_tests): New struct.
      	(rtl_tests_c_tests): Use it.
      	* simplify-rtx.c (simplify_const_unary_operation): Handle
      	CONST_POLY_INT.
      	(simplify_const_binary_operation): Likewise.
      	(simplify_binary_operation_1): Fold additions of symbolic constants
      	and CONST_POLY_INTs.
      	(simplify_subreg): Handle extensions and truncations of
      	CONST_POLY_INTs.
      	(simplify_const_poly_int_tests): New struct.
      	(simplify_rtx_c_tests): Use it.
      	* wide-int.h (storage_ref): Add default constructor.
      	(wide_int_ref_storage): Likewise.
      	(trailing_wide_ints): Use GTY((user)).
      	(trailing_wide_ints::operator[]): Add a const version.
      	(trailing_wide_ints::get_precision): New function.
      	(trailing_wide_ints::extra_size): Likewise.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255862
      Richard Sandiford committed
  8. 12 Dec, 2017 1 commit
    • [SFN] introduce statement frontier notes, still disabled · 96a95ac1
      This patch completes the infrastructure for the introduction of
      statement frontiers in C-family languages.
      
      It brings in all the code remaining code needed to introduce and
      transform begin stmt trees, gimple stmts, insns and notes, and
      ultimately use them to generate the is_stmt column in DWARF2+ line
      number tables/programs, however none of it is activated: the option
      that would do so will be introduced in a subsequent patch.
      
      This patch depends on an earlier patch with not-quite-boilerplate
      changes towards SFN.
      
      for  gcc/c-family/ChangeLog
      
      	* c-semantics.c (pop_stmt_list): Move begin stmt marker into
      	subsequent statement list.
      
      for  gcc/c/ChangeLog
      
      	* c-objc-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
      	* c-parser.c (add_debug_begin_stmt): New.
      	(c_parser_declaration_or_fndef): Call it.
      	(c_parser_compound_statement_nostart): Likewise.
      	(c_parser_statement_after_labels): Likewise.
      	* c-typeck (c_finish_stmt_expr): Skip begin stmts markers.
      
      for  gcc/cp/ChangeLog
      
      	* constexpr.c (check_constexpr_ctor_body_1): Skip begin stmt
      	markers.
      	(constexpr_fn_retval): Likewise.
      	(potential_constant_expression_1): Likewise.
      	(cxx_eval_statement_list): Check that a begin stmt marker is
      	not used as the value of a statement list.
      	(cxx_eval_constant_expression): Return begin stmt markers
      	unchanged.
      	* cp-array-notation.c (stmt_location): New.
      	(cp_expand_cond_array_notations): Use it.
      	* cp-objcp-common.h (LANG_HOOKS_EMITS_BEGIN_STMT): Redefine as true.
      	* parser.c (add_debug_begin_stmt): New.
      	(cp_parser_statement): Call it.
      	* pt.c (tsubst_copy): Handle begin stmt markers.
      
      for  gcc/ChangeLog
      
      	* cfgexpand.c (expand_gimple_basic_block): Handle begin stmt
      	markers.  Integrate source bind into debug stmt expand loop.
      	(pass_expand::execute): Check debug marker limit.  Avoid deep
      	TER and expand debug locations for debug bind insns only.
      	* cse.c (insn_live_p): Keep nonbind markers and debug bindings
      	followed by them.
      	* df-scan.c (df_insn_delete): Accept out-of-block debug insn.
      	* final.c (reemit_insn_block_notes): Take current block from
      	nonbind markers.  Declare note where it's first set.
      	(final_scan_insn): Handle begin stmt notes.  Emit is_stmt according to
      	begin stmt markers if enabled.
      	(notice_source_line): Handle nonbind markers.  Fail if their
      	location is unknown or that of builtins.
      	(rest_of_handle_final): Convert begin stmt markers to notes if
      	var-tracking didn't run.
      	(rest_of_clean_state): Skip begin stmt markers.
      	* gimple-pretty-print.c (dump_gimple_debug): Handle begin stmt
      	markers.
      	* function.c (allocate_struct_function): Set begin_stmt_markers.
      	* function.h (struct function): Add debug_marker_count counter
      	and debug_nonbind_markers flag.
      	* gimple-iterator.c (gsi_remove): Adjust debug_marker_count.
      	* gimple-low.c (lower_function_body): Adjust
      	debug_nonbind_markers.
      	(lower_stmt): Drop or skip gimple debug stmts.
      	(lower_try_catch): Skip debug stmts.
      	* gimple.c (gimple_build_debug_begin_stmt): New.
      	(gimple_copy): Increment debug_marker_count if copying one.
      	* gimple.h (gimple_build_debug_begin_stmt): Declare.
      	* gimplify.c (rexpr_location): New.
      	(rexpr_has_location): New.
      	(warn_switch_unreachable_r): Handle gimple debug stmts.
      	(shortcut_cond_r): Call expr_location.
      	(find_goto): New.
      	(find_goto_label): New.
      	(shortcut_cond_expr): Call expr_has_location, expr_location, and
      	find_goto_label.
      	(gimplify_cond_expr): Call find_goto_label, expr_has_location, and
      	expr_location.
      	(gimplify_expr): Handle begin stmt markers.  Reject debug expr decls.
      	* langhooks-def.h (LANG_HOOKS_EMITS_BEGIN_STMT): New.  Add to...
      	(LANG_HOOKS_INITIALIZER): ... this.
      	* langhooks.h (struct lang_hooks): Add emits_begin_stmt.
      	* lra-contraints.c (inherit_reload_reg): Tolerate between-blocks
      	debug insns.
      	(update_ebb_live_info): Skip debug insn markers.
      	* lra.c (debug_insn_static_data): Rename to...
      	(debug_bind_static_data): ... this.
      	(debug_marker_static_data): New.
      	(lra_set_insn_recog_data): Select one of the above depending
      	on debug insn kind.
      	(lra_update_isn_regno_info): Don't assume debug insns have
      	freqs.
      	(push_insns): Skip debug insns.
      	* lto-streamer-in.c (input_function): Drop debug stmts
      	depending on active options.  Adjust debug_nonbind_markers.
      	* params.def (PARAM_MAX_DEBUG_MARKER_COUNT): New.
      	* print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
      	begin stmt marker notes.
      	(print_insn): Likewise.
      	* recog.c (extract_insn): Recognize rtl for debug markers.
      	* rtl.def (DEBUG_MARKER): New.
      	* tree-inline.c: Include params.h.
      	(remap_gimple_stmt): Handle nonbind markers.
      	(maybe_move_debug_stmts_to_successors): Likewise.
      	(copy_debug_stmt): Likewise.
      	* tree-iterator.c (append_to_statement_list_1): Append begin stmt
      	markers regardless of no side effects.
      	(tsi_link_before): Don't update container's side effects when adding
      	a begin stmt marker.
      	(tsi_link_after): Likewise.
      	(expr_first): Skip begin stmt markers.
      	(expr_last): Likewise.
      	* tree-pretty-print (dump_generic_node): Handle begin stmt markers.
      	* tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
      	Disregard nonbind markers.
      	* tree.c (make_node_stat): Don't set side effects for begin stmt
      	markers.
      	(build1_stat): Likewise.
      	* tree.def (DEBUG_BEGIN_STMT): New.
      	* tree.h (GOTO_DESTINATION): Require a GOTO_EXPR.
      	* var-tracking.c (delete_debug_insns): Renamed to...
      	(delete_vta_debug_insns): ... this.
      	(reemit_marker_as_note): New.
      	(vt_initialize): Reemit markers.
      	(delete_vta_debug_insns): Likewise.
      	(vt_debug_insns_local): Reemit or delete markers.
      	(variable_tracking_main_1): Likewise.
      	* doc/generic.texi (DEBUG_BEGIN_STMT): Document.
      	* doc/gimple.texi (gimple_debug_begin_stmt_p): New.
      	(gimple_debug_nonbind_marker_p): New.
      	(gimple_build_debug_bind): Adjust.
      	(gimple_build_debug_begin_stmt): New.
      	* doc/invoke.texi (max-debug-marker-count): New param.
      	* doc/rtl.texi (debug_implicit_ptr, entry_value): New.
      	(debug_parameter_ref, debug_marker): New.
      	(NOTE_INSN_BEGIN_STMT): New.
      	(DEBUG_INSN): Describe begin stmt markers.
      
      From-SVN: r255568
      Alexandre Oliva committed
  9. 01 Nov, 2017 1 commit
    • Add a VEC_SERIES rtl code · ef339d6e
      This patch adds an rtl representation of a vector linear series
      of the form:
      
        a[I] = BASE + I * STEP
      
      Like vec_duplicate;
      
      - the new rtx can be used for both constant and non-constant vectors
      - when used for constant vectors it is wrapped in a (const ...)
      - the constant form is only used for variable-length vectors;
        fixed-length vectors still use CONST_VECTOR
      
      At the moment the code is restricted to integer elements, to avoid
      concerns over floating-point rounding.
      
      2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/rtl.texi (vec_series): Document.
      	(const): Say that the operand can be a vec_series.
      	* rtl.def (VEC_SERIES): New rtx code.
      	* rtl.h (const_vec_series_p_1): Declare.
      	(const_vec_series_p): New function.
      	* emit-rtl.h (gen_const_vec_series): Declare.
      	(gen_vec_series): Likewise.
      	* emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
      	(gen_vec_series): Likewise.
      	* optabs.c (expand_mult_highpart): Use gen_const_vec_series.
      	* simplify-rtx.c (simplify_unary_operation): Handle negations
      	of vector series.
      	(simplify_binary_operation_series): New function.
      	(simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
      	(test_vector_ops_series): New function.
      	(test_vector_ops): Call it.
      	* config/powerpcspe/altivec.md (altivec_lvsl): Use
      	gen_const_vec_series.
      	(altivec_lvsr): Likewise.
      	* config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r254297
      Richard Sandiford committed
  10. 01 Jan, 2017 1 commit
  11. 27 Apr, 2016 1 commit
    • Fix comment in rtl.def · e306693a
      Commit r210360 removed the first "i" field from the various instruction
      nodes in rtx.def, moving it to an explicit "int insn_uid;" field
      of the union "u2" within rtx_def.
      
      Update the comment in rtl.def to reflect this change.  Also, fix
      a stray apostrophe.
      
      gcc/ChangeLog:
      	* rtl.def: Update comment for "things in the instruction chain" to
      	reflect the removal of the leading "i" field for INSN_UID in
      	r210360.  Fix bogus apostrophe.
      
      From-SVN: r235520
      David Malcolm committed
  12. 29 Jan, 2016 1 commit
    • re PR target/69299 (-mavx performance degradation with r232088) · 9eb1ca69
      2016-01-29  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR target/69299
      	* config/i386/constraints.md (Bm): Describe as special memory
      	constraint.
      	* doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it.
      	* genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT.
      	* genpreds.c (struct constraint_data): Add is_special_memory.
      	(have_special_memory_constraints, special_memory_start): New
      	static vars.
      	(special_memory_end): Ditto.
      	(add_constraint): Add new arg is_special_memory.  Add code to
      	process its true value.  Update have_special_memory_constraints.
      	(process_define_constraint): Pass the new arg.
      	(process_define_register_constraint): Ditto.
      	(choose_enum_order): Process special memory.
      	(write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and
      	function insn_extra_special_memory_constraint.
      	(main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT.
      	* gensupport.c (process_rtx): Process
      	DEFINE_SPECIAL_MEMORY_CONSTRAINT.
      	* ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY.
      	* ira-lives.c (single_reg_class): Use
      	insn_extra_special_memory_constraint.
      	* ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY.
      	* lra-constraints.c (process_alt_operands): Ditto.
      	(curr_insn_transform): Use insn_extra_special_memory_constraint.
      	* recog.c (asm_operand_ok, preprocess_constraints): Process
      	CT_SPECIAL_MEMORY.
      	* reload.c (find_reloads): Ditto.
      	* rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New.
      	* stmt.c (parse_input_constraint): Use
      	insn_extra_special_memory_constraint.
      
      From-SVN: r232993
      Vladimir Makarov committed
  13. 04 Jan, 2016 1 commit
  14. 19 May, 2015 1 commit
    • rtl.def (REG): Change format to "r". · 9fccb335
      gcc/
      	* rtl.def (REG): Change format to "r".
      	* rtl.h (rtunion): Remove rt_reg.
      	(reg_info): New structure.
      	(rtx_def): Add reg field to main union.
      	(X0REGATTR): Delete.
      	(REG_CHECK): New macro.
      	(SET_REGNO_RAW, rhs_regno, REG_ATTRS): Use it.
      	* rtl.c (rtx_format): Document "r".
      	(rtx_code_size): Handle REG specially.
      	* gengenrtl.c (special_format): Return true for formats
      	that include 'r'.
      	* gengtype.c (adjust_field_rtx_def): Handle 'r' fields.
      	Deal with REG_ATTRS after the field loop.
      	* emit-rtl.c (gen_raw_REG): Call rtx_alloc_stat directly.
      	* expmed.c (init_expmed): Call gen_raw_REG instead of
      	gen_rtx_raw_REG.
      	* expr.c (init_expr_target): Likewise.
      	* regcprop.c (maybe_mode_change): Likewise.
      	* varasm.c (make_decl_rtl): Likewise.
      	* final.c (leaf_renumber_regs_insn): Return early after
      	handling REGs.
      	* genemit.c (gen_exp): Handle 'r' fields.
      	* genpeep.c (match_rtx): Likewise.
      	* gensupport.c (subst_pattern_match): Likewise.
      	(get_alternatives_number, collect_insn_data, alter_predicate_for_insn)
      	(alter_constraints, subst_dup): Likewise.
      	* read-rtl.c (read_rtx_code): Likewise.
      	* print-rtl.c (print_rtx): Likewise.
      	* genrecog.c (find_operand, find_matching_operand): Likewise.
      	(validate_pattern, match_pattern_2): Likewise.
      	(parameter::UINT, rtx_test::REGNO_FIELD): New enum values.
      	(rtx_test::regno_field): New function.
      	(operator ==, safe_to_hoist_p, transition_parameter_type)
      	(parameter_type_string, print_parameter_value)
      	(print_nonbool_test, print_test): Handle new enum values.
      	* cselib.c (rtx_equal_for_cselib_1): Handle REG specially.
      	* lra-constraints.c (operands_match_p): Likewise.
      
      From-SVN: r223339
      Richard Sandiford committed
  15. 05 Jan, 2015 1 commit
  16. 13 May, 2014 5 commits
    • rtl.def (SYMBOL_REF): Remove middle "0" field. · da3cd113
      gcc/
      	* rtl.def (SYMBOL_REF): Remove middle "0" field.
      	* rtl.h (block_symbol): Reduce number of fields to 2.
      	(rtx_def): Add u2.symbol_ref_flags.
      	(SYMBOL_REF_FLAGS): Use it.
      	(SYMBOL_REF_DATA, SET_SYMBOL_REF_DECL, SYMBOL_REF_DECL)
      	(SET_SYMBOL_REF_CONSTANT, SYMBOL_REF_CONSTANT): Lower index.
      	* gengtype.c (adjust_field_rtx_def): Remove SYMBOL_REF_FLAGS handling.
      	Lower index of SYMBOL_REF_DATA.
      	* print-rtl.c (print_rtx): Lower index for SYMBOL_REF_DATA.
      	Print SYMBOL_REF_FLAGS at the same time.
      	* genattrtab.c (attr_rtx_1): Only initialize 1 "0" SYMBOL_REF field.
      
      From-SVN: r210363
      Richard Sandiford committed
    • rtl.def (VAR_LOCATION): Remove "i" field. · fcc74520
      gcc/
      	* rtl.def (VAR_LOCATION): Remove "i" field.
      	* rtl.h (rtx_def): Add u2.var_location_status.
      	(PAT_VAR_LOCATION_STATUS): Use it.
      	(gen_rtx_VAR_LOCATION): Declare.
      	* gengenrtl.c (excluded_rtx): Add VAR_LOCATION.
      	* emit-rtl.c (gen_rtx_VAR_LOCATION): New function.
      	* var-tracking.c (emit_note_insn_var_location): Remove casts.
      
      From-SVN: r210362
      Richard Sandiford committed
    • rtl.def (scratch): Fix outdated comment and remove "0" field. · feb09dd9
      gcc/
      	* rtl.def (scratch): Fix outdated comment and remove "0" field.
      	* gengtype.c (adjust_field_rtx_def): Update accordingly.
      
      From-SVN: r210361
      Richard Sandiford committed
    • gcc/ · ed8921dc
      	* rtl.def (DEBUG_INSN, INSN, JUMP_INSN, CALL_INSN, JUMP_TABLE_DATA)
      	(BARRIER, CODE_LABEL, NOTE): Remove first "i" field.
      	* rtl.h (rtx_def): Add insn_uid to u2 field.
      	(RTX_FLAG_CHECK8): Delete in favor of...
      	(RTL_INSN_CHAIN_FLAG_CHECK): ...this new macro.
      	(INSN_DELETED_P): Update accordingly.
      	(INSN_UID): Use u2.insn_uid.
      	(INSN_CHAIN_CODE_P): Define.
      	(PREV_INSN, NEXT_INSN, BLOCK_FOR_INSN, PATTERN, INSN_LOCATION)
      	(INSN_CODE, REG_NOTES, CALL_INSN_FUNCTION_USAGE, CODE_LABEL_NUMBER)
      	(NOTE_DATA, NOTE_DELETED_LABEL_NAME, NOTE_BLOCK, NOTE_EH_HANDLER)
      	(NOTE_BASIC_BLOCK, NOTE_VAR_LOCATION, NOTE_CFI, NOTE_LABEL_NUMBER)
      	(NOTE_KIND, LABEL_NAME, LABEL_NUSES, JUMP_LABEL, LABEL_REFS): Lower
      	indices accordingly.
      	* print-rtl.c (print_rtx): Print INSN_UIDs before the main loop.
      	Update indices for insn-chain rtxes.
      	* gengtype.c (gen_rtx_next): Adjust test for insn-chain rtxes.
      	(adjust_field_rtx_def): Lower '0' indices for all insn-chain rtxes.
      	* emit-rtl.c (gen_label_rtx): Update gen_rtx_LABEL call.
      	* caller-save.c (init_caller_save): Update gen_rtx_INSN calls.
      	* combine.c (try_combine): Likewise.
      	* ira.c (setup_prohibited_mode_move_regs): Likewise.
      
      From-SVN: r210360
      Richard Sandiford committed
    • rtl.def (REG): Remove middle field. · fccc5515
      gcc/
      	* rtl.def (REG): Remove middle field.
      	* rtl.h (rtx_def): Add orignal_regno to u2.
      	(ORIGINAL_REGNO): Use it instead of field 1.
      	(REG_ATTRS): Lower field index accordingly.
      	* gengtype.c (adjust_field_rtx_def): Remove handling of
      	ORIGINAL_REGNO.  Move REG_ATTRS index down.
      	* print-rtl.c (print_rtx): Move ORIGINAL_REGNO handling to the
      	code that prints the REGNO.
      
      From-SVN: r210359
      Richard Sandiford committed
  17. 06 May, 2014 1 commit
  18. 02 Jan, 2014 1 commit
  19. 10 Dec, 2013 1 commit
    • cgraph.h (cgraph_node_set_iterator, [...]): Remove typedef. · 84562394
      	* 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
      Oleg Endo committed
  20. 23 Sep, 2013 1 commit
    • rtl.texi (REG_NOTES): Say that int_list can also be used. · e5af9ddd
      gcc/
      	* doc/rtl.texi (REG_NOTES): Say that int_list can also be used.
      	(REG_BR_PROB): Say that the probability is stored in an int_list.
      	* reg-notes.def: Update commentary to mention INT_LIST.
      	* rtl.def (EXPR_LIST, INSN_LIST): Capitalize comments.
      	(INT_LIST): New rtx.
      	* rtl.h (add_int_reg_note, add_shallow_copy_of_reg_note): Declare.
      	* rtlanal.c (int_reg_note_p): New function.
      	(alloc_reg_note): Assert that the note does not have an int argument.
      	(add_int_reg_note, add_shallow_copy_of_reg_note): New functions.
      	* combine.c (distribute_notes): Use add_shallow_copy_of_rtx.
      	* cse.c (cse_process_notes_1): Expect REG_EQUAL to be an EXPR_LIST
      	rather than an INSN_LIST.  Handle INT_LIST.
      	* ifcvt.c (cond_exec_process_insns): Take the probability as an int
      	rather than an rtx.  Use gen_rtx_INT_LIST to create a REG_BR_PROB note.
      	(cond_exec_process_if_block): Use XINT to extract REG_BR_PROB values.
      	Manipulate them as ints rather than rtxes.
      	* reg-stack.c (subst_asm_stack_regs): Only handle EXPR_LIST notes.
      	* regmove.c (copy_src_to_dest): Likewise.
      	* sched-vis.c (print_insn_with_notes): Handle INT_LIST.
      
      	* config/i386/winnt.c (i386_pe_seh_unwind_emit): Sink pat assignment
      	into the cases that need it.
      	* config/arm/arm.c (arm_unwind_emit): Likewise.
      
      	* asan.c (asan_clear_shadow): Use add_int_reg_note for REG_BR_PROB.
      	* emit-rtl.c (try_split, emit_copy_of_insn_after): Likewise.
      	* loop-doloop.c (add_test, doloop_modify): Likewise.
      	* loop-unswitch.c (compare_and_jump_seq): Likewise.
      	* optabs.c (emit_cmp_and_jump_insn_1): Likewise.
      	* predict.c (combine_predictions_for_insn): Likewise.
      	* print-rtl.c (print_rtx): Handle INT_LIST.
      	* config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Likewise.
      	* config/alpha/alpha.c (emit_unlikely_jump): Likewise.
      	* config/arm/arm.c (emit_unlikely_jump): Likewise.
      	* config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise.
      	(ix86_split_fp_branch, predict_jump): Likewise.
      	* config/rs6000/rs6000.c (emit_unlikely_jump): Likewise.
      	* config/sh/sh.c (expand_cbranchsi4): Likewise.
      	* config/spu/spu.c (ea_load_store_inline): Likewise.
      
      	* cfgbuild.c (compute_outgoing_frequencies): Use XINT to access the
      	value of a REG_BR_PROB note.
      	* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
      	(update_br_prob_note, rtl_verify_edges, purge_dead_edges): Likewise.
      	* emit-rtl.c (try_split): Likewise.
      	* predict.c (br_prob_note_reliable_p): Likewise.
      	(invert_br_probabilities, combine_predictions_for_insn): Likewise.
      	* reorg.c (mostly_true_jump): Likewise.
      	* config/bfin/bfin.c (cbranch_predicted_taken_p): Likewise.
      	* config/frv/frv.c (frv_print_operand_jump_hint): Likewise.
      	* config/i386/i386.c (ix86_print_operand): Likewise.
      	* config/ia64/ia64.c (ia64_print_operand): Likewise.
      	* config/mmix/mmix.c (mmix_print_operand): Likewise.
      	* config/rs6000/rs6000.c (output_cbranch): Likewise.
      	* config/s390/s390.c (s390_expand_tbegin): Likewise.
      	* config/sh/sh.c (sh_print_operand, sh_adjust_cost): Likewise.
      	* config/sparc/sparc.c (output_cbranch): Likewise.
      	* config/spu/spu.c (get_branch_target): Likewise.
      	* config/tilegx/tilegx.c (cbranch_predicted_p): Likewise.
      	* config/tilepro/tilepro.c (cbranch_predicted_p): Likewise.
      
      From-SVN: r202839
      Richard Sandiford committed
  21. 04 Jun, 2013 1 commit
  22. 08 Apr, 2013 1 commit
  23. 05 Apr, 2013 1 commit
  24. 30 Mar, 2013 1 commit
    • cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER. · 39718607
      	* cfgrtl.c (fixup_reorder_chain): Do not emit barriers to BB_FOOTER.
      
      	* postreload-gcse.c (bb_has_well_behaved_predecessors): Correct test
      	for table jump at the end of a basic block using tablejump_p.
      	* targhooks.c (default_invalid_within_doloop): Likewise.
      	* config/rs6000/rs6000.c (TARGET_INVALID_WITHIN_DOLOOP): Remove
      	target hook implementation that is identical to the default hook.
      	(rs6000_invalid_within_doloop): Remove.
      
      	* bb-reorder.c (fix_crossing_unconditional_branches): Remove set but
      	unused variable from tablejump_p call.
      
      	* rtl.def (JUMP_TABLE_DATA): New RTX_INSN object.
      	* rtl.h (RTX_PREV, RTX_NEXT): Adjust for new JUMP_TABLE_DATA.
      	(INSN_DELETED_P): Likewise.
      	(emit_jump_table_data): New prototype.
      	* gengtype.c (adjust_field_rtx_def): Handle JUMP_TABLE_DATA fields
      	after 4th as unused.
      	* print-rtl.c (print_rtl): Handle JUMP_TABLE_DATA.
      	* sched-vis.c (print_insn): Likewise.
      	* emit-rtl.c (active_insn_p): Consider JUMP_TABLE_DATA an active
      	insn for compatibility with back ends that use next_active_insn to
      	identify jump table data.
      	(set_insn_deleted): Remove no longer useful JUMP_TABLE_DATA_P check.
      	(remove_insn): Likewise.
      	(emit_insn): Do not accept JUMP_TABLE_DATA objects in insn chains
      	to be emitted.
      	(emit_debug_insn, emit_jump_insn, emit_call_insn, emit_label): Idem.
      	(emit_jump_table_data): New function.
      
      	* cfgbuild.c (inside_basic_block_p): A JUMP_INSN is always inside a
      	basic block, a JUMP_TABLE_DATA never is.
      	(control_flow_insn_p): JUMP_TABLE_DATA is not a control flow insn.
      	* cfgrtl.c (duplicate_insn_chain): Split handling of JUMP_TABLE_DATA
      	off from code handling real insns.
      	* final.c (get_attr_length_1): Simplify for JUMP_INSNs.
      	* function.c (instantiate_virtual_regs): Remove JUMP_TABLE_DATA_P
      	test, now redundant because JUMP_TABLE_DATA is not an INSN_P insn.
      	* gcse.c (insert_insn_end_basic_block): Likewise, JUMP_TABLE_DATA_P
      	is not a NONDEBUG_INSN_P.
      	* ira-costs.c (scan_one_insn): Likewise.
      	* jump.c (mark_all_labels): Likewise.
      	(mark_jump_label_1): Likewise.
      	* lra-eliminations.c (eliminate_regs_in_insn): Likewise.
      	* lra.c (get_insn_freq): Expect all insns reaching here to be in
      	a basic block.
      	(check_rtl): Remove JUMP_TABLE_DATA_P test, not a NONDEBUG_INSN_P insn.
      	* predict.c (expensive_function_p): Use FOR_BB_INSNS.
      	* reload1.c (calculate_needs_all_insns): Call set_label_offsets for
      	JUMP_TABLE_DATA_P insns.
      	(calculate_elim_costs_all_insns): Likewise.
      	(set_label_offsets): Recurse on the PATTERN of JUMP_TABLE_DATA insns.
      	(elimination_costs_in_insn): Remove redundant JUMP_TABLE_DATA_P test.
      	(delete_output_reload): Code style fixups.
      	* reorg.c (dbr_schedule): Move JUMP_TABLE_DATA_P up to avoid setting
      	insn flags on this non-insn.
      	* sched-rgn.c (add_branch_dependences): Treat JUMP_TABLE_DATA insns
      	as scheduling barriers, for pre-change compatibility.
      	* stmt.c (emit_case_dispatch_table): Emit jump table data not as
      	JUMP_INSN objects but instead as JUMP_TABLE_DATA objects.
      
      	* config/alpha/alpha.c (alpha_does_function_need_gp): Remove
      	redundant JUMP_TABLE_DATA_P test.
      	* config/arm/arm.c (thumb_far_jump_used_p): Likewise.
      	* config/frv/frv.c (frv_function_contains_far_jump): Likewise.
      	(frv_for_each_packet): Likewise.
      	* config/i386/i386.c (min_insn_size): Likewise.
      	(ix86_avoid_jump_mispredicts): Likewise.
      	* config/m32r/m32r.c (m32r_is_insn): Likewise.
      	* config/mep/mep.c (mep_reorg_erepeat): Likewise.
      	* config/mips/mips.c (USEFUL_INSN_P): Likewise.
      	(mips16_insn_length): Robustify.
      	(mips_has_long_branch_p): Remove redundant JUMP_TABLE_DATA_P test.
      	(mips16_split_long_branches): Likewise.
      	* config/pa/pa.c (pa_combine_instructions): Likewise.
      	* config/rs6000/rs6000.c (get_next_active_insn): Treat
      	JUMP_TABLE_DATA objects as active insns, like in active_insn_p.
      	* config/s390/s390.c (s390_chunkify_start): Treat JUMP_TABLE_DATA
      	as contributing to pool range lengths.
      	* config/sh/sh.c (find_barrier): Restore check for ADDR_DIFF_VEC.
      	Remove redundant JUMP_TABLE_DATA_P test.
      	(sh_loop_align): Likewise.
      	(split_branches): Likewise.
      	(sh_insn_length_adjustment): Likewise.
      	* config/spu/spu.c (get_branch_target): Likewise.
      
      From-SVN: r197266
      Steven Bosscher committed
  25. 10 Jan, 2013 1 commit
  26. 04 Jan, 2013 1 commit
  27. 19 Nov, 2012 1 commit
    • md.texi: Document define_subst. · 477c104e
              * doc/md.texi: Document define_subst.
              * gensupport.c (MAX_OPERANDS): New define.
              (operand_data): New.
              (match_operand_entries_in_pattern): New.
              (used_operands_numbers): New.
              (subst_true): New.
              (subst_false): New.
              (define_subst_queue): New.
              (define_subst_tail): New.
              (define_subst_attr_queue): New.
              (define_subst_attr_tail): New.
              (has_subst_attribute): New.
              (subst_pattern_match): New.
              (get_alternatives_number): New.
              (alter_output_for_subst_insn): New.
              (alter_attrs_for_subst_insn): New.
              (process_substs_on_one_elem): New.
              (subst_dup): New.
              (process_define_subst): New.
              (duplicate_alternatives): New.
              (duplicate_each_alternative): New.
              (constraints_handler_t): New typedef.
              (alter_constraints): New.
              (adjust_operands_numbers): New.
              (replace_duplicating_operands_in_pattern): New.
              (remove_from_queue): New.
              (process_rtx): Handle define_subst and define_subst_attr.
              (change_subst_attribute): New.
              (alter_predicate_for_insn): Fix formatting.
              (alter_attrs_for_insn): Likewise.
              (alter_output_for_insn): Likewise.
              (mark_operands_from_match_dup): New.
              (mark_operands_used_in_match_dup): New.
              (find_first_unused_number_of_operand): New.
              (renumerate_operands_in_pattern): New.
              (generate_match_dup): New.
              (check_define_attr_duplicates): New.
              (init_rtx_reader_args_cb): Add checking for duplicated attrs and
              processing of define_subst.
              (read_md_rtx): Handle define_subst.
              * read-rtl.c (struct subst_attr_to_iter_mapping): New.
              (substs): New global.
              (apply_subst_iterator): New.
              (bind_subst_iter_and_attr): New.
              (find_subst_iter_by_attr): New.
              (map_attr_string): Handle subst-iterators.
              (add_condition_to_rtx): Handle define_subst.
              (apply_iterators): Likewise.
              (initialize_iterators): Likewise.
              (add_define_attr_for_define_subst): New.
              (add_define_subst_attr): New.
              (read_subst_mapping): New.
              (read_rtx): Handle define_subst_attr.
              (read_rtx_code): Add subst-attributes recognition during reading of
              strings.
              * rtl.def (DEFINE_EXPAND): Add vector of attributes.
              (DEFINE_SUBST): New.
              (DEFINE_SUBST_ATTR): New.
      
      
      Co-Authored-By: Kirill Yukhin <kirill.yukhin@intel.com>
      Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
      
      From-SVN: r193618
      Maxim Kuznetsov committed
  28. 21 Oct, 2012 1 commit
  29. 02 Aug, 2012 1 commit
    • cfgexpand.c (expand_debug_locations): Encapsulate test for CONST_DOUBLE in macro. · 48175537
      2012-08-02  Kenneth Zadeck <zadeck@naturalbridge.com>
      
      	* cfgexpand.c (expand_debug_locations):  Encapsulate test for
      	CONST_DOUBLE in macro.
      	* combine.c (try_combine, gen_lowpart_for_combine): Ditto.
      	* cprop.c (implicit_set_cond_p): Ditto.
      	* cselib.c (rtx_equal_for_cselib_1): Ditto.
      	* expmed.c (expand_mult): Ditto.
      	* expr.c (convert_modes): Ditto.
      	* ira-costs.c (record_reg_classes): Ditto.
      	* ira-lives.c (single_reg_class): Ditto.
      	* optabs.c (expand_copysign_absneg, expand_copysign): Ditto.
      	* print-rtl.c (print_rtx): Ditto.
      	* recog.c (simplify_while_replacing, const_double_operand)
      	(asm_operand_ok, constrain_operands): Ditto.
      	* reg-stack.c (subst_stack_regs_pat): Ditto.
      	* reload.c (find_reloads, find_equiv_reg): Ditto.
      	* rtlanal.c (replace_rtx): Remove test.
      	* rtlanal.c (constant_pool_constant_p, split_double): Encapsulate test for
      	CONST_DOUBLE in macro.
      	* simplify-rtx.c (mode_signbit_p, avoid_constant_pool_reference)
      	(simplify_unary_operation_1, simplify_const_unary_operation)
      	(simplify_binary_operation_1, simplify_const_binary_operation)
      	(simplify_relational_operation_1)
      	(simplify_const_relational_operations)
      	(implify_subreg): Ditto.
      	* varasm.c (output_constant_pool_2): Ditto.
      	* rtl.h (CONST_DOUBLE_AS_INT_P, CONST_DOUBLE_AS_FLOAT_P): New
      	macros.
      	* rtl.def (CONST_DOUBLE):  Updated comments.
      
      From-SVN: r190105
      Kenneth Zadeck committed
  30. 04 May, 2012 1 commit
  31. 21 Apr, 2012 1 commit
    • re PR bootstrap/53021 (bootstrap failure on Linux/ia32) · 9e412ca3
      gcc/
      	PR bootstrap/53021
      	* rtl.def (ADDRESS): Use "i" rather than "w".
      	* rtl.h (find_base_term): Delete.
      	(may_be_sp_based_p): Declare.
      	* rtl.c (rtx_code_size): Remove ADDRESS special case.
      	* alias.h (UNIQUE_BASE_VALUE_SP, UNIQUE_BASE_VALUE_ARGP)
      	(UNIQUE_BASE_VALUE_FP, UNIQUE_BASE_VALUE_HFP): Move to...
      	* alias.c: ...here.
      	(find_base_term): Make static.
      	(may_be_sp_based_p): New function.
      	* dse.c (record_store): Use it.
      	* store-motion.c (store_killed_in_insn): Likewise.
      
      From-SVN: r186657
      Richard Sandiford committed
  32. 17 Apr, 2012 1 commit
    • rtl.def (ADDRESS): Turn operand into a HOST_WIDE_INT. · 9fc37b2b
      gcc/
      	* rtl.def (ADDRESS): Turn operand into a HOST_WIDE_INT.
      	* alias.c (reg_base_value): Expand and update comment.
      	(arg_base_value): New variable.
      	(unique_id): Move up file.
      	(unique_base_value, unique_base_value_p, known_base_value_p): New.
      	(find_base_value): Use arg_base_value and known_base_value_p.
      	(record_set): Document REG_NOALIAS handling.  Use unique_base_value.
      	(find_base_term): Use known_base_value_p.
      	(base_alias_check): Use unique_base_value_p.
      	(init_alias_target): Initialize arg_base_value.  Use unique_base_value.
      	(init_alias_analysis): Use 1 as the first id for REG_NOALIAS bases.
      
      From-SVN: r186540
      Richard Sandiford committed
  33. 31 Aug, 2011 1 commit
  34. 27 Aug, 2011 1 commit
    • rtl.texi (simple_return): Document. · 26898771
      	* doc/rtl.texi (simple_return): Document.
      	(parallel, PATTERN): Here too.
      	* doc/md.texi (return): Mention it's allowed to expand to simple_return
      	in some cases.
      	(simple_return): Document standard pattern.
      	* gengenrtl.c (special_rtx): SIMPLE_RETURN is special.
      	* final.c (final_scan_insn): Use ANY_RETURN_P on body.
      	* reorg.c (function_return_label, function_simple_return_label):
      	New static variables, replacing...
      	(end_of_function_label): ... this.
      	(simplejump_or_return_p): New static function.
      	(optimize_skip, steal_delay_list_from_fallthrough,
      	fill_slots_from_thread): Use it.
      	(relax_delay_slots): Likewise.  Use ANY_RETURN_P on body.
      	(rare_destination, follow_jumps): Use ANY_RETURN_P on body.
      	(find_end_label): Take a new arg which is one of the two return
      	rtxs.  Depending on which, set either function_return_label or
      	function_simple_return_label.  All callers changed.
      	(make_return_insns): Make both kinds.
      	(dbr_schedule): Adjust for two kinds of end labels.
      	* function.c (emit_return_into_block): Set JUMP_LABEL properly.
      	* genemit.c (gen_exp): Handle SIMPLE_RETURN.
      	(gen_expand, gen_split): Use ANY_RETURN_P.
      	* df-scan.c (df_uses_record): Handle SIMPLE_RETURN.
      	* rtl.def (SIMPLE_RETURN): New code.
      	* ifcvt.c (find_if_case_1): Be more careful about
      	redirecting jumps to the EXIT_BLOCK.
      	* jump.c (condjump_p, condjump_in_parallel_p, any_condjump_p,
      	returnjump_p_1): Handle SIMPLE_RETURNs.
      	* print-rtl.c (print_rtx): Likewise.
      	* rtl.c (copy_rtx): Likewise.
      	* bt-load.c (compute_defs_uses_and_gen): Use ANY_RETURN_P.
      	* combine.c (simplify_set): Likewise.
      	* resource.c (find_dead_or_set_registers, mark_set_resources):
      	Likewise.
      	* emit-rtl.c (verify_rtx_sharing, classify_insn, copy_insn_1,
      	copy_rtx_if_shared_1, mark_used_flags): Handle SIMPLE_RETURNs.
      	(init_emit_regs): Initialize simple_return_rtx.
      	* cfglayout.c (fixup_reorder_chain): Pass a JUMP_LABEL to
      	force_nonfallthru_and_redirect.
      	* rtl.h (ANY_RETURN_P): Allow SIMPLE_RETURN.
      	(GR_SIMPLE_RETURN): New enum value.
      	(simple_return_rtx): New macro.
      	* basic-block.h (force_nonfallthru_and_redirect): Adjust
      	declaration.
      	* cfgrtl.c (force_nonfallthru_and_redirect): Take a new jump_label
      	argument.  All callers changed.  Be careful about what kinds of
      	returnjumps to generate.
      	* config/i386/3i86.c (ix86_pad_returns, ix86_count_insn_bb,
      	ix86_pad_short_function): Likewise.
      	* config/arm/arm.c (arm_final_prescan_insn): Handle both kinds
      	of return.
      	* config/mips/mips.md (any_return): New code_iterator.
      	(optab): Add cases for return and simple_return.
      	(return): Expand to a simple_return.
      	(simple_return): New pattern.
      	(*<optab>, *<optab>_internal for any_return): New patterns.
      	(return_internal): Remove.
      	* config/mips/mips.c (mips_expand_epilogue): Make the last insn
      	a simple_return_internal.
      
      From-SVN: r178135
      Bernd Schmidt committed
  35. 22 Jun, 2011 1 commit
    • re PR debug/47858 (IPA-SRA decreases quality of debug info) · ddb555ed
      	PR debug/47858
      	* gimple.h (enum gimple_debug_subcode): Add GIMPLE_DEBUG_SOURCE_BIND.
      	(gimple_build_debug_source_bind_stat): New prototype.
      	(gimple_build_debug_source_bind): Define.
      	(gimple_debug_source_bind_p, gimple_debug_source_bind_get_var,
      	gimple_debug_source_bind_get_value,
      	gimple_debug_source_bind_get_value_ptr,
      	gimple_debug_source_bind_set_var,
      	gimple_debug_source_bind_set_value): New inlines.
      	* gimple.c (gimple_build_debug_source_bind_stat): New function.
      	* gimple-pretty-print.c (dump_gimple_debug): Handle
      	GIMPLE_DEBUG_SOURCE_BIND.
      	* sese.c (rename_uses): Handle gimple_debug_source_bind_p.
      	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
      	* tree-parloops.c (eliminate_local_variables,
      	separate_decls_in_region): Likewise.
      	(separate_decls_in_region_debug): Renamed from
      	separate_decls_in_region_debug_bind.  Handle
      	gimple_debug_source_bind_p.
      	* tree.h (decl_debug_args_lookup, decl_debug_args_insert): New
      	prototypes.
      	(DECL_HAS_DEBUG_ARGS_P): Define.
      	(struct tree_function_decl): Add has_debug_args_flag field.
      	* tree.c (debug_args_for_decl): New variable.
      	(decl_debug_args_lookup, decl_debug_args_insert): New functions.
      	* tree-into-ssa.c (mark_def_sites): Handle uses in debug stmts.
      	(rewrite_debug_stmt_uses): New function.
      	(rewrite_stmt): Use it to rewrite debug stmt uses.
      	* rtl.def (DEBUG_PARAMETER_REF): New.
      	* rtl.h (DEBUG_PARAMETER_REF_DECL): Define.
      	* cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Handle
      	DEBUG_PARAMETER_REF.
      	* rtl.c (rtx_equal_p_cb, rtx_equal_p, iterative_hash_rtx): Likewise.
      	* print-rtl.c (print_rtx): Likewise.
      	* tree-sra.c (sra_ipa_reset_debug_stmts): Prefer replacing of
      	SSA_NAMEs with DEBUG_EXPR_DECLs initialized in source bind
      	debug stmts in the first bb.
      	* tree-inline.c (remap_ssa_name): If remapping default def
      	of a PARM_DECL fails, map to a DEBUG_EXPR_DECL set in
      	a source bind debug stmt.
      	(remap_gimple_stmt): Handle gimple_debug_source_bind_p.
      	(maybe_move_debug_stmts_to_successors): Likewise.
      	(copy_debug_stmt): Likewise.  Avoid shadowing a variable.
      	(tree_function_versioning): If DECL_HAS_DEBUG_ARGS_P, copy
      	debug args vector from old_decl to new_decl.
      	* ipa-prop.c (ipa_modify_call_arguments): For optimized away
      	or modified parameters, add debug bind stmts before call
      	setting DEBUG_EXPR_DECL which is remembered in debug args
      	vector.
      	* cfgexpand.c (expand_call_stmt): Call expand_debug_expr
      	on DECL_DEBUG_EXPRs from debug args vector.
      	(expand_debug_source_expr): New function.
      	(expand_debug_locations): Use it for source bind insns.
      	(expand_gimple_basic_block): Handle gimple_debug_source_bind_p.
      	* var-tracking.c (prepare_call_arguments): Add debug args
      	to call_arguments if any.
      	* dwarf2out.c (dwarf_stack_op_name, size_of_loc_descr,
      	output_loc_operands, output_loc_operands_raw,
      	resolve_addr_in_expr, compare_loc_operands): Handle
      	DW_OP_GNU_parameter_ref.
      	(get_ref_die_offset, parameter_ref_descriptor): New functions.
      	(mem_loc_descriptor): Handle DEBUG_PARAMETER_REF.
      	(gen_subprogram_die): Handle parameters identified by
      	DEBUG_PARAMETER_REF.
      
      	* dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref.
      
      From-SVN: r175288
      Jakub Jelinek committed