1. 05 May, 2010 1 commit
    • re PR debug/43478 (Missing DW_AT_location for a variable) · e972a1d3
      	PR debug/43478
      	* df-problems.c (struct dead_debug_use, struct dead_debug): New.
      	(dead_debug_init, dead_debug_finish): New functions.
      	(dead_debug_add, dead_debug_insert_before): Likewise.
      	(df_note_bb_compute): Initialize a dead_debug object, add dead
      	debug uses to it, insert debug bind insns before death insns,
      	reset debug insns that refer to pending uses at the end.
      	* rtl.h (make_debug_expr_from_rtl): New prototype.
      	* varasm.c (make_debug_expr_from_rtl): New function.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r159063
      Alexandre Oliva committed
  2. 01 May, 2010 1 commit
    • rtl.h (CONST_DOUBLE_P): Define. · 3e93ff81
      	* rtl.h (CONST_DOUBLE_P): Define.
      	(rtx_to_double_int): Declare.
      	* emit-rtl.c (rtx_to_double_int): New function.
      	* dwarf2out.c (insert_double): New function.
      	(loc_descriptor, add_const_value_attribute): Clean up, use
      	rtx_to_double_int and insert_double functions.
      
      From-SVN: r158963
      Anatoly Sokolov committed
  3. 20 Apr, 2010 1 commit
    • double-int.h (double_int_setbit): Declare. · 54fb1ae0
      	* double-int.h (double_int_setbit): Declare.
      	* double-int.c (double_int_setbit): New function.
      	* rtl.h (immed_double_int_const): Declare.
      	* emit-rtl.c (immed_double_int_const): New function.
      	* builtins.c (expand_builtin_signbit): Clean up, use double_int_*
      	and immed_double_int_const functions.
      	* optabs.c (expand_absneg_bit, expand_copysign_absneg,
      	expand_copysign_bit):  (Ditto.).
      	* simplify-rtx.c (simplify_binary_operation_1): (Ditto.).
      	* tree-ssa-address.c (addr_for_mem_ref): (Ditto.).
      	* dojump.c (prefer_and_bit_test): (Ditto.).
      	* expr.c (convert_modes, reduce_to_bit_field_precision,
      	const_vector_from_tree): (Ditto.).
      	* expmed.c (mask_rtx, lshift_value): (Ditto.).
      
      From-SVN: r158566
      Anatoly Sokolov committed
  4. 16 Mar, 2010 1 commit
    • re PR debug/43051 (VTA causes a stack living parameter unavailable in most of the function) · 457eeaae
      	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
      Jakub Jelinek committed
  5. 19 Feb, 2010 1 commit
  6. 25 Nov, 2009 1 commit
    • Remove trailing white spaces. · b8698a0f
      2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* alias.c: Remove trailing white spaces.
      	* alloc-pool.c: Likewise.
      	* alloc-pool.h: Likewise.
      	* attribs.c: Likewise.
      	* auto-inc-dec.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* bt-load.c: Likewise.
      	* builtins.c: Likewise.
      	* builtins.def: Likewise.
      	* c-common.c: Likewise.
      	* c-common.h: Likewise.
      	* c-cppbuiltin.c: Likewise.
      	* c-decl.c: Likewise.
      	* c-format.c: Likewise.
      	* c-lex.c: Likewise.
      	* c-omp.c: Likewise.
      	* c-opts.c: Likewise.
      	* c-parser.c: Likewise.
      	* c-pretty-print.c: Likewise.
      	* c-tree.h: Likewise.
      	* c-typeck.c: Likewise.
      	* caller-save.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfglayout.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphbuild.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* cif-code.def: Likewise.
      	* collect2.c: Likewise.
      	* combine.c: Likewise.
      	* convert.c: Likewise.
      	* coverage.c: Likewise.
      	* crtstuff.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbgcnt.c: Likewise.
      	* dbgcnt.def: Likewise.
      	* dbgcnt.h: Likewise.
      	* dbxout.c: Likewise.
      	* dce.c: Likewise.
      	* ddg.c: Likewise.
      	* ddg.h: Likewise.
      	* defaults.h: Likewise.
      	* df-byte-scan.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* df.h: Likewise.
      	* dfp.c: Likewise.
      	* diagnostic.c: Likewise.
      	* diagnostic.h: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* double-int.c: Likewise.
      	* double-int.h: Likewise.
      	* dse.c: Likewise.
      	* dwarf2asm.c: Likewise.
      	* dwarf2asm.h: Likewise.
      	* dwarf2out.c: Likewise.
      	* ebitmap.c: Likewise.
      	* ebitmap.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* et-forest.c: Likewise.
      	* except.c: Likewise.
      	* except.h: Likewise.
      	* expmed.c: Likewise.
      	* expr.c: Likewise.
      	* expr.h: Likewise.
      	* final.c: Likewise.
      	* flags.h: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* fwprop.c: Likewise.
      	* gcc.c: Likewise.
      	* gcov-dump.c: Likewise.
      	* gcov-io.c: Likewise.
      	* gcov-io.h: Likewise.
      	* gcov.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* genattrtab.c: Likewise.
      	* genautomata.c: Likewise.
      	* genchecksum.c: Likewise.
      	* genconfig.c: Likewise.
      	* genflags.c: Likewise.
      	* gengtype-parse.c: Likewise.
      	* gengtype.c: Likewise.
      	* gengtype.h: Likewise.
      	* genmddeps.c: Likewise.
      	* genmodes.c: Likewise.
      	* genopinit.c: Likewise.
      	* genpreds.c: Likewise.
      	* gensupport.c: Likewise.
      	* ggc-common.c: Likewise.
      	* ggc-page.c: Likewise.
      	* ggc-zone.c: Likewise.
      	* ggc.h: Likewise.
      	* gimple-iterator.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-pretty-print.c: Likewise.
      	* gimple.c: Likewise.
      	* gimple.def: Likewise.
      	* gimple.h: Likewise.
      	* gimplify.c: Likewise.
      	* graphds.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* gthr-nks.h: Likewise.
      	* gthr-posix.c: Likewise.
      	* gthr-posix.h: Likewise.
      	* gthr-posix95.h: Likewise.
      	* gthr-single.h: Likewise.
      	* gthr-tpf.h: Likewise.
      	* gthr-vxworks.h: Likewise.
      	* gthr.h: Likewise.
      	* haifa-sched.c: Likewise.
      	* hard-reg-set.h: Likewise.
      	* hooks.c: Likewise.
      	* hooks.h: Likewise.
      	* hosthooks.h: Likewise.
      	* hwint.h: Likewise.
      	* ifcvt.c: Likewise.
      	* incpath.c: Likewise.
      	* init-regs.c: Likewise.
      	* integrate.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-struct-reorg.c: Likewise.
      	* ipa-struct-reorg.h: Likewise.
      	* ipa-type-escape.c: Likewise.
      	* ipa-type-escape.h: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa-utils.h: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-conflicts.c: Likewise.
      	* ira-costs.c: Likewise.
      	* ira-emit.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira-lives.c: Likewise.
      	* ira.c: Likewise.
      	* jump.c: Likewise.
      	* lambda-code.c: Likewise.
      	* lambda-mat.c: Likewise.
      	* lambda-trans.c: Likewise.
      	* lambda.h: Likewise.
      	* langhooks.c: Likewise.
      	* lcm.c: Likewise.
      	* libgcov.c: Likewise.
      	* lists.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* loop-init.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-iv.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-compress.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-section-in.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.c: Likewise.
      	* lto-streamer.h: Likewise.
      	* lto-symtab.c: Likewise.
      	* lto-wpa-fixup.c: Likewise.
      	* matrix-reorg.c: Likewise.
      	* mcf.c: Likewise.
      	* mode-switching.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omega.c: Likewise.
      	* omega.h: Likewise.
      	* omp-low.c: Likewise.
      	* optabs.c: Likewise.
      	* optabs.h: Likewise.
      	* opts-common.c: Likewise.
      	* opts.c: Likewise.
      	* params.def: Likewise.
      	* params.h: Likewise.
      	* passes.c: Likewise.
      	* plugin.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* predict.def: Likewise.
      	* pretty-print.c: Likewise.
      	* pretty-print.h: Likewise.
      	* print-rtl.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* read-rtl.c: Likewise.
      	* real.c: Likewise.
      	* recog.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regcprop.c: Likewise.
      	* reginfo.c: Likewise.
      	* regmove.c: Likewise.
      	* regrename.c: Likewise.
      	* regs.h: Likewise.
      	* regstat.c: Likewise.
      	* reload.c: Likewise.
      	* reload1.c: Likewise.
      	* resource.c: Likewise.
      	* rtl.c: Likewise.
      	* rtl.def: Likewise.
      	* rtl.h: Likewise.
      	* rtlanal.c: Likewise.
      	* sbitmap.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-int.h: Likewise.
      	* sched-rgn.c: Likewise.
      	* sched-vis.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-dump.h: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* sel-sched.h: Likewise.
      	* sese.c: Likewise.
      	* sese.h: Likewise.
      	* simplify-rtx.c: Likewise.
      	* stack-ptr-mod.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* stringpool.c: Likewise.
      	* stub-objc.c: Likewise.
      	* sync-builtins.def: Likewise.
      	* target-def.h: Likewise.
      	* target.h: Likewise.
      	* targhooks.c: Likewise.
      	* targhooks.h: Likewise.
      	* timevar.c: Likewise.
      	* tlink.c: Likewise.
      	* toplev.c: Likewise.
      	* toplev.h: Likewise.
      	* tracer.c: Likewise.
      	* tree-affine.c: Likewise.
      	* tree-affine.h: Likewise.
      	* tree-browser.def: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chrec.c: Likewise.
      	* tree-chrec.h: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-data-ref.h: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-dump.h: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-flow-inline.h: Likewise.
      	* tree-flow.h: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-loop-linear.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-nested.c: Likewise.
      	* tree-nomudflap.c: Likewise.
      	* tree-nrv.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-pass.h: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-copy.c: Likewise.
      	* tree-ssa-copyrename.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-dse.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-ifcombine.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: Likewise.
      	* tree-ssa-loop-ch.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop-unswitch.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-operands.h: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-sink.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-tailcall.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-generic.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vectorizer.c: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* tree.def: Likewise.
      	* tree.h: Likewise.
      	* treestruct.def: Likewise.
      	* unwind-compat.c: Likewise.
      	* unwind-dw2-fde-glibc.c: Likewise.
      	* unwind-dw2.c: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* vec.c: Likewise.
      	* vec.h: Likewise.
      	* vmsdbgout.c: Likewise.
      	* web.c: Likewise.
      	* xcoffout.c: Likewise.
      
      From-SVN: r154645
      H.J. Lu committed
  7. 24 Nov, 2009 1 commit
    • cfgrtl.c (commit_one_edge_insertion): Remove set but not used local variable bb_note. · 2d888286
      2009-11-24  David Binderman <dcb314@hotmail.com>
      
      	* cfgrtl.c (commit_one_edge_insertion): Remove set but not used
      	local variable bb_note.
              * dominance.c (get_dominated_by): Likewise local var n.
              (output_file_names): Likewise local var idx.
              (add_location_or_const_value_attribute): Likewise local var status.
              * dwarf2out.c (gen_variable_die): Likewise local var field.
              * emit-rtl.c (no_line_numbers): Remove.
      	(init_emit_once): Remove line_numbers parameter.
              * rtl.h (init_emit_once): Adjust prototype.
              * toplev.c (backend_init): Adjust init_emit_once call.
      
      From-SVN: r154496
      David Binderman committed
  8. 26 Oct, 2009 2 commits
    • tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document. · d4ebfa65
      2009-10-26  Ben Elliston  <bje@au.ibm.com>
      	    Michael Meissner  <meissner@linux.vnet.ibm.com>
      	    Ulrich Weigand  <uweigand@de.ibm.com>
      
      	* doc/tm.texi (TARGET_ADDR_SPACE_POINTER_MODE): Document.
      	(TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
      	(TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
      
      	* target.h (struct target_def): Add pointer_mode, address_mode,
      	and valid_pointer_mode to addr_space substructure.
      	* target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): Define.
      	(TARGET_ADDR_SPACE_ADDRESS_MODE): Likewise.
      	(TARGET_ADDR_SPACE_VALID_POINTER_MODE): Likewise.
      	(TARGET_ADDR_SPACE_HOOKS): Add them.
      	* targhooks.c (target_default_pointer_address_modes_p): New function.
      	* target.h (target_default_pointer_address_modes_p): Add prototype.
      	* targhooks.c (default_addr_space_pointer_mode): New function.
      	(default_addr_space_address_mode): Likewise.
      	(default_addr_space_valid_pointer_mode): Likewise.
      	* targhooks.h (default_addr_space_pointer_mode): Add prototype.
      	(default_addr_space_address_mode): Likewise.
      	(default_addr_space_valid_pointer_mode): Likewise.
      	* output.h (default_valid_pointer_mode): Move to ...
      	* targhooks.h (default_valid_pointer_mode): ... here.
      	* varasm.c (default_valid_pointer_mode): Move to ...
      	* targhooks.c (default_valid_pointer_mode): ... here.
      
      	* varasm.c (output_constant): Use targetm.addr_space.valid_pointer_mode
      	instead of targetm.valid_pointer_mode.
      
      	* fold-const.c (fit_double_type): Use int_or_pointer_precision.
      	* tree.c (integer_pow2p): Likewise.
      	(tree_log2): Likewise.
      	(tree_floor_log2): Likewise.
      	(signed_or_unsigned_type_for): Support pointer type of different size.
      	(int_or_pointer_precision): New function.
      	* tree.h (int_or_pointer_precision): Add prototype.
      	* stor-layout.c (layout_type): Set TYPE_PRECISION for offset types.
      	* varasm.c (initializer_constant_valid_p): Use TYPE_PRECISION of
      	incoming pointer type instead of POINTER_SIZE.
      
      	* tree.c (build_pointer_type): Use appropriate pointer mode
      	instead of ptr_mode.
      	(build_reference_type): Likewise.
      	* expr.c (store_expr): Likewise.
      	(expand_expr_addr_expr): Likewise.
      	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	
      	* auto-inc-dec.c: Include "target.h".
      	(try_merge): Use appropriate address mode instead of Pmode.
      	(find_inc): Likewise.
      	* combine.c (find_split_point): Likewise.
      	* cselib.c (cselib_record_sets): Likewise.
      	* dse.c (replace_inc_dec): Likewise.
      	(canon_address): Likewise.
      	* var-tracking.c (replace_expr_with_values): Likewise.
      	(count_uses): Likewise.
      	(add_uses): Likewise.
      	(add_stores): Likewise.
      	* emit-rtl.c: Include "target.h".
      	(adjust_address_1): Use appropriate address mode instead of Pmode.
      	(offset_address): Likewise.
      	* explow.c (break_out_memory_refs): Likewise.
      	(memory_address_addr_space): Likewise.
      	(promote_mode): Likewise.
      	* expr.c (move_by_pieces): Likewise.
      	(emit_block_move_via_loop): Likewise.
      	(store_by_pieces): Likewise.
      	(store_by_pieces_1): Likewise.
      	(expand_assignment): Likewise.
      	(store_constructor): Likewise.
      	(expand_expr_addr_expr): Likewise.
      	(expand_expr_real_1): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* ifcvt.c (noce_try_cmove_arith): Likewise.
      	* regcprop.c (kill_autoinc_value): Likewise.
      	* regmove.c (try_auto_increment): Likewise.
      	* reload.c (find_reloads): Likewise.
      	(find_reloads_address): Likewise.
      	(find_reloads_address_1): Likewise.
      	* sched-deps.c: Include "target.h".
      	(sched_analyze_1): Use appropriate address mode instead of Pmode.
      	(sched_analyze_2): Likewise.
      	* sel-sched-dump.c: Include "target.h".
      	(debug_mem_addr_value): Use appropriate address mode instead of Pmode.
      	* stor-layout.c (layout_type): Likewise.
      	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
      	(multiplier_allowed_in_address_p): Likewise.
      	(get_address_cost): Likewise.
      	* varasm.c (make_decl_rtl): Likewise.
      	
      	* expr.c (expand_assignment): Always convert offsets to appropriate
      	address mode.
      	(store_expr): Likewise.
      	(store_constructor): Likewise.
      	(expand_expr_real_1): Likewise.
      
      	* reload.h (form_sum): Add MODE argument.
      	* reload.c (form_sum): Add MODE argument, use it instead of Pmode.
      	Update recursive calls.
      	(subst_indexed_address): Update calls to form_sum.
      	
      	* tree-flow.h (addr_for_mem_ref): Add ADDRSPACE argument.
      	* tree-ssa-address.c: Include "target.h".
      	(templates): Replace by ...
      	(mem_addr_template_list): ... this new vector.
      	(TEMPL_IDX): Handle address space numbers.
      	(gen_addr_rtx): Add address mode argument, use it instead of Pmode.
      	(addr_for_mem_ref): Add ADDRSPACE argument.  Use per-address-space
      	instead of global cache.  Update call to gen_addr_rtx.
      	(valid_mem_ref_p): Update call to addr_for_mem_ref.
      	* expr.c (expand_expr_real_1): Update call to addr_for_mem_ref.
      	
      	* rtl.h (convert_memory_address_addr_space): Add prototype.
      	(convert_memory_address): Define as macro.
      	* explow.c (convert_memory_address): Rename to ...
      	(convert_memory_address_addr_space): ... this.  Add ADDRSPACE argument.
      	Use appropriate pointer and address modes instead of ptr_mode / Pmode.
      	Update recursive calls.
      	(memory_address_addr_space): Call convert_memory_address_addr_space.
      	* expmed.c (make_tree): Likewise.
      	* expr.c (expand_assignment): Likewise.
      	(expand_expr_addr_expr_1): Likewise.  Also, add ADDRSPACE argument.
      	(expand_expr_addr_expr): Likewise.  Also, update call.
      
      	* alias.c (find_base_value): Guard pointer size optimizations.
      	(find_base_term): Likewise.
      	* rtlanal.c (nonzero_bits1): Likewise.
      	(num_sign_bit_copies1): Likewise.
      	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
      
      	* Makefile.in (tree-ssa-address.o): Add $(TARGET_H) dependency.
      	(emit-rtl.o): Likewise.
      	(auto-inc-dec.o): Likewise.
      	(sched-deps.o): Likewise.
      
      Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
      Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
      
      From-SVN: r153573
      Ben Elliston committed
    • extend.texi (Named Address Spaces): New section. · 09e881c9
      2009-10-26  Ben Elliston  <bje@au.ibm.com>
      	    Michael Meissner  <meissner@linux.vnet.ibm.com>
      	    Ulrich Weigand  <uweigand@de.ibm.com>
      
      	* doc/extend.texi (Named Address Spaces): New section.
      	* coretypes.h (addr_space_t): New type.
      	(ADDR_SPACE_GENERIC): New define.
      	(ADDR_SPACE_GENERIC_P): New macro.
      
      	* doc/tm.texi (Named Address Spaces): New section.
      	(TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Document.
      	(TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Document.
      	(TARGET_ADDR_SPACE_SUBSET_P): Document.
      	(TARGET_ADDR_SPACE_CONVERT): Document.
      	* target.h (struct gcc_target): Add addr_space substructure.
      	* target-def.h (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): Define.
      	(TARGET_ADDR_SPACE_LEGITIMIZE_ADDRESS): Likewise.
      	(TARGET_ADDR_SPACE_SUBSET_P): Likewise.
      	(TARGET_ADDR_SPACE_CONVERT): Likewise.
      	(TARGET_ADDR_SPACE_HOOKS): Likewise.
      	(TARGET_INITIALIZER): Initialize addr_space hooks.
      	* targhooks.c (default_addr_space_legitimate_address_p): New function.
      	(default_addr_space_legitimize_address): Likewise.
      	(default_addr_space_subset_p): Likewise.
      	(default_addr_space_convert): Likewise.
      	* targhooks.h (default_addr_space_legitimate_address_p): Add prototype.
      	(default_addr_space_legitimize_address): Likewise.
      	(default_addr_space_subset_p): Likewise.
      	(default_addr_space_convert): Likewise.
      
      	* doc/rtl.texi (MEM_ADDR_SPACE): Document.
      	* rtl.h (mem_attrs): Add ADDRSPACE memory attribute.
      	(MEM_ADDR_SPACE): New macro.
      	* emit-rtl.c (get_mem_attrs): Add ADDRSPACE argument and set
      	address space memory attribute.
      	(mem_attrs_htab_hash): Handle address space memory attribute.
      	(mem_attrs_htab_eq): Likewise.
      	(set_mem_attributes_minus_bitpos): Likewise.
      	(set_mem_alias_set): Likewise.
      	(set_mem_align): Likewise.
      	(set_mem_expr): Likewise.
      	(set_mem_offset): Likewise.
      	(set_mem_size): Likewise.
      	(adjust_address_1): Likewise.
      	(offset_address): Likewise.
      	(widen_memoy_address): Likewise.
      	(get_spill_slot_decl): Likewise.
      	(set_mem_attrs_for_spill): Likewise.
      	(set_mem_addr_space): New function.
      	* emit-rtl.h (set_mem_addr_space): Add prototype.
      	* print-rtl.c (print_rtx): Print address space memory attribute.
      	* expr.c (expand_assignment): Set address space memory attribute
      	of generated MEM RTXes as appropriate.
      	(expand_expr_real_1): Likewise.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* tree-ssa-loop-ivopts.c (produce_memory_decl_rtl): Likewise.
      
      	* tree.h (struct tree_base): Add address_space bitfield.  Reduce
      	size of "spare" bitfield.
      	(TYPE_ADDR_SPACE): New macro.
      	(ENCODE_QUAL_ADDR_SPACE): Likewise.
      	(DECODE_QUAL_ADDR_SPACE): Likewise.
      	(CLEAR_QUAL_ADDR_SPACE): Likewise.
      	(KEEP_QUAL_ADDR_SPACE): Likewise.
      	(TYPE_QUALS): Encode type address space.
      	(TYPE_QUALS_NO_ADDR_SPACE): New macro.
      	* tree.c (set_type_quals): Set type address space.
      	(build_array_type): Inherit array address space from element type.
      	* print-tree.c (print_node_brief): Print type address space.
      	(print_node): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      
      	* explow.c (memory_address): Rename to ...
      	(memory_address_addr_space): ... this.  Add ADDRSPACE argument.
      	Use address-space aware variants of memory address routines.
      	* recog.c (memory_address_p): Rename to ...
      	(memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
      	Use address-space aware variants of memory address routines.
      	(offsettable_address_p): Rename to ...
      	(offsettable_address_addr_space_p): ... this.  Add ADDRSPACE argument.
      	Use address-space aware variants of memory address routines.
      	* reload.c (strict_memory_address_p): Rename to ...
      	(strict_memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
      	Use address-space aware variants of memory address routines.
      	(maybe_memory_address_p): Rename to ...
      	(maybe_memory_address_addr_space_p): ... this.  Add ADDSPACE argument.
      	Use address-space aware variants of memory address routines.
      	* expr.h (memory_address_addr_space): Add prototype.
      	(memory_address): Define as macro.
      	* recog.h (memory_address_addr_space_p): Add prototype.
      	(memory_address_p): Define as macro.
      	(offsettable_address_addr_space_p): Add prototype.
      	(offsettable_address_p): Define as macro.
      	(strict_memory_address_addr_space_p): Add prototype.
      	(strict_memory_address_p): Define as macro.
      
      	* combine.c (find_split_point): Use address-space aware variants
      	of memory address routines.
      	* emit-rtl.c (operand_subword): Likewise.
      	(change_address_1): Likewise.
      	(adjust_address_1): Likewise.
      	(offset_address): Likewise.
      	* expr.c (emit_move_insn): Likewise.
      	(expand_assignment): Likewise.
      	(expand_expr_real_1): Likewise.
      	* recog.c (verify_changes): Likewise.
      	(general_operand): Likewise.
      	(offsettable_memref_p): Likewise.
      	(offsettable_nonstrict_memref_p): Likewise.
      	(constrain_operands): Likewise.
      	* reload.c (get_secondary_mem): Likewise.
      	(find_reloads_toplev): Likewise.
      	(find_reloads_address): Likewise.
      	(find_reloads_subreg_address): Likewise.
      	* reload1.c (reload): Likewise.
      	* rtlhooks.c (gen_lowpart_if_possible): Likewise.
      	* rtl.h (address_cost): Add ADDRSPACE argument.
      	* rtlanal.c (address_cost): Add ADDRSPACE argument.  Use address-space
      	aware variant of memory address routines.
      	* loop-invariant.c (create_new_invariant): Update address_cost call.
      	* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
      	* fwprop.c (should_replace_address): Add ADDRSPACE argument.
      	Use address-space aware variant of memory address routines.
      	(propagate_rtx_1): Update call to should_replace_address.
      	* tree-flow.h (multiplier_allowed_in_address_p): Add ADDRSPACE
      	argument.
      	* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Add
      	ADDRSPACE argument.  Use per-address-space instead of global cache.
      	Use address-space aware variant of memory address routines.
      	(get_address_cost): Likewise.
      	(get_computation_cost_at): Update calls.
      	* tree-ssa-address.c (valid_mem_ref_p): Add ADDRSPACE argument.
      	Use address-space aware variant of memory address routines.
      	(create_mem_ref_raw): Update call to valid_mem_ref_p.
      	(most_expensive_mult_to_index): Update call to
      	multiplier_allowed_in_address_p.
      
      	* dwarf2out.c (modified_type_die): Output DW_AT_address_class
      	attribute to indicate named address spaces.
      
      	* varasm.c (get_variable_section): DECLs in named address spaces
      	cannot be "common".
      
      	* reload.c (find_reloads_address): Do not use LEGITIMIZE_RELOAD_ADDRESS
      	for addresses in a non-generic address space.
      
      	* expr.c (emit_block_move_hints): Do not use libcalls for
      	memory in non-generic address spaces.
      	(clear_storage_hints): Likewise.
      	(expand_assignment): Likewise.
      
      	* fold-const.c (operand_equal_p): Expressions refering to different
      	address spaces are not equivalent.
      
      	* rtl.c (rtx_equal_p_cb): MEMs refering to different address
      	spaces are not equivalent.
      	(rtx_equal_p): Likewise.
      	* cse.c (exp_equiv_p): Likewise.
      	* jump.c (rtx_renumbered_equal_p): Likewise.
      	* reload.c (operands_match_p): Likewise.
      
      	* alias.c (nonoverlapping_memrefs_p): MEMs refering to different
      	address spaces may alias.
      	(true_dependence): Likewise.
      	(canon_true_dependence): Likewise.
      	(write_dependence_p): Likewise.
      
      	* dse.c (canon_address): Handle named address spaces.
      	* ifcvt.c (noce_try_cmove_arith): Likewise.
      
      	* tree.def (ADDR_SPACE_CONVERT_EXPR): New tree code.
      	* expr.c (expand_expr_real_2): Expand ADDR_SPACE_CONVERT_EXPR.
      	* convert.c (convert_to_pointer): Generate ADDR_SPACE_CONVERT_EXPR
      	to handle conversions between different address spaces.
      	* fold-const.c (fold_convert_loc): Likewise.
      	(fold_unary_loc): Handle ADDR_SPACE_CONVERT_EXPR.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* gimple-pretty-print.c (dump_unary_rhs): Likewise.
      	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* tree-ssa.c (useless_type_conversion_p): Conversions between pointers
      	to different address spaces are not useless.
      
      Co-Authored-By: Michael Meissner <meissner@linux.vnet.ibm.com>
      Co-Authored-By: Ulrich Weigand <uweigand@de.ibm.com>
      
      From-SVN: r153572
      Ben Elliston committed
  9. 22 Oct, 2009 1 commit
  10. 20 Oct, 2009 1 commit
    • rtl.h (simplify_replace_fn_rtx): Declare. · 3af4ba41
      gcc/
      	* rtl.h (simplify_replace_fn_rtx): Declare.
      	(wrap_constant, unwrap_constant): Delete.
      	* cfgexpand.c (unwrap_constant, wrap_constant): Delete.
      	(expand_debug_expr): Don't call wrap_constant.
      	* combine.c (rtx_subst_pair): Only define for AUTO_INC_DEC.
      	(auto_adjust_pair): Fold into...
      	(propagate_for_debug_subst): ...here.  Only define for AUTO_INC_DEC.
      	Just return a new value.
      	(propagate_for_debug): Use simplify_replace_fn_rtx for AUTO_INC_DEC,
      	otherwise use simplify_replace_rtx.
      	* cselib.c (wrap_constant): Reinstate old definition.
      	(cselib_expand_value_rtx_1): Don't wrap constants.
      	* gcse.c (try_replace_reg): Don't use copy_rtx in the call to
      	simplify_replace_rtx.
      	(bypass_block): Fix formatting in calls to simplify_replace_rtx.
      	* reload1.c (reload): Skip all uses for an insn before adjusting it.
      	Use simplify_replace_rtx.
      	* simplify-rtx.c (simplify_replace_fn_rtx): New function,
      	adapted from...
      	(simplify_replace_rtx): ...here.  Turn into a wrapper for
      	simplify_replace_fn_rtx.
      	(simplify_unary_operation): Don't unwrap CONSTs.
      	* var-tracking.c (check_wrap_constant): Delete.
      	(vt_expand_loc_callback): Don't call it.
      	(vt_expand_loc): Likewise.
      
      From-SVN: r153037
      Richard Sandiford committed
  11. 17 Oct, 2009 1 commit
  12. 14 Oct, 2009 1 commit
    • params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. · 1833192f
      2009-09-26  Vladimir Makarov  <vmakarov@redhat.com>
      
      	* params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
      	* params.h (IRA_LOOP_RESERVED_REGS): New
      	* tree-pass.h (pass_subregs_of_mode_init,
      	pass_subregs_of_mode_finish): Remove.
      	* passes.c (pass_subregs_of_mode_init,
      	pass_subregs_of_mode_finish): Remove.
      	(pass_reginfo_init): Move before loop optimizations.
      	* config/i386/i386.h (STACK_REG_COVER_CLASS): Define.
      	* common.opt (fira-loop-pressure): New.
      	* toplev.h (flag_ira_loop_pressure): New.
      	* rtl.h (init_subregs_of_mode, finish_subregs_of_mode): New
      	externals.
      	* reginfo.c (init_subregs_of_mode, finish_subregs_of_mode):
      	Make external and void type functions.
      	(gate_subregs_of_mode_init, pass_subregs_of_mode_init,
      	pass_subregs_of_mode_finish): Remove.
      	* ira-costs.c (init_costs): Call init_subregs_of_mode.
      	* regmove.c: Include ira.h.
      	(regmove_optimize): Call ira_set_pseudo_classes after IRA based
      	register pressure calculation in loops.
      	* loop-invariant.c: Include REGS_H and ira.h.
      	(struct loop_data): New members max_reg_pressure, regs_ref, and
      	regs_live.
      	(struct invariant): New member orig_regno.
      	(curr_loop): New variable.
      	(find_exits): Initialize regs_ref and regs_live.
      	(create_new_invariant): Initialize orig_regno.
      	(get_cover_class_and_nregs): New.
      	(get_inv_cost): Make aregs_needed an array.  Use regs_needed as an
      	array.  Add code for flag_ira_loop_pressure.
      	(gain_for_invariant): Make new_regs an array.  Add code for
      	flag_ira_loop_pressure.
      	(best_gain_for_invariant): Ditto.
      	(set_move_mark): New parameter gain.  Use it for debugging output.
      	(find_invariants_to_move): Make regs_needed and new_regs an array.
      	Add code for flag_ira_loop_pressure.
      	(move_invariant_reg): Set up orig_regno.
      	(move_invariants): Set up reg classes for pseudos for
      	flag_ira_loop_pressure.
      	(free_loop_data): Clear regs_ref and regs_live.
      	(curr_regs_live, curr_reg_pressure, regs_set, n_regs_set,
      	get_regno_cover_class, change_pressure, mark_regno_live,
      	mark_regno_death, mark_reg_store, mark_reg_clobber,
      	mark_reg_death, mark_ref_regs, calculate_loop_reg_pressure): New.
      	(move_loop_invariants): Calculate pressure.  Initialize curr_loop.
      	* ira.c (ira): Call ira_set_pseudo_classes after IRA based
      	register pressure calculation in loops if new regs were added.
      	Call finish_subregs_of_mode.
      	* opts.c (decode_options): Set up flag_ira_loop_pressure.
      	* Makefile.in (loop-invariant.o): Add ira.h.
      	(regmove.o): Ditto.
      	* doc/invoke.texi (-fira-loop-pressure, ira-loop-reserved-regs):
      	Describe.
      	* doc/tm.texi (STACK_REG_COVER_CLASS): Describe.
      
      From-SVN: r152770
      Vladimir Makarov committed
  13. 13 Oct, 2009 1 commit
  14. 05 Oct, 2009 1 commit
  15. 22 Sep, 2009 1 commit
    • re PR target/41246 (should "sorry" when regparm=3 and nested functions are encountered) · 531ca746
      	PR target/41246
      	* target.h (struct gcc_target): Add asm_out.trampoline_template,
      	calls.static_chain, calls.trampoline_init,
      	calls.trampoline_adjust_address.
      	* target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
      	(TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
      	(TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
      	* builtins.c (expand_builtin_setjmp_receiver): Use
      	targetm.calls.static_chain; only clobber registers.
      	(expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
      	set up memory attributes properly for the trampoline block.
      	(expand_builtin_adjust_trampoline): Use
      	targetm.calls.trampoline_adjust_address.
      	* calls.c (prepare_call_address): Add fndecl argument.  Use
      	targetm.calls.static_chain.
      	* df-scan.c (df_need_static_chain_reg): Remove.
      	(df_get_entry_block_def_set): Use targetm.calls.static_chain;
      	consolodate static chain handling.
      	* doc/tm.texi: Document new hooks.
      	* emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
      	(init_emit_regs): Don't initialize them.
      	* expr.h (prepare_call_address): Update decl.
      	* final.c (profile_function): Use targetm.calls.static_chain.
      	* function.c (expand_function_start): Likewise.
      	* rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
      	* stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
      	only clobber registers.
      	* targhooks.c (default_static_chain): New.
      	(default_asm_trampoline_template, default_trampoline_init): New.
      	(default_trampoline_adjust_address): New.
      	* targhooks.h: Declare them.
      	* varasm.c (assemble_trampoline_template): Use
      	targetm.asm_out.trampoline_template.  Make the memory block const
      	and set its size.
      
      From-SVN: r151983
      Richard Henderson committed
  16. 14 Sep, 2009 2 commits
    • builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec. · 1c384bf1
      	* builtins.c (expand_builtin_synchronize): Use gimple_build_asm_vec.
      	* cfgbuild.c (make_edges): Handle asm goto.
      	* cfglayout.c (fixup_reorder_chain): Likewise.
      	* cfgrtl.c (patch_jump_insn): Likewise.
      	* gimple-pretty-print.c (dump_gimple_asm): Likewise.
      	* gimple.c (gimple_build_asm_1): Add and use nlabels parameter.
      	(gimple_build_asm_vec): Add and use labels parameter.
      	(gimple_build_asm): Remove.
      	(walk_gimple_asm): Walk labels too.
      	* gimple.def (GIMPLE_ASM): Update docs.
      	* gimple.h: Update decls.
      	(struct gimple_statement_asm): Change nc to use unsigned char;
      	add nl member.
      	(gimple_asm_nlabels): New.
      	(gimple_asm_label_op, gimple_asm_set_label_op): New.
      	* gimplify.c (gimplify_asm_expr): Copy labels from ASM_EXPR
      	into gimple_build_asm_vec.
      	* jump.c (mark_jump_label_asm): New.
      	(mark_jump_label): Use it.
      	(redirect_jump_1): Handle asm goto.
      	(invert_jump_1): Soft fail if X is null.
      	* recog.c (extract_asm_operands): New.
      	(asm_noperands): Use it; handle asm labels.
      	(decode_asm_operands): Use extract_asm_operands.
      	(asm_operand_ok): Properly handle empty string.
      	* reg-stack.c (get_asm_operands_in_out): Rename from
      	get_asm_operand_n_inputs; use extract_asm_operands; return both
      	inputs and outputs by reference; update all callers.
      	* rtl.def (ASM_OPERANDS): Add label vector as operand 6.
      	* rtl.h (ASM_OPERANDS_LABEL_VEC): New.
      	(ASM_OPERANDS_LABEL_LENGTH, ASM_OPERANDS_LABEL): New.
      	(ASM_OPERANDS_SOURCE_LOCATION): Renumber.
      	(extract_asm_operands): Declare.
      	* stmt.c (expand_asm_operands): Add and use labels parameter.
      	(check_unique_operand_names): Likewise.
      	(resolve_asm_operand_names, resolve_operand_name_1): Likewise.
      	(expand_asm_stmt): Handle asm labels.
      	* tree-cfg.c (make_gimple_asm_edges): New.
      	(make_edges): Use it.
      	(cleanup_dead_labels): Handle asm labels.
      	(is_ctrl_altering_stmt): Likewise.
      	(gimple_redirect_edge_and_branch): Likewise.
      	* tree.def (ASM_EXPR): Add 5th operand.
      	* tree.h (ASM_LABELS): New.
      	(resolve_asm_operand_names): Update decl.
      
      	* c-parser.c (c_parser_asm_statement): Parse asm goto.
      	(c_parser_asm_goto_operands): New.
      	* c-tree.h (build_asm_expr): Update decl.
      	* c-typeck.c (build_asm_expr): Add and use labels parameter.
      	* doc/extend.texi: Document asm goto.
      
      gcc/ada/
      	* gcc-interface/trans.c (Pragma_to_gnu): Use build5 for ASM_EXPR.
      
      gcc/cp/
      	* cp-tree.h (finish_asm_stmt): Update decl.
      	* parser.c (cp_parser_asm_definition): Parse asm goto.
      	(cp_parser_asm_label_list): New.
      	* pt.c (tsubst_copy_asm_operands): Don't recurse on labels.
      	(tsubst_expr): Handle asm labels.
      	* semantics.c (finish_asm_stmt): Add and use labels parameter.
      
      gcc/testsuite/
      	* c-c++-common/asmgoto-1.c, c-c++-common/asmgoto-2.c,
      	c-c++-common/asmgoto-3.c, gcc.c-torture/compile/asmgoto-1.c,
      	gcc.dg/tree-ssa/asmgoto-1.c: New files.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r151701
      Richard Henderson committed
    • Squash commit of EH in gimple · 1d65f45c
      From-SVN: r151696
      Richard Henderson committed
  17. 09 Sep, 2009 1 commit
  18. 07 Sep, 2009 1 commit
    • rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro. · 3fce100b
      2009-09-07  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
      
      	* rtl.h (PREFETCH_SCHEDULE_BARRIER_P): New macro.	
      	* sched-deps.c (sched_analyze_2): Make prefetches a hard barrier
      	when volatile flag is set.
      	* doc/rtl.texi (PREFETCH_SCHEDULE_BARRIER_P): Add documentation pieces.
      
      From-SVN: r151475
      Andreas Krebbel committed
  19. 03 Sep, 2009 1 commit
    • cfgbuild.c (find_bb_boundaries): Split blocks containing a barrier. · 896aa4ea
      2009-09-02  David Daney  <ddaney@caviumnetworks.com>
      
      	* cfgbuild.c (find_bb_boundaries): Split blocks containing a
      	barrier.
      	* emit-rtl.c (prev_nonnote_insn_bb): New function.
      	* rtl.h (prev_nonnote_insn_bb): Declare it.
      
      2009-09-02  David Daney  <ddaney@caviumnetworks.com>
      
      	* gcc.c-torture/compile/builtin_unreachable-1.c: New testcase.
      
      From-SVN: r151361
      David Daney committed
  20. 02 Sep, 2009 2 commits
    • invoke.texi (-fsched-pressure): Document it. · ce18efcb
      2009-09-02  Vladimir Makarov  <vmakarov@redhat.com>
      
      	* doc/invoke.texi (-fsched-pressure): Document it.
      	(-fsched-reg-pressure-heuristic): Remove it.
      	
      	* reload.c (ira.h): Include.
      	(find_reloads): Add choosing reload on number of small spilled
      	classes.
      	
      	* haifa-sched.c (ira.h): Include.
      	(sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
      	saved_reg_pressure, curr_reg_live, saved_reg_live,
      	region_ref_regs): New variables.
      	(sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
      	initiate_reg_pressure_info, setup_ref_regs,
      	initiate_bb_reg_pressure_info, save_reg_pressure,
      	restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
      	functions.
      	(setup_insn_reg_pressure_info): New function.
      	(rank_for_schedule): Add pressure checking and insn issue time.
      	Remove comparison of insn reg weights.
      	(ready_sort): Set insn reg pressure info.
      	(update_register_pressure, setup_insn_max_reg_pressure,
      	update_reg_and_insn_max_reg_pressure,
      	sched_setup_bb_reg_pressure_info): New functions.
      	(schedule_insn): Add code for printing and updating reg pressure
      	info.
      	(find_set_reg_weight, find_insn_reg_weight): Remove.
      	(ok_for_early_queue_removal): Do nothing if pressure_only_p.
      	(debug_ready_list): Print reg pressure info.
      	(schedule_block): Ditto.  Check insn issue time.
      	(sched_init): Set up sched_pressure_p.  Allocate and set up some
      	reg pressure related info.
      	(sched_finish): Free some reg pressure related info.
      	(fix_tick_ready): Make insn always ready if pressure_p.
      	(init_h_i_d): Don't call find_insn_reg_weight.
      	(haifa_finish_h_i_d): Free insn reg pressure info.
      	
      	* ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
      	ira_memory_move_cost, ira_class_hard_regs,
      	ira_class_hard_regs_num, ira_no_alloc_regs,
      	ira_available_class_regs, ira_reg_class_cover_size,
      	ira_reg_class_cover, ira_class_translate): Move to ira.h.
      
      	* ira-lives.c (single_reg_class): Check mode to find how many
      	registers are necessary for operand.
      	(ira_implicitly_set_insn_hard_regs): New.
      
      	* common.opt (fsched-pressure): New options.
      	(fsched-reg-pressure-heuristic): Remove.
      
      	* ira.c (setup_eliminable_regset): Rename to
      	ira_setup_eliminable_regset.  Make it external.
      	(expand_reg_info): Pass cover class to setup_reg_classes.
      	(ira): Call resize_reg_info instead of allocate_reg_info.
      
      	* sched-deps.c: Include ira.h.
      	(implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
      	(create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
      	reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
      	mark_insn_hard_regno_birth, mark_insn_reg_birth,
      	mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
      	mark_insn_reg_store, mark_insn_reg_clobber,
      	setup_insn_reg_pressure_info): New.
      	(sched_analyze_1): Update implicit_reg_pending_uses.
      	(sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
      	Use them to create dependencies.  Set insn reg uses and pressure
      	info.  Process reg_pending_uses in one place.
      	(free_deps): Free implicit sets.
      	(remove_from_deps): Remove implicit sets if necessary.  Check
      	implicit sets when clearing reg_last_in_use.
      	(init_deps_global): Clear implicit_reg_pending_clobbers and
      	implicit_reg_pending_uses.
      	
      	* ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
      	ira_memory_move_cost, ira_class_hard_regs,
      	ira_class_hard_regs_num, ira_no_alloc_regs,
      	ira_available_class_regs, ira_reg_class_cover_size,
      	ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
      	(ira_setup_eliminable_regset, ira_set_pseudo_classes,
      	ira_implicitly_set_insn_hard_regs): New prototypes.
      	
      	* ira-costs.c (pseudo_classes_defined_p, allocno_p,
      	cost_elements_num): New variables.
      	(allocno_costs, total_costs): Rename to costs and
      	total_allocno_costs.
      	(COSTS_OF_ALLOCNO): Rename to COSTS.
      	(allocno_pref): Rename to pref.
      	(allocno_pref_buffer): Rename to pref_buffer.
      	(common_classes): Rename to regno_cover_class.
      	(COST_INDEX): New.
      	(record_reg_classes): Set allocno attributes only if allocno_p.
      	(record_address_regs): Ditto.  Use COST_INDEX instead of
      	ALLOCNO_NUM.
      	(scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
      	and COSTS_OF_ALLOCNO.
      	(print_costs): Rename to print_allocno_costs.
      	(print_pseudo_costs): New.
      	(process_bb_node_for_costs): Split into 2 functions with new
      	function process_bb_for_costs.  Pass BB to process_bb_for_costs.
      	(find_allocno_class_costs): Rename to find_costs_and_classes.  Add
      	new parameter dump_file.  Use cost_elements_num instead of
      	ira_allocnos_num.  Make one iteration if preferred classes were
      	already calculated for scheduler.  Make 2 versions of code
      	depending on allocno_p.
      	(setup_allocno_cover_class_and_costs): Check allocno_p.  Use
      	regno_cover_class and COSTS instead of common_classes and
      	COSTS_OF_ALLOCNO.
      	(init_costs, finish_costs): New.
      	(ira_costs): Set up allocno_p and cost_elements_num.  Call
      	init_costs and finish_costs.
      	(ira_set_pseudo_classes): New.
      
      	* rtl.h (allocate_reg_info): Remove.
      	(resize_reg_info): Change return type.
      	(reg_cover_class): New.
      	(setup_reg_classes): Add new parameter.
      	
      	* sched-int.h (struct deps_reg): New member implicit_sets.
      	(sched_pressure_p, sched_regno_cover_class): New external
      	definitions.
      	(INCREASE_BITS): New macro.
      	(struct reg_pressure_data, struct reg_use_data): New.
      	(struct _haifa_insn_data): Remove reg_weight.  Add members
      	reg_pressure, reg_use_list, reg_set_list, and
      	reg_pressure_excess_cost_change.
      	(struct deps): New member implicit_sets.
      	(pressure_p): New variable.
      	(COVER_CLASS_BITS, INCREASE_BITS): New macros.
      	(struct reg_pressure_data, struct reg_use_data): New.
      	(INSN_REG_WEIGHT): Remove.
      	(INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
      	INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New
      	macros.
      	(sched_init_region_reg_pressure_info,
      	sched_setup_bb_reg_pressure_info): New prototypes.
      	
              * reginfo.c (struct reg_pref): New member coverclass.
      	(reg_cover_class): New function.
      	(reginfo_init, pass_reginfo_init): Move after free_reg_info.
      	(reg_info_size): New variable.
      	(allocate_reg_info): Make static.  Setup reg_info_size.
      	(resize_reg_info): Use reg_info_size.  Return flag of resizing.
      	(setup_reg_classes): Add a new parameter.  Setup cover class too.
      
      	* Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the
      	dependencies.
      
      	* sched-rgn.c (deps_join): Set up implicit_sets.
      	(schedule_region): Set up region and basic blocks pressure
      	relative info.
      	
      	* passes.c (init_optimization_passes): Move
      	pass_subregs_of_mode_init before pass_sched.
      
      From-SVN: r151348
      Vladimir Makarov committed
    • invoke.texi (-fvar-tracking-assignments): New. · b5b8b0ac
      gcc/ChangeLog:
      * doc/invoke.texi (-fvar-tracking-assignments): New.
      (-fvar-tracking-assignments-toggle): New.
      (-fdump-final-insns=file): Mark filename as optional.
      (--param min-nondebug-insn-uid): New.
      (-gdwarf-@{version}): Mention version 4.
      * opts.c (common_handle_option): Accept it.
      * tree-vrp.c (find_assert_locations_1): Skip debug stmts.
      * regrename.c (regrename_optimize): Drop last.  Don't count debug
      insns as uses.  Don't reject change because of debug insn.
      (do_replace): Reject DEBUG_INSN as chain starter.  Take base_regno
      from the chain starter, and check for inexact matches in
      DEBUG_INSNS.
      (scan_rtx_reg): Accept inexact matches in DEBUG_INSNs.
      (build_def_use): Simplify and fix the marking of DEBUG_INSNs.
      * sched-ebb.c (schedule_ebbs): Skip boundary debug insns.
      * fwprop.c (forward_propagate_and_simplify): ...into debug insns.
      * doc/gimple.texi (is_gimple_debug): New.
      (gimple_debug_bind_p): New.
      (is_gimple_call, gimple_assign_cast_p): End sentence with period.
      * doc/install.texi (bootstrap-debug): More details.
      (bootstrap-debug-big, bootstrap-debug-lean): Document.
      (bootstrap-debug-lib): More details.
      (bootstrap-debug-ckovw): Update.
      (bootstrap-time): New.
      * tree-into-ssa.c (mark_def_sites): Skip debug stmts.
      (insert_phi_nodes_for): Insert debug stmts.
      (rewrite_stmt): Take iterator.  Insert debug stmts.
      (rewrite_enter_block): Adjust.
      (maybe_replace_use_in_debug_stmt): New.
      (rewrite_update_stmt): Use it.
      (mark_use_interesting): Return early for debug stmts.
      * tree-ssa-loop-im.c (rewrite_bittest): Propagate DEFs into debug
      stmts before replacing stmt.
      (move_computations_stmt): Likewise.
      * ira-conflicts.c (add_copies): Skip debug insns.
      * regstat.c (regstat_init_n_sets_and_refs): Discount debug insns.
      (regstat_bb_compute_ri): Skip debug insns.
      * tree-ssa-threadupdate.c (redirection_block_p): Skip debug stmts.
      * tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
      check_loop_closed_ssa_stmt): Skip debug stmts.
      * tree-tailcall.c (find_tail_calls): Likewise.
      * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
      * tree.h (MAY_HAVE_DEBUG_STMTS): New.
      (build_var_debug_value_stat): Declare.
      (build_var_debug_value): Define.
      (target_for_debug_bind): Declare.
      * reload.c (find_equiv_reg): Skip debug insns.
      * rtlanal.c (reg_used_between_p): Skip debug insns.
      (side_effects_p): Likewise.
      (canonicalize_condition): Likewise.
      * ddg.c (create_ddg_dep_from_intra_loop_link): Check that non-debug
      insns never depend on debug insns.
      (create_ddg_dep_no_link): Likewise.
      (add_cross_iteration_register_deps): Use ANTI_DEP for debug insns.
      Don't add inter-loop dependencies for debug insns.
      (build_intra_loop_deps): Likewise.
      (create_ddg): Count debug insns.
      * ddg.h (struct ddg::num_debug): New.
      (num_backargs): Pair up with previous int field.
      * diagnostic.c (diagnostic_report_diagnostic): Skip notes on
      -fcompare-debug-second.
      * final.c (get_attr_length_1): Skip debug insns.
      (rest_of_clean-state): Don't dump CFA_RESTORE_STATE.
      * gcc.c (invoke_as): Call compare-debug-dump-opt.
      (driver_self_specs): Map -fdump-final-insns to
      -fdump-final-insns=..
      (get_local_tick): New.
      (compare_debug_dump_opt_spec_function): Test for . argument and
      compute output name.  Compute temp output spec without flag name.
      Compute -frandom-seed.
      (OPT): Undef after use.
      * cfgloopanal.c (num_loop_insns): Skip debug insns.
      (average_num_loop_insns): Likewise.
      * params.h (MIN_NONDEBUG_INSN_UID): New.
      * gimple.def (GIMPLE_DEBUG): New.
      * ipa-reference.c (scan_stmt_for_static_refs): Skip debug stmts.
      * auto-inc-dec.c (merge_in_block): Skip debug insns.
      (merge_in_block): Fix whitespace.
      * toplev.c (flag_var_tracking): Update comment.
      (flag_var_tracking_assignments): New.
      (flag_var_tracking_assignments_toggle): New.
      (process_options): Don't open final insns dump file if we're not
      going to write to it.  Compute defaults for var_tracking.
      * df-scan.c (df_insn_rescan_debug_internal): New.
      (df_uses_record): Handle debug insns.
      * haifa-sched.c (ready): Initialize n_debug.
      (contributes_to_priority): Skip debug insns.
      (dep_list_size): New.
      (priority): Use it.
      (rank_for_schedule): Likewise.  Schedule debug insns as soon as
      they're ready.  Disregard previous debug insns to make decisions.
      (queue_insn): Never queue debug insns.
      (ready_add, ready_remove_first, ready_remove): Count debug insns.
      (schedule_insn): Don't reject debug insns because of issue rate.
      (get_ebb_head_tail, no_real_insns_p): Skip boundary debug insns.
      (queue_to_ready): Skip and discount debug insns.
      (choose_ready): Let debug insns through.
      (schedule_block): Check boundary debug insns.  Discount debug
      insns, schedule them early.  Adjust whitespace.
      (set_priorities): Check for boundary debug insns.
      (add_jump_dependencies): Use dep_list_size.
      (prev_non_location_insn): New.
      (check_cfg): Use it.
      * tree-ssa-loop-ivopts.c (find-interesting_users): Skip debug
      stmts.
      (remove_unused_ivs): Reset debug stmts.
      * modulo-sched.c (const_iteration_count): Skip debug insns.
      (res_MII): Discount debug insns.
      (loop_single_full_bb_p): Skip debug insns.
      (sms_schedule): Likewise.
      (sms_schedule_by_order): Likewise.
      (ps_has_conflicts): Likewise.
      * caller-save.c (refmarker_fn): New.
      (save_call_clobbered_regs): Replace regs with saved mem in
      debug insns.
      (mark_referenced_regs): Take pointer, mark and arg.  Adjust.
      Call refmarker_fn mark for hardregnos.
      (mark_reg_as_referenced): New.
      (replace_reg_with_saved_mem): New.
      * ipa-pure-const.c (check_stmt): Skip debug stmts.
      * cse.c (cse_insn): Canonicalize debug insns.  Skip them when
      searching back.
      (cse_extended_basic_block): Skip debug insns.
      (count_reg_usage): Likewise.
      (is_dead_reg): New, split out of...
      (set_live_p): ... here.
      (insn_live_p): Use it for debug insns.
      * tree-stdarg.c (check_all_va_list_escapes): Skip debug stmts.
      (execute_optimize_stdarg): Likewise.
      * tree-ssa-dom.c (propagate_rhs_into_lhs): Likewise.
      * tree-ssa-propagate.c (substitute_and_fold): Don't regard
      changes in debug stmts as changes.
      * sel-sched.c (moving_insn_creates_bookkeeping_block_p): New.
      (moveup_expr): Don't move across debug insns.  Don't move
      debug insn if it would create a bookkeeping block.
      (moveup_expr_cached): Don't use cache for debug insns that
      are heads of blocks.
      (compute_av_set_inside_bb): Skip debug insns.
      (sel_rank_for_schedule): Schedule debug insns first.  Remove
      dead code.
      (block_valid_for_bookkeeping_p); Support lax searches.
      (create_block_for_bookkeeping): Adjust block numbers when
      encountering debug-only blocks.
      (find_place_for_bookkeeping): Deal with debug-only blocks.
      (generate_bookkeeping_insn): Accept no place to insert.
      (remove_temp_moveop_nops): New argument full_tidying.
      (prepare_place_to_insert): Deal with debug insns.
      (advance_state_on_fence): Debug insns don't start cycles.
      (update_boundaries): Take fence as argument.  Deal with
      debug insns.
      (schedule_expr_on_boundary): No full_tidying on debug insns.
      (fill_insns): Deal with debug insns.
      (track_scheduled_insns_and_blocks): Don't count debug insns.
      (need_nop_to_preserve_insn_bb): New, split out of...
      (remove_insn_from_stream): ... this.
      (fur_orig_expr_not_found): Skip debug insns.
      * rtl.def (VALUE): Move up.
      (DEBUG_INSN): New.
      * tree-ssa-sink.c (all_immediate_uses_same_place): Skip debug
      stmts.
      (nearest_common_dominator_of_uses): Take debug_stmts argument.
      Set it if debug stmts are found.
      (statement_sink_location): Skip debug stmts.  Propagate
      moving defs into debug stmts.
      * ifcvt.c (first_active_insn): Skip debug insns.
      (last_active_insns): Likewise.
      (cond_exec_process_insns): Likewise.
      (noce_process_if_block): Likewise.
      (check_cond_move_block): Likewise.
      (cond_move_convert_if_block): Likewise.
      (block_jumps_and_fallthru_p): Likewise.
      (dead_or_predicable): Likewise.
      * dwarf2out.c (debug_str_hash_forced): New.
      (find_AT_string): Add comment.
      (gen_label_for_indirect_string): New.
      (get_debug_string_label): New.
      (AT_string_form): Use it.
      (mem_loc_descriptor): Handle non-TLS symbols.  Handle MINUS , DIV,
      MOD, AND, IOR, XOR, NOT, ABS, NEG, and CONST_STRING.  Accept but
      discard COMPARE, IF_THEN_ELSE, ROTATE, ROTATERT, TRUNCATE and
      several operations that cannot be represented with DWARF opcodes.
      (loc_descriptor): Ignore SIGN_EXTEND and ZERO_EXTEND.  Require
      dwarf_version 4 for DW_OP_implicit_value and DW_OP_stack_value.
      (dwarf2out_var_location): Take during-call mark into account.
      (output_indirect_string): Update comment.  Output if there are
      label and references.
      (prune_indirect_string): New.
      (prune_unused_types): Call it if debug_str_hash_forced.
      More in dwarf2out.c, from Jakub Jelinek <jakub@redhat.com>:
      (dw_long_long_const): Remove.
      (struct dw_val_struct): Change val_long_long type to rtx.
      (print_die, attr_checksum, same_dw_val_p, loc_descriptor): Adjust for
      val_long_long change to CONST_DOUBLE rtx from a long hi/lo pair.
      (output_die): Likewise.  Use HOST_BITS_PER_WIDE_INT size of each
      component instead of HOST_BITS_PER_LONG.
      (output_loc_operands): Likewise.   For const8* assert
      HOST_BITS_PER_WIDE_INT rather than HOST_BITS_PER_LONG is >= 64.
      (output_loc_operands_raw): For const8* assert HOST_BITS_PER_WIDE_INT
      rather than HOST_BITS_PER_LONG is >= 64.
      (add_AT_long_long): Remove val_hi and val_lo arguments, add
      val_const_double.
      (size_of_die): Use HOST_BITS_PER_WIDE_INT size multiplier instead of
      HOST_BITS_PER_LONG for dw_val_class_long_long.
      (add_const_value_attribute): Adjust add_AT_long_long caller.  Don't
      handle TLS SYMBOL_REFs.  If CONST wraps a constant, tail recurse.
      (dwarf_stack_op_name): Handle DW_OP_implicit_value and
      DW_OP_stack_value.
      (size_of_loc_descr, output_loc_operands, output_loc_operands_raw):
      Handle DW_OP_implicit_value.
      (extract_int): Move prototype earlier.
      (mem_loc_descriptor): For SUBREG punt if inner
      mode size is wider than DWARF2_ADDR_SIZE.  Handle SIGN_EXTEND
      and ZERO_EXTEND by DW_OP_shl and DW_OP_shr{a,}.  Handle
      EQ, NE, GT, GE, LT, LE, GTU, GEU, LTU, LEU, SMIN, SMAX, UMIN,
      UMAX, SIGN_EXTRACT, ZERO_EXTRACT.
      (loc_descriptor): Compare mode size with DWARF2_ADDR_SIZE
      instead of Pmode size.
      (loc_descriptor): Add MODE argument.  Handle CONST_INT, CONST_DOUBLE,
      CONST_VECTOR, CONST, LABEL_REF and SYMBOL_REF if mode != VOIDmode,
      attempt to handle other expressions.  Don't handle TLS SYMBOL_REFs.
      (concat_loc_descriptor, concatn_loc_descriptor,
      loc_descriptor_from_tree_1): Adjust loc_descriptor callers.
      (add_location_or_const_value_attribute): Likewise.  For single
      location loc_lists attempt to use add_const_value_attribute
      for constant decls.  Add DW_AT_const_value even if
      NOTE_VAR_LOCATION is VAR_LOCATION with CONSTANT_P or CONST_STRING
      in its expression.
      * cfgbuild.c (inside_basic_block_p): Handle debug insns.
      (control_flow_insn_p): Likewise.
      * tree-parloops.c (eliminate_local_variables_stmt): Handle debug
      stmt.
      (separate_decls_in_region_debug_bind): New.
      (separate_decls_in_region): Process debug bind stmts afterwards.
      * recog.c (verify_changes): Handle debug insns.
      (extract_insn): Likewise.
      (peephole2_optimize): Skip debug insns.
      * dse.c (scan_insn): Skip debug insns.
      * sel-sched-ir.c (return_nop_to_pool): Take full_tidying argument.
      Pass it on.
      (setup_id_for_insn): Handle debug insns.
      (maybe_tidy_empty_bb): Adjust whitespace.
      (tidy_control_flow): Skip debug insns.
      (sel_remove_insn): Adjust for debug insns.
      (sel_estimate_number_of_insns): Skip debug insns.
      (create_insn_rtx_from_pattern): Handle debug insns.
      (create_copy_of_insn_rtx): Likewise.
      * sel-sched-.h (sel_bb_end): Declare.
      (sel_bb_empty_or_nop_p): New.
      (get_all_loop_exits): Use it.
      (_eligible_successor_edge_p): Likewise.
      (return_nop_to_pool): Adjust.
      * tree-eh.c (tre_empty_eh_handler_p): Skip debug stmts.
      * ira-lives.c (process_bb_node_lives): Skip debug insns.
      * gimple-pretty-print.c (dump_gimple_debug): New.
      (dump_gimple_stmt): Use it.
      (dump_bb_header): Skip gimple debug stmts.
      * regmove.c (optimize_reg_copy_1): Discount debug insns.
      (fixup_match_2): Likewise.
      (regmove_backward_pass): Likewise.  Simplify combined
      replacement.  Handle debug insns.
      * function.c (instantiate_virtual_regs): Handle debug insns.
      * function.h (struct emit_status): Add x_cur_debug_insn_uid.
      * print-rtl.h: Include cselib.h.
      (print_rtx): Print VALUEs.  Split out and recurse for
      VAR_LOCATIONs.
      * df.h (df_inns_rescan_debug_internal): Declare.
      * gcse.c (alloc_hash_table): Estimate n_insns.
      (cprop_insn): Don't regard debug insns as changes.
      (bypass_conditional_jumps): Skip debug insns.
      (one_pre_gcse_pass): Adjust.
      (one_code_hoisting_pass): Likewise.
      (compute_ld_motion_mems): Skip debug insns.
      (one_cprop_pass): Adjust.
      * tree-if-conv.c (tree_if_convert_stmt): Reset debug stmts.
      (if_convertible_stmt_p): Handle debug stmts.
      * init-regs.c (initialize_uninitialized_regs): Skip debug insns.
      * tree-vect-loop.c (vect_is_simple_reduction): Skip debug stmts.
      * ira-build.c (create_bb_allocnos): Skip debug insns.
      * tree-flow-inline.h (has_zero_uses): Discount debug stmts.
      (has_single_use): Likewise.
      (single_imm_use): Likewise.
      (num_imm_uses): Likewise.
      * tree-ssa-phiopt.c (empty_block_p): Skip debug stmts.
      * tree-ssa-coalesce.c (build_ssa_conflict_graph): Skip debug stmts.
      (create_outofssa_var_map): Likewise.
      * lower-subreg.c (adjust_decomposed_uses): New.
      (resolve_debug): New.
      (decompose_multiword_subregs): Use it.
      * tree-dfa.c (find_referenced_vars): Skip debug stmts.
      * emit-rtl.c: Include params.h.
      (cur_debug_insn_uid): Define.
      (set_new_first_and_last_insn): Set cur_debug_insn_uid too.
      (copy_rtx_if_shared_1): Handle debug insns.
      (reset_used_flags): Likewise.
      (set_used_flags): LIkewise.
      (get_max_insn_count): New.
      (next_nondebug_insn): New.
      (prev_nondebug_insn): New.
      (make_debug_insn_raw): New.
      (emit_insn_before_noloc): Handle debug insns.
      (emit_jump_insn_before_noloc): Likewise.
      (emit_call_insn_before_noloc): Likewise.
      (emit_debug_insn_before_noloc): New.
      (emit_insn_after_noloc): Handle debug insns.
      (emit_jump_insn_after_noloc): Likewise.
      (emit_call_insn_after_noloc): Likewise.
      (emit_debug_insn_after_noloc): Likewise.
      (emit_insn_after): Take loc from earlier non-debug insn.
      (emit_jump_insn_after): Likewise.
      (emit_call_insn_after): Likewise.
      (emit_debug_insn_after_setloc): New.
      (emit_debug_insn_after): New.
      (emit_insn_before): Take loc from later non-debug insn.
      (emit_jump_insn_before): Likewise.
      (emit_call_insn_before): Likewise.
      (emit_debug_insn_before_setloc): New.
      (emit_debug_insn_before): New.
      (emit_insn): Handle debug insns.
      (emit_debug_insn): New.
      (emit_jump_insn): Handle debug insns.
      (emit_call_insn): Likewise.
      (emit): Likewise.
      (init_emit): Take min-nondebug-insn-uid into account.
      Initialize cur_debug_insn_uid.
      (emit_copy_of_insn_after): Handle debug insns.
      * cfgexpand.c (gimple_assign_rhs_to_tree): Do not overwrite
      location of single rhs in place.
      (maybe_dump_rtl_for_gimple_stmt): Dump lineno.
      (floor_sdiv_adjust): New.
      (cell_sdiv_adjust): New.
      (cell_udiv_adjust): New.
      (round_sdiv_adjust): New.
      (round_udiv_adjust): New.
      (wrap_constant): Moved from cselib.
      (unwrap_constant): New.
      (expand_debug_expr): New.
      (expand_debug_locations): New.
      (expand_gimple_basic_block): Drop hiding redeclaration.  Expand
      debug bind stmts.
      (gimple_expand_cfg): Expand debug locations.
      * cselib.c: Include tree-pass.h.
      (struct expand_value_data): New.
      (cselib_record_sets_hook): New.
      (PRESERVED_VALUE_P, LONG_TERM_PRESERVED_VALUE_P): New.
      (cselib_clear_table): Move, and implemnet in terms of...
      (cselib_reset_table_with_next_value): ... this.
      (cselib_get_next_unknown_value): New.
      (discard_useless_locs): Don't discard preserved values.
      (cselib_preserve_value): New.
      (cselib_preserved_value_p): New.
      (cselib_preserve_definitely): New.
      (cselib_clear_preserve): New.
      (cselib_preserve_only_values): New.
      (new_cselib_val): Take rtx argument.  Dump it in details.
      (cselib_lookup_mem): Adjust.
      (expand_loc): Take regs_active in struct.  Adjust.  Silence
      dumps unless details are requested.
      (cselib_expand_value_rtx_cb): New.
      (cselib_expand_value_rtx): Rename and reimplment in terms of...
      (cselib_expand_value_rtx_1): ... this.  Adjust.  Silence dumps
      without details.  Copy more subregs.  Try to resolve values
      using a callback.  Wrap constants.
      (cselib_subst_to_values): Adjust.
      (cselib_log_lookup): New.
      (cselib_lookup): Call it.
      (cselib_invalidate_regno): Don't count preserved values as
      useless.
      (cselib_invalidate_mem): Likewise.
      (cselib_record_set): Likewise.
      (struct set): Renamed to cselib_set, moved to cselib.h.
      (cselib_record_sets): Adjust.  Call hook.
      (cselib_process_insn): Reset table when it would be cleared.
      (dump_cselib_val): New.
      (dump_cselib_table): New.
      * tree-cfgcleanup.c (tree_forwarded_block_p): Skip debug stmts.
      (remove_forwarder_block): Support moving debug stmts.
      * cselib.h (cselib_record_sets_hook): Declare.
      (cselib_expand_callback): New type.
      (cselib_expand_value_rtx_cb): Declare.
      (cselib_reset_table_with_next_value): Declare.
      (cselib_get_next_unknown_value): Declare.
      (cselib_preserve_value): Declare.
      (cselib_preserved_value_p): Declare.
      (cselib_preserve_only_values): Declare.
      (dump_cselib_table): Declare.
      * cfgcleanup.c (flow_find_cross_jump): Skip debug insns.
      (try_crossjump_to_edge): Likewise.
      (delete_unreachable_blocks): Remove dominant GIMPLE blocks after
      dominated blocks when debug stmts are present.
      * simplify-rtx.c (delegitimize_mem_from_attrs): New.
      * tree-ssa-live.c (remove_unused_locals): Skip debug stmts.
      (set_var_live_on_entry): Likewise.
      * loop-invariant.c (find_invariants_bb): Skip debug insns.
      * cfglayout.c (curr_location, last_location): Make static.
      (set_curr_insn_source_location): Don't avoid bouncing.
      (get_curr_insn_source_location): New.
      (get_curr_insn_block): New.
      (duplicate_insn_chain): Handle debug insns.
      * tree-ssa-forwprop.c (forward_propagate_addr_expr): Propagate
      into debug stmts.
      * common.opt (fcompare-debug): Move to sort order.
      (fdump-unnumbered-links): Likewise.
      (fvar-tracking-assignments): New.
      (fvar-tracking-assignments-toggle): New.
      * tree-ssa-dce.c (mark_stmt_necessary): Don't mark blocks
      because of debug stmts.
      (mark_stmt_if_obviously_necessary): Mark debug stmts.
      (eliminate_unnecessary_stmts): Walk dominated blocks before
      dominators.
      * tree-ssa-ter.c (find_replaceable_in_bb): Skip debug stmts.
      * ira.c (memref_used_between_p): Skip debug insns.
      (update_equiv_regs): Likewise.
      * sched-deps.c (sd_lists_size): Accept empty list.
      (sd_init_insn): Mark debug insns.
      (sd_finish_insn): Unmark them.
      (sd_add_dep): Reject non-debug deps on debug insns.
      (fixup_sched_groups): Give debug insns group treatment.
      Skip debug insns.
      (sched_analyze_reg): Don't mark debug insns for sched before call.
      (sched_analyze_2): Handle debug insns.
      (sched_analyze_insn): Compute next non-debug insn.  Handle debug
      insns.
      (deps_analyze_insn): Handle debug insns.
      (deps_start_bb): Skip debug insns.
      (init_deps): Initialize last_debug_insn.
      * tree-ssa.c (target_for_debug_bind): New.
      (find_released_ssa_name): New.
      (propagate_var_def_into_debug_stmts): New.
      (propagate_defs_into_debug_stmts): New.
      (verify_ssa): Skip debug bind stmts without values.
      (warn_uninialized_vars): Skip debug stmts.
      * target-def.h (TARGET_DELEGITIMIZE_ADDRESS): Set default.
      * rtl.c (rtx_equal_p_cb): Handle VALUEs.
      (rtx_equal_p): Likewise.
      * ira-costs.c (scan_one_insn): Skip debug insns.
      (process_bb_node_for_hard_reg_moves): Likewise.
      * rtl.h (DEBUG_INSN_P): New.
      (NONDEBUG_INSN_P): New.
      (MAY_HAVE_DEBUG_INSNS): New.
      (INSN_P): Accept debug insns.
      (RTX_FRAME_RELATED_P): Likewise.
      (INSN_DELETED_P): Likewise
      (PAT_VAR_LOCATION_DECL): New.
      (PAT_VAR_LOCATION_LOC): New.
      (PAT_VAR_OCATION_STATUS): New.
      (NOTE_VAR_LOCATION_DECL): Reimplement.
      (NOTE_VAR_LOCATION_LOC): Likewise.
      (NOTE_VAR_LOCATION_STATUS): Likewise.
      (INSN_VAR_LOCATION): New.
      (INSN_VAR_LOCATION_DECL): New.
      (INSN_VAR_LOCATION_LOC): New.
      (INSN_VAR_LOCATION_STATUS): New.
      (gen_rtx_UNKNOWN_VAR_LOC): New.
      (VAR_LOC_UNKNOWN_P): New.
      (NOTE_DURING_CALL_P): New.
      (SCHED_GROUP_P): Accept debug insns.
      (emit_debug_insn_before): Declare.
      (emit_debug_insn_before_noloc): Declare.
      (emit_debug_insn_beore_setloc): Declare.
      (emit_debug_insn_after): Declare.
      (emit_debug_insn_after_noloc): Declare.
      (emit_debug_insn_after_setloc): Declare.
      (emit_debug_insn): Declare.
      (make_debug_insn_raw): Declare.
      (prev_nondebug_insn): Declare.
      (next_nondebug_insn): Declare.
      (delegitimize_mem_from_attrs): Declare.
      (get_max_insn_count): Declare.
      (wrap_constant): Declare.
      (unwrap_constant): Declare.
      (get_curr_insn_source_location): Declare.
      (get_curr_insn_block): Declare.
      * tree-inline.c (insert_debug_decl_map): New.
      (processing_debug_stmt): New.
      (remap_decl): Don't create new mappings in debug stmts.
      (remap_gimple_op_r): Don't add references in debug stmts.
      (copy_tree_body_r): Likewise.
      (remap_gimple_stmt): Handle debug bind stmts.
      (copy_bb): Skip debug stmts.
      (copy_edges_for_bb): Likewise.
      (copy_debug_stmt): New.
      (copy_debug_stmts): New.
      (copy_body): Copy debug stmts at the end.
      (insert_init_debug_bind): New.
      (insert_init_stmt): Take id.  Skip and emit debug stmts.
      (setup_one_parameter): Remap variable earlier, register debug
      mapping.
      (estimate_num_insns): Skip debug stmts.
      (expand_call_inline): Preserve debug_map.
      (optimize_inline_calls): Check for no debug_stmts left-overs.
      (unsave_expr_now): Preserve debug_map.
      (copy_gimple_seq_and_replace_locals): Likewise.
      (tree_function_versioning): Check for no debug_stmts left-overs.
      Init and destroy debug_map as needed.  Split edges unconditionally.
      (build_duplicate_type): Init and destroy debug_map as needed.
      * tree-inline.h: Include gimple.h instead of pointer-set.h.
      (struct copy_body_data): Add debug_stmts and debug_map.
      * sched-int.h (struct ready_list): Add n_debug.
      (struct deps): Add last_debug_insn.
      (DEBUG_INSN_SCHED_P): New.
      (BOUNDARY_DEBUG_INSN_P): New.
      (SCHEDULE_DEBUG_INSN_P): New.
      (sd_iterator_cond): Accept empty list.
      * combine.c (create_log_links): Skip debug insns.
      (combine_instructions): Likewise.
      (cleanup_auto_inc_dec): New.  From Jakub Jelinek: Make sure the
      return value is always unshared.
      (struct rtx_subst_pair): New.
      (auto_adjust_pair): New.
      (propagate_for_debug_subst): New.
      (propagate_for_debug): New.
      (try_combine): Skip debug insns.  Propagate removed defs into
      debug insns.
      (next_nonnote_nondebug_insn): New.
      (distribute_notes): Use it.  Skip debug insns.
      (distribute_links): Skip debug insns.
      * tree-outof-ssa.c (set_location_for_edge): Likewise.
      * resource.c (mark_target_live_regs): Likewise.
      * var-tracking.c: Include cselib.h and target.h.
      (enum micro_operation_type): Add MO_VAL_USE, MO_VAL_LOC, and
      MO_VAL_SET.
      (micro_operation_type_name): New.
      (enum emit_note_where): Add EMIT_NOTE_AFTER_CALL_INSN.
      (struct micro_operation_def): Update comments.
      (decl_or_value): New type.  Use instead of decls.
      (struct emit_note_data_def): Add vars.
      (struct attrs_def): Use decl_or_value.
      (struct variable_tracking_info_def): Add permp, flooded.
      (struct location_chain_def): Update comment.
      (struct variable_part_def): Use decl_or_value.
      (struct variable_def): Make var_part a variable length array.
      (valvar_pool): New.
      (scratch_regs): New.
      (cselib_hook_called): New.
      (dv_is_decl_p): New.
      (dv_is_value_p): New.
      (dv_as_decl): New.
      (dv_as_value): New.
      (dv_as_opaque): New.
      (dv_onepart_p): New.
      (dv_pool): New.
      (IS_DECL_CODE): New.
      (check_value_is_not_decl): New.
      (dv_from_decl): New.
      (dv_from_value): New.
      (dv_htab_hash): New.
      (variable_htab_hash): Use it.
      (variable_htab_eq): Support values.
      (variable_htab_free): Free from the right pool.
      (attrs_list_member, attrs_list_insert): Use decl_or_value.
      (attrs_list_union): Adjust.
      (attrs_list_mpdv_union): New.
      (tie_break_pointers): New.
      (canon_value_cmp): New.
      (unshare_variable): Return possibly-modified slot.
      (vars_copy_1): Adjust.
      (var_reg_decl_set): Adjust.  Split out of...
      (var_reg_set): ... this.
      (get_init_value): Adjust.
      (var_reg_delete_and_set): Adjust.
      (var_reg_delete): Adjust.
      (var_regno_delete): Adjust.
      (var_mem_decl_set): Split out of...
      (var_mem_set): ... this.
      (var_mem_delete_and_set): Adjust.
      (var_mem_delete): Adjust.
      (val_store): New.
      (val_reset): New.
      (val_resolve): New.
      (variable_union): Adjust.  Speed up merge of 1-part vars.
      (variable_canonicalize): Use unshared slot.
      (VALUED_RECURSED_INTO): New.
      (find_loc_in_1pdv): New.
      (struct dfset_merge): New.
      (insert_into_intersection): New.
      (intersect_loc_chains): New.
      (loc_cmp): New.
      (canonicalize_loc_order_check): New.
      (canonicalize_values_mark): New.
      (canonicalize_values_star): New.
      (variable_merge_over_cur): New.
      (variable_merge_over_src): New.
      (dataflow_set_merge): New.
      (dataflow_set_equiv_regs): New.
      (remove_duplicate_values): New.
      (struct dfset_post_merge): New.
      (variable_post_merge_new_vals): New.
      (variable_post_merge_perm_vals): New.
      (dataflow_post_merge_adjust): New.
      (find_mem_expr_in_1pdv): New.
      (dataflow_set_preserve_mem_locs): New.
      (dataflow_set_remove_mem_locs): New.
      (dataflow_set_clear_at_call): New.
      (onepart_variable_different_p): New.
      (variable_different_p): Use it.
      (dataflow_set_different_1): Adjust.  Make detailed dump
      more verbose.
      (track_expr_p): Add need_rtl parameter.  Don't generate rtl
      if not needed.
      (track_loc_p): Pass it true.
      (struct count_use_info): New.
      (find_use_val): New.
      (replace_expr_with_values): New.
      (log_op_type): New.
      (use_type): New, partially split out of...
      (count_uses): ... this.  Count new micro-ops.
      (count_uses_1): Adjust.
      (count_stores): Adjust.
      (count_with_sets): New.
      (VAL_NEEDS_RESOLUTION): New.
      (VAL_HOLDS_TRACK_EXPR): New.
      (VAL_EXPR_IS_COPIED): New.
      (VAL_EXPR_IS_CLOBBERED): New.
      (add_uses): Adjust.  Generate new micro-ops.
      (add_uses_1): Adjust.
      (add_stores): Generate new micro-ops.
      (add_with_sets): New.
      (find_src_status): Adjust.
      (find_src_set_src): Adjust.
      (compute_bb_dataflow): Use dataflow_set_clear_at_call.
      Handle new micro-ops.  Canonicalize value equivalances.
      (vt_find_locations): Compute total size of hash tables for
      dumping.  Perform merge for var-tracking-assignments.  Don't
      disregard single-block loops.
      (dump_attrs_list): Handle decl_or_value.
      (dump_variable): Take variable.  Deal with decl_or_value.
      (dump_variable_slot): New.
      (dump_vars): Use it.
      (dump_dataflow_sets): Adjust.
      (set_slot_part): New, extended to support one-part variables
      after splitting out of...
      (set_variable_part): ... this.
      (clobber_slot_part): New, split out of...
      (clobber_variable_part): ... this.
      (delete_slot_part): New, split out of...
      (delete_variable_part): .... this.
      (check_wrap_constant): New.
      (vt_expand_loc_callback): New.
      (vt_expand_loc): New.
      (emit_note_insn_var_location): Adjust.  Handle values.  Handle
      EMIT_NOTE_AFTER_CALL_INSN.
      (emit_notes_for_differences_1): Adjust.  Handle values.
      (emit_notes_for_differences_2): Likewise.
      (emit_notes_for_differences): Adjust.
      (emit_notes_in_bb): Take pointer to set.  Emit AFTER_CALL_INSN
      notes.  Adjust.  Handle new micro-ops.
      (vt_add_function_parameters): Adjust.  Create and bind values.
      (vt_initialize): Adjust.  Initialize scratch_regs and
      valvar_pool, flooded and perm..  Initialize and use cselib.  Log
      operations.  Move some code to count_with_sets and add_with_sets.
      (delete_debug_insns): New.
      (vt_debug_insns_local): New.
      (vt_finalize): Release permp, valvar_pool, scratch_regs.  Finish
      cselib.
      (var_tracking_main): If var-tracking-assignments is enabled
      but var-tracking isn't, delete debug insns and leave.  Likewise
      if we exceed limits or fail the stack adjustments tests, and
      after all var-tracking processing.
      More in var-tracking, from Jakub Jelinek <jakub@redhat.com>:
      (dataflow_set): Add traversed_vars.
      (value_chain, const_value_chain): New typedefs.
      (value_chain_pool, value_chains): New variables.
      (value_chain_htab_hash, value_chain_htab_eq, add_value_chain,
      add_value_chains, add_cselib_value_chains, remove_value_chain,
      remove_value_chains, remove_cselib_value_chains): New functions.
      (shared_hash_find_slot_unshare_1, shared_hash_find_slot_1,
      shared_hash_find_slot_noinsert_1, shared_hash_find_1): New
      static inlines.
      (shared_hash_find_slot_unshare, shared_hash_find_slot,
      shared_hash_find_slot_noinsert, shared_hash_find): Update.
      (dst_can_be_shared): New variable.
      (unshare_variable): Unshare set->vars if shared, use shared_hash_*.
      Clear dst_can_be_shared.  If set->traversed_vars is non-NULL and
      different from set->vars, look up slot again instead of using the
      passed in slot.
      (dataflow_set_init): Initialize traversed_vars.
      (variable_union): Use shared_hash_*.  Use initially NO_INSERT
      lookup if set->vars is shared.  Don't keep slot cleared before
      calling unshare_variable.  Unshare set->vars if needed.  Adjust
      unshare_variable callers.  Clear dst_can_be_shared if needed.
      Even ->refcount == 1 vars must be unshared if set->vars is shared
      and var needs to be modified.
      (dataflow_set_union): Set traversed_vars during canonicalization.
      (VALUE_CHANGED, DECL_CHANGED): Define.
      (set_dv_changed, dv_changed_p): New static inlines.
      (track_expr_p): Clear DECL_CHANGED.
      (dump_dataflow_sets): Set it.
      (variable_was_changed): Call set_dv_changed.
      (emit_note_insn_var_location): Likewise.
      (changed_variables_stack): New variable.
      (check_changed_vars_1, check_changed_vars_2): New functions.
      (emit_notes_for_changes): Do nothing if changed_variables is
      empty.  Traverse changed_variables with check_changed_vars_1,
      call check_changed_vars_2 on each changed_variables_stack entry.
      (emit_notes_in_bb): Add SET argument.  Just clear it at the
      beginning, use it instead of local &set, don't destroy it at the
      end.
      (vt_emit_notes): Call dataflow_set_clear early on all
      VTI(bb)->out sets, never use them, instead use emit_notes_in_bb
      computed set, dataflow_set_clear also VTI(bb)->in when we are
      done with the basic block.  Initialize changed_variables_stack,
      free it afterwards.  If ENABLE_CHECKING verify that after noting
      differences to an empty set value_chains hash table is empty.
      (vt_initialize): Initialize value_chains and value_chain_pool.
      (vt_finalize): Delete value_chains htab, free value_chain_pool.
      (variable_tracking_main): Call dump_dataflow_sets before calling
      vt_emit_notes, not after it.
      * tree-flow.h (propagate_defs_into_debug_stmts): Declare.
      (propagate_var_def_into_debug_stmts): Declare.
      * df-problems.c (df_lr_bb_local_compute): Skip debug insns.
      (df_set_note): Reject debug insns.
      (df_whole_mw_reg_dead_p): Take added_notes_p argument.  Don't
      add notes to debug insns.
      (df_note_bb_compute): Adjust.  Likewise.
      (df_simulate_uses): Skip debug insns.
      (df_simulate_initialize_backwards): Likewise.
      * reg-stack.c (subst_stack_regs_in_debug_insn): New.
      (subst_stack_regs_pat): Reject debug insns.
      (convert_regs_1): Handle debug insns.
      * Makefile.in (TREE_INLINE_H): Take pointer-set.h from GIMPLE_H.
      (print-rtl.o): Depend on cselib.h.
      (cselib.o): Depend on TREE_PASS_H.
      (var-tracking.o): Depend on cselib.h and TARGET_H.
      * sched-rgn.c (rgn_estimate_number_of_insns): Discount
      debug insns.
      (init_ready_list): Skip boundary debug insns.
      (add_branch_dependences): Skip debug insns.
      (free_block_dependencies): Check for blocks with only debug
      insns.
      (compute_priorities): Likewise.
      * gimple.c (gss_for_code): Handle GIMPLE_DEBUG.
      (gimple_build_with_ops_stat): Take subcode as unsigned.  Adjust
      all callers.
      (gimple_build_debug_bind_stat): New.
      (empty_body_p): Skip debug stmts.
      (gimple_has_side_effects): Likewise.
      (gimple_rhs_has_side_effects): Likewise.
      * gimple.h (enum gimple_debug_subcode, GIMPLE_DEBUG_BIND): New.
      (gimple_build_debug_bind_stat): Declare.
      (gimple_build_debug_bind): Define.
      (is_gimple_debug): New.
      (gimple_debug_bind_p): New.
      (gimple_debug_bind_get_var): New.
      (gimple_debug_bind_get_value): New.
      (gimple_debug_bind_get_value_ptr): New.
      (gimple_debug_bind_set_var): New.
      (gimple_debug_bind_set_value): New.
      (GIMPLE_DEBUG_BIND_NOVALUE): New internal temporary macro.
      (gimple_debug_bind_reset_value): New.
      (gimple_debug_bind_has_value_p): New.
      (gsi_next_nondebug): New.
      (gsi_prev_nondebug): New.
      (gsi_start_nondebug_bb): New.
      (gsi_last_nondebug_bb): New.
      * sched-vis.c (print_pattern): Handle VAR_LOCATION.
      (print_insn): Handle DEBUG_INSN.
      * tree-cfg.c (remove_bb): Walk stmts backwards.  Let loc
      of first insn prevail.
      (first_stmt): Skip debug stmts.
      (first_non_label_stmt): Likewise.
      (last_stmt): Likewise.
      (has_zero_uses_1): New.
      (single_imm_use_1): New.
      (verify_gimple_debug): New.
      (verify_types_in_gimple_stmt): Handle debug stmts.
      (verify_stmt): Likewise.
      (debug_loop_num): Skip debug stmts.
      (remove_edge_and_dominated_blocks): Remove dominators last.
      * tree-ssa-reasssoc.c (rewrite_expr_tree): Propagate into
      debug stmts.
      (linearize_expr): Likewise.
      * config/i386/i386.c (ix86_delegitimize_address): Call
      default implementation.
      * config/ia64/ia64.c (ia64_safe_itanium_class): Handle debug
      insns.
      (group_barrier_needed): Skip debug insns.
      (emit_insn_group_barriers): Likewise.
      (emit_all_insn_group_barriers): Likewise.
      (ia64_variable_issue): Handle debug insns.
      (ia64_dfa_new_cycle): Likewise.
      (final_emit_insn_group_barriers): Skip debug insns.
      (ia64_dwarf2out_def_steady_cfa): Take frame argument.  Don't
      def cfa without frame.
      (process_set): Likewise.
      (process_for_unwind_directive): Pass frame on.
      * config/rs6000/rs6000.c (TARGET_DELEGITIMIZE_ADDRESS): Define.
      (rs6000_delegitimize_address): New.
      (rs6000_debug_adjust_cost): Handle debug insns.
      (is_microcoded_insn): Likewise.
      (is_cracked_insn): Likewise.
      (is_nonpipeline_insn): Likewise.
      (insn_must_be_first_in_group): Likewise.
      (insn_must_be_last_in_group): Likewise.
      (force_new_group): Likewise.
      * cfgrtl.c (rtl_split_block): Emit INSN_DELETED note if block
      contains only debug insns.
      (rtl_merge_blocks): Skip debug insns.
      (purge_dead_edges): Likewise.
      (rtl_block_ends_with_call_p): Skip debug insns.
      * dce.c (deletable_insn_p): Handle VAR_LOCATION.
      (mark_reg_dependencies): Skip debug insns.
      * params.def (PARAM_MIN_NONDEBUG_INSN_UID): New.
      * tree-ssanames.c (release_ssa_name): Propagate def into
      debug stmts.
      * tree-ssa-threadedge.c
      (record_temporary_equivalences_from_stmts): Skip debug stmts.
      * regcprop.c (replace_oldest_value_addr): Skip debug insns.
      (replace_oldest_value_mem): Use ALL_REGS for debug insns.
      (copyprop_hardreg_forward_1): Handle debug insns.
      * reload1.c (reload): Skip debug insns.  Replace unassigned
      pseudos in debug insns with their equivalences.
      (eliminate_regs_in_insn): Skip debug insns.
      (emit_input_reload_insns): Skip debug insns at first, adjust
      them later.
      * tree-ssa-operands.c (add_virtual_operand): Reject debug stmts.
      (get_indirect_ref_operands): Pass opf_no_vops on.
      (get_expr_operands): Likewise.  Skip debug stmts.
      (parse_ssa_operands): Scan debug insns with opf_no_vops.
      gcc/testsuite/ChangeLog:
      * gcc.dg/guality/guality.c: New.
      * gcc.dg/guality/guality.h: New.
      * gcc.dg/guality/guality.exp: New.
      * gcc.dg/guality/example.c: New.
      * lib/gcc-dg.exp (cleanup-dump): Remove .gk files.
      (cleanup-saved-temps): Likewise, .gkd files too.
      gcc/cp/ChangeLog:
      * cp-tree.h (TFF_NO_OMIT_DEFAULT_TEMPLATE_ARGUMENTS): New.
      * cp-lang.c (cxx_dwarf_name): Pass it.
      * error.c (count_non_default_template_args): Take flags as
      argument.  Adjust all callers.  Skip counting of default
      arguments if the new flag is given.
      ChangeLog:
      * Makefile.tpl (BUILD_CONFIG): Default to bootstrap-debug.
      * Makefile.in: Rebuilt.
      contrib/ChangeLog:
      * compare-debug: Look for .gkd files and compare them.
      config/ChangeLog:
      * bootstrap-debug.mk: Add comments.
      * bootstrap-debug-big.mk: New.
      * bootstrap-debug-lean.mk: New.
      * bootstrap-debug-ckovw.mk: Add comments.
      * bootstrap-debug-lib.mk: Drop CFLAGS for stages.  Use -g0
      for TFLAGS in stage1.  Drop -fvar-tracking-assignments-toggle.
      
      From-SVN: r151312
      Alexandre Oliva committed
  21. 11 Aug, 2009 1 commit
  22. 25 Jul, 2009 1 commit
    • re PR rtl-optimization/40445 (g++ void f() { __builtin_unreachable(); }) · 1e211590
      2009-07-25  David Daney  <ddaney@caviumnetworks.com>
      
      	PR rtl-optimization/40445
      	* emit-rtl.c (next_nonnote_insn_bb): New function.
      	* rtl.h (next_nonnote_insn_bb): Declare new function.
      	* cfgcleanup.c (try_optimize_cfg): Don't remove an empty block
      	with no successors that is the successor of the ENTRY_BLOCK.
      	Continue from the top after removing an empty fallthrough block.
      	* cfgrtl.c (get_last_bb_insn): Call next_nonnote_insn_bb instead
      	of next_nonnote_insn.
      
      2009-07-25  David Daney  <ddaney@caviumnetworks.com>
      
      	PR rtl-optimization/40445
      	* g++.dg/other/builtin-unreachable-1.C: New testcase.
      
      From-SVN: r150090
      David Daney committed
  23. 19 Jun, 2009 1 commit
  24. 12 Jun, 2009 1 commit
    • java-gimplify.c (java_gimplify_block): New argument to build_empty_stmt. · c2255bc4
      gcc/java/
      	* java-gimplify.c (java_gimplify_block): New argument to
      	build_empty_stmt.
      	* expr.c (force_evaluation_order): Same.
      	* typeck.c: Add location to build_decl or PUSH_FIELD calls.
      	* class.c: Same.
      	* decl.c: Same.
      	* jcf-parse.c: Same.
      	* constants.c: Same.
      	* resource.c: Same.
      	* except.c: Same.
      	* builtins.c: Same.
      	* expr.c: Same.
      	* java-tree.h (PUSH_FIELD): Add location field.
      gcc/objc/
      	* objc-act.c (finish_var_decl): Pass location to finish_decl.
      	(objc_get_parm_info): Same.
      	(get_super_receiver): Same.
      	* objc-act.c (objc_build_component_ref): Pass location to
      	build_compound_ref.
      	(build_module_initializer_routine): Pass location to
      	c_end_compound_stmt.
      	(objc_generate_static_init_call): Pass location to build_stmt.
      	(build_typed_selector_reference): New location argument.
      	(build_selector_reference): Same.
      	(objc_substitute_decl): Pass location to build_array_ref.
      	(next_sjlj_build_try_catch_finally): Pass location to build_stmt.
      	(objc_begin_catch_clause): Same.
      	(objc_finish_try_stmt): Same.
      	(objc_finish_catch_clause): Pass location to c_end_compound_stmt.
      	(objc_build_throw_stmt): New argument.
      	(generate_shared_structures): Pass location to build_c_cast.
      	(objc_build_message_expr): Use local location.
      	(objc_finish_message_expr): Use input_location.
      	(build_objc_method_call): New argument.
      	(objc_build_selector_expr): Same.
      	(get_super_receiver): Pass location to build_c_cast,
      	build_modify_expr, build_compound_expr.
      	* objc-act.c: Add location to all calls to start_struct, build_decl,
      	finish_struct.
      gcc/
      	* tree-pretty-print.c (dump_generic_node): Dump column numbers.
      	* gimple-pretty-print.c (dump_gimple_stmt): Same.
      	* gimplify.c (gimplify_modify_expr): Set location for GIMPLE_ASSIGNs
      	created.
      	* c-parser.c (c_parser_binary_expression): Use current column while
      	building binary operations.
      	* common.opt (fshow-column): Enable by default.
      	* tree-vrp.c (check_array_ref): Use warning_at.
      	(check_array_bounds): Use location from call back if expr has no
      	location.
      	* tree.h: Add location argument to maybe_fold_*.
      	* tree-ssa-ccp.c (ccp_fold): Pass location to maybe_fold_*.
      	(maybe_fold_offset_to_array_ref): Add location argument and use it.
      	(maybe_fold_offset_to_component_ref): Same.
      	(maybe_fold_offset_to_reference): Same.
      	(maybe_fold_offset_to_address): Same.
      	(maybe_fold_stmt_indirect): Same.
      	(maybe_fold_stmt_addition): Same.
      	(fold_stmt_r): Pass location to maybe_fold_*.
      	(fold_gimple_assign): Same.
      	* c-tree.h: Add location argument to finish_decl,
      	default_function_array_conversion, store_init_value.
      	* c-decl.c (define_label): Use error_at.
      	(c_make_fname_decl): Pass location to finish_decl.
      	(finish_decl): New location argument.
      	(build_compound_literal): Pass location to store_init_value.
      	(grokdeclarator): Pass location to finish_decl.
      	(grokfield): Same.
      	* c-typeck.c (array_to_pointer_conversion): New location argument.
      	(function_to_pointer_conversion): Same.
      	(default_function_array_conversion): Same.
      	(parser_build_unary_op): Pass location to overflow_warning.
      	(parser_build_binary_op): Same.  Use warning_at.
      	(build_unary_op): Pass location to array_to_pointer_conversion.
      	(build_c_cast): Pass location to digest_init.
      	(build_modify_expr): New location argument.
      	(convert_for_assignment): Same.
      	(store_init_value): Same.
      	(digest_init): Same.
      	(output_init_element): Pass location to digest_init and
      	array_to_pointer_conversion.
      	(c_finish_return): Pass location to convert_for_assignment.
      	* gimplify.c (gimplify_conversion): Pass location to
      	maybe_fold_offset_to_address.
      	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Pass location
      	to maybe_fold_stmt_addition.
      	* c-omp.c (c_finish_omp_atomic): Pass new location to
      	build_modify_expr.
      	(c_finish_omp_for): Same.
      	* c-common.c (overflow_warning): New argument.
      	* c-common.h: New argument to build_modify_expr, overflow_warning.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass location to
      	finish_decl.
      	(c_parser_initializer): Pass location to
      	default_function_array_conversion.
      	(c_parser_initelt): Same.
      	(c_parser_initval): Same.
      	(c_parser_asm_operands): Same.
      	(c_parser_expr_no_commas): Same.  Pass location to build_modify_expr.
      	(c_parser_conditional_expression): Same.
      	(c_parser_binary_expression): Add location info to stack.  Use it.
      	(c_parser_unary_expression): Pass location to
      	default_function_array_conversion, parser_build_unary_op,
      	build_indirect_ref, c_parser_postfix_expression_after_primary.
      	(c_parser_postfix_expression_after_primary): New location argument.
      	Use it.
      	(c_parser_expression_conv): Pass location to
      	default_function_array_conversion.
      	(c_parser_expr_list): Same.
      	(c_parser_omp_atomic): Same.
      	(c_parser_omp_for_loop): Same.
      	* c-tree.h: (struct c_declarator): Add comment to id_loc.
      	(build_array_declarator): New argument.
      	* c-decl.c (build_array_declarator): Add location argument.
      	(grokdeclarator): Set id_loc for cdk_array.
      	* c-parser.c (c_parser_direct_declarator_inner): Pass location to
      	build_array_declarator.
      	* tree.c (build_omp_clause): Add location argument.
      	* tree.h (OMP_CLAUSE_HAS_LOCATION): New macro.
      	(OMP_CLAUSE_LOCATION): New macro.
      	(struct tree_omp_clause): Add location field.
      	(build_omp_clause): Add argument.
      	* testsuite/gcc.dg/gomp/for-1.c: Fix column.
      	* cp/pt.c (tsubst_omp_for_iterator): Pass location to
      	build_omp_clause.
      	* cp/parser.c (cp_parser_omp_var_list_no_open): Same.
      	(cp_parser_omp_clause_collapse): Same.
      	(cp_parser_omp_clause_default): Same.
      	(cp_parser_omp_clause_if): Same.
      	(cp_parser_omp_clause_nowait): Same.
      	(cp_parser_omp_clause_num_threads): Same.
      	(cp_parser_omp_clause_ordered): Same.
      	(cp_parser_omp_clause_schedule): Same.
      	(cp_parser_omp_clause_untied): Same.
      	(cp_parser_omp_for_loop): Same.
      	(cp_parser_omp_parallel): Pass location to c_split_parallel_clauses.
      	* c-tree.h (c_start_case): Add location argument.
      	(c_process_expr_stmt): Same.
      	(c_finish_goto_*): Same.
      	* tree-parloops.c (initialize_reductions): Pass location to
      	build_omp_clause.
      	(create_parallel_loop): Same.
      	* fortran/trans-openmp.c (gfc_trans_omp_variable_list): Same.
      	(gfc_trans_omp_reduction_list): Same.
      	(gfc_trans_omp_clauses): Same.
      	(gfc_trans_omp_do): Same.
      	* c-typeck.c (c_finish_goto_label): Same.
      	(c_finish_goto_ptr): New location argument.
      	(c_start_case): Same.
      	(emit_side_effect_warnings): Same.
      	(c_process_expr_stmt): Same.
      	(c_finish_stmt_expr): Same.
      	(c_finish_omp_clauses): Use error_at instead of error.
      	* gimplify.c (gimplify_adjust_omp_clauses_1): Pass location to
      	build_omp_clause.
      	* c-omp.c (c_split_parallel_clauses): New location argument.
      	* tree-nested.c (convert_nonlocal_reference_stmt): Pass location
      	to build_omp_clause.
      	(convert_local_reference_stmt): Same.
      	(convert_gimple_call): Same.
      	* c-common.h (c_split_parallel_clauses): New argument.
      	* c-parser.c (c_parser_statement_after_labels): Pass location to
      	c_finish_goto_label.
      	(c_parser_switch_statement): Pass location to c_start_case.
      	(c_parser_for_statement): Pass location to c_finish_expr_stmt,
      	and c_process_expr_stmt.
      	(c_parser_omp_variable_list): Add location argument.
      	(c_parser_omp_clause_collapse): Pass location to
      	build_omp_clause.
      	(c_parser_omp_clause_default): Same.
      	(c_parser_omp_clause_if): Same.
      	(c_parser_omp_clause_num_threads): Same.
      	(-c_parser_omp_clause_ordered): Same.
      	(c_parser_omp_clause_reduction): Pass location to
      	c_parser_omp_variable_list.
      	(c_parser_omp_clause_schedule): Pass location to build_omp_clause.
      	(c_parser_omp_clause_untied): Same.
      	(c_parser_omp_for_loop): Pass location to c_process_expr_stmt.
      	(c_parser_omp_parallel): Pass location to
      	c_split_parallel_clauses.
      	* c-tree.h (check_for_loop_decls, undeclared_variable,
      	build_component_ref, build_array_ref, build_external_ref,
      	c_expr_sizeof_expr, c_expr_sizeof_type, parser_build_unary_op,
      	build_conditional_expr, build_compound_expr, c_cast_expr,
      	build_c_cast, build_asm_expr, c_end_compound_stmt, c_finish_stmt_expr,
      	c_finish_return, c_finish_omp_parallel, c_finish_omp_task): New
      	argument.
      	* c-semantics.c (build_stmt): Same.
      	(build_case_label): Same.
      	* c-decl.c (c_finish_incomplete_decl): Pass location on down.
      	(undeclared_variable): New argument.
      	(make_label): Same.
      	(lookup_label): Pass location on down.
      	(define_label): Same.
      	(finish_decl): Same.
      	(build_compound_literal): Same.
      	(finish_struct): Same.
      	(finish_function): Do not set location here.
      	(check_for_loop_decls): New argument.
      	* tree.c (save_expr): Set location.
      	(build_empty_stmt): New argument.
      	* tree.h (build_empty_stmt): New argument to build_empty_stmt.
      	(CAN_HAVE_LOCATION_P): Make sure we have a non empty node.
      	* builtins.c (gimplify_va_arg_expr): Use locations.
      	(expand_builtin_sync_operation): Same.
      	* c-typeck.c (build_component_ref): New argument.
      	(build_array_ref): Same.
      	(build_external_ref): Same.
      	(c_expr_sizeof_expr): Same.
      	(c_expr_sizeof_type): Same.
      	(parser_build_unary_op): Same.
      	(build_conditional_expr): Same.
      	(build_compound_expr): Pass location on down.
      	(build_compound_expr): New argument.
      	(build_c_cast): Same.
      	(c_cast_expr): Same.
      	(build_asm_expr): Same.
      	(c_finish_return): Same.
      	(c_process_expr_stmt): Pass location on down.
      	(c_finish_stmt_expr): New argument.
      	(push_clenaup): Same.
      	(c_finish_omp_parallel): Same.
      	(c_finish_omp_task): Same.
      	* gimplify.c (gimplify_call_expr): Pass location on down.
      	* c-omp.c (c_finish_omp_master): New argument.
      	(c_finish_omp_critical): Same.
      	(c_finish_omp_ordered): Same.
      	(c_finish_omp_barrier): Same.
      	(-c_finish_omp_taskwait): Same.
      	(c_finish_omp_atomic): Same.
      	(c_finish_omp_flush): Same.
      	* tree-inline.c (copy_tree_body_r): Pass location on down.
      	(inline_forbidden_p): Remove use of input_location.
      	* c-gimplify.c (c_build_bind_expr): New argument.
      	* c-common.c (c_common_truthvalue_conversion): Pass location on down.
      	(c_sizeof_or_alignof_type): New argument.
      	(c_alignof_expr): Same.
      	(build_va_arg): Same.
      	(c_add_case_label): Same.
      	* c-common.h (c_sizeof_or_alignof_type, c_alignof_expr,
      	c_sizeof, c_alignof, build_va_arg, build_stmt, build_case_label,
      	c_build_bind_expr, objc_build_selector_expr, objc_build_throw_stmt,
      	c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
      	c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush,
      	c_finish_omp_taskwait, c_finish_omp_for, c_split_parallel_clauses):
      	New argument.
      	* stub-objc.c (objc_build_selector_expr): Same.
      	(objc_build_throw_stmt): Same.
      	* c-parser.c (c_parser_declaration_or_fndef): Pass location on down.
      	(c_parser_initelt): Same.
      	(c_parser_compound_statement): Same.
      	(c_parser_compound_statement_nostart): Same.
      	(c_parser_label): Same.
      	(c_parser_statement_after_labels): Same.
      	(c_parser_if_body): Same.
      	(c_parser_else_body): Same.
      	(c_parser_if_statement): Same.
      	(c_parser_switch_statement): Same.
      	(c_parser_while_statement): Same.
      	(c_parser_do_statement): Same.
      	(c_parser_for_statement): Same.
      	(c_parser_asm_statement): Same.
      	(c_parser_conditional_expression): Same.
      	(c_parser_binary_expression): Same.
      	(c_parser_cast_expression): Same.
      	(c_parser_unary_expression): Same.
      	(c_parser_sizeof_expression): Same.
      	(c_parser_alignof_expression): Same.
      	(c_parser_postfix_expression): Same.
      	(c_parser_expression): Same.
      	(c_parser_objc_receiver): Same.
      	(c_parser_omp_variable_list): Same.
      	(c_parser_omp_structured_block): Same.
      	(c_parser_omp_atomic): New argument.
      	(c_parser_omp_barrier): Same.
      	(c_parser_omp_critical): Same.
      	(c_parser_omp_flush): Pass location on down.
      	(c_parser_omp_for_loop): New argument.
      	(c_parser_omp_for): Same.
      	(c_parser_omp_master): Same.
      	(c_parser_omp_ordered): Same.
      	(c_parser_omp_sections_scope): Same.
      	(c_parser_omp_sections): Same.
      	(c_parser_omp_parallel): Same.
      	(c_parser_omp_single): Same.
      	(c_parser_omp_task): Same.
      	(c_parser_omp_taskwait): Pass location on down.
      	(c_parser_omp_construct): Same.
      	(c_parser_omp_threadprivate): Same.
      	* dwarf2asm.c, targhooks.c, optabs.c, tree.c, tree.h, target.h,
      	builtins.c, omp-low.c, cgraphunit.c, tree-call-cdce.c,
      	tree-ssa-alias.c, gimple-low.c, c-tree.h, expr.c, tree-parloops.c,
      	c-decl.c, tree-eh.c, langhooks.c, function.c, stor-layout.c,
      	c-typeck.c, gimplify.c, c-pragma.c, expmed.c, except.c, coverage.c,
      	emit-rtl.c, cfgexpand.c, tree-mudflap.c, varasm.c, tree-nested.c,
      	rtl.h, tree-inline.c, tree-profile.c, c-common.c, c-common.h,
      	tree-switch-conversion.c, tree-cfg.c, ipa-struct-reorg.c, c-parser.c,
      	config/i386/i386.c, stmt.c:
      	Add location argument to the following function definitions and/or
      	function calls: build_decl, objcp_start_struct, objcp_finish_struct,
      	start_struct, finish_struct, PUSH_FIELD, create_artificial_label,
      	cp_make_fname_decl, pushtag, implicitly_declare, c_make_fname_decl,
      	build_compound_literal, parser_xref_tag, resolve_overloaded_builtin,
      	do_case, c_finish_bc_stmt, build_compound_literal,
      	build_function_call.
      	* c-decl.c (build_compound_literal): Add location argument.
      	Make all diagnostic calls use location.
      	(start_struct): Same.
      	(finish_struct): Same.
      	(start_enum): Same.
      	(build_enumerator): Same.
      	(start_function): Same.
      	(grokdeclarator): Make all diagnostic calls use location.
      	(store_parm_decls_oldstyle): Same.
      	* c-typeck.c (build_function_call): Add location argument.
      	Make all diagnostic calls use location.
      	(do_case): Same.
      	(c_finish_bc_stmt): Same.
      	* tree-nested.c (get_trampoline_type): Add argument.
      	Pass location to build_decl.
      	(lookup_tramp_for_decl): Pass location to get_trampoline_type.
      	* rtl.h (RTL_LOCATION): New.
      	* c-common.c (c_add_case_label): Add location argument.
      	Make all diagnostic calls use location.
      	* c-common.h: Add location argument to make_fname_decl, do_case,
      	c_add_case_label, build_function_call, resolve_overloaded_builtin.
      	* c-parser.c (c_parser_enum_specifier): Rename ident_loc to enum_loc.
      	Set it appropriately for every case.  Pass enum_loc to start_enum
      	call.  Pass value_loc first to build_enumerator.  Pass enum_loc to
      	parser_xref_tag.
      	(c_parser_struct_or_union_specifier): Save location.  Use it for
      	start_struct, finish_struct, and parser_xref_tag.
      gcc/testsuite/
      	* gcc.dg/old-style-prom-3.c: Add column info.
      	* gcc.dg/overflow-warn-1.c
      	* gcc.dg/gomp/pr27415.c
      	* gcc.dg/gomp/for-1.c: Same.
      	* gcc.dg/enum-compat-1.c: Same.
      	* gcc.dg/c99-tag-3.c: Same.
      	* gcc.dg/Wredundant-decls-2.c: Same.
      	* gcc.dg/func-ptr-conv-1.c: Same.
      	* gcc.dg/asm-wide-1.c: Same.
      	* gcc.dg/nofixed-point-2.c: Same.
      	* gcc.dg/cpp/line3.c: Same.
      	* gcc.dg/array-10.c: Same.
      	* gcc.dg/c99-vla-jump-1.c: Same.
      	* gcc.dg/pr20368-1.c: Same.
      	* gcc.dg/Wshadow-3.c: Same.
      	* gcc.dg/c90-const-expr-8.c: Same.
      	* gcc.dg/label-decl-2.c: Same.
      	* gcc.dg/dremf-type-compat-2.c: Same.
      	* gcc.dg/c90-const-expr-5.c: Same.
      	* gcc.dg/builtins-30.c: Same.
      	* gcc.dg/Warray-bounds.c: Same.
      	* gcc.dg/Wcxx-compat-2.c: Same.
      	* gcc.dg/tree-ssa/col-1.c: Same.
      	* gcc.dg/old-style-prom-2.c: Same.
      	* gcc.dg/cast-function-1.c: Same.
      	* gcc.dg/pr15698-1.c: Same.
      	* gcc.dg/dremf-type-compat-3.c: Same.
      	* gcc.dg/vla-8.c: Same.
      	* gcc.dg/gomp/pr27415.c: Move firstprivate diagnostics to correct
      	line.
      	* gcc.dg/label-decl-2.c: Move label diagnostic to correct line.
      	* gcc.dg/old-style-prom-3.c: Check for error on the correct line.
      	* gcc.dg/enum-compat-1.c: Same.
      	* gcc.dg/dremf-type-compat-2.c: Same.
      	* gcc.dg/old-style-prom-2.c: Same.
      	* gcc.dg/pr15698-1.c: Same.
      	* gcc.dg/pr20368-1.c: Same.
      	* gcc.dg/dremf-type-compat-3.c: Same.
      	* gcc.dg/builtins-30.c: Same.  Test for columns.
      gcc/objcp/
      	* objcp-decl.h (c_end_compound_stmt): New argument.
      	* objcp-decl.c (objcp_start_struct): Add argument.
      	(objcp_finish_struct): Same.
      gcc/cp/
      	* typeck.c (cp_build_binary_op): Pass location to overflow_warning.
      	(build_modify_expr): New arg.
      	* semantics.c (finish_unary_op_expr): Pass location to
      	overflow_warning.
      	(handle_omp_for_class_iterator): Pass location to build_modify_expr.
      	* typeck.c (cxx_sizeof_or_alignof_type): Pass location to
      	c_sizeof_or_alignof_type.
      	(build_array_ref): New argument.
      	(build_compound_expr): Same.
      	(build_const_cast): Same.
      	(build_ptrmemfunc): Pass location to build_c_cast.
      	* init.c (avoid_placement_new_aliasing): Pass location to
      	build_stmt.
      	(build_vec_delete_1): Pass location to cp_build_modify_expr,
      	build_compound_expr.
      	* class.c (build_vtbl_ref_1): Pass location to build_array_ref.
      	* decl.c (poplevel): Pass location to c_build_bind_expr.
      	(finish_case_label): Pass location to build_case_label.
      	(finish_constructor_body): Same.
      	(finish_destructor_body): Pass location to build_stmt.
      	(cxx_maybe_build_cleanup): Same, but to build_compound_expr.
      	* call.c (build_new_op): Pass location to build_array_ref.
      	(build_x_va_arg): Pass location to build_va_arg.
      	* except.c (expand_end_catch_block): Pass location to
      	build_stmt.
      	* cp-tree.h (build_array_ref): New argument.
      	(build_compound_expr): Same.
      	(build_c_cast): Same.
      	* cp-gimplify.c (gimplify_if_stmt): Pass location on down.
      	(gimplify_switch_stmt): Same.
      	* typeck2.c (split_nonconstant_init_1): Same.
      	* pt.c (tsubst_copy): Same.
      	* semantics.c (add_decl_expr): Same.
      	(do_poplevel): Same.
      	(push_cleanup): Same.
      	(finish_goto_stmt): Same.
      	(finish_expr_stmt): Same.
      	(begin_if_stmt): Same.
      	(begin_while_stmt): Same.
      	(begin_do_stmt): Same.
      	(finish_return_stmt): Same.
      	(begin_for_stmt): Same.
      	(finish_break_stmt): Same.
      	(finish_continue_stmt): Same.
      	(begin_switch_stmt): Same.
      	(begin_try_block): Same.
      	(begin_handler): Same.
      	(finish_asm_stmt): Same.
      	(finish_label_stmt): Same.
      	(finish_stmt_expr_expr): Same.
      	(finalize_nrv_r): Same.
      	(finish_omp_atomic): Same.
      	* name-lookup.c (do_using_directive): Same.
      	* decl2.c (grok_array_decl): Same.
      	* parser.c (cp_parser_cast_expression): Same.
      	(cp_parser_selection_statement): Same.
      	(cp_parser_implicitly_scoped_statement): Same.
      	(cp_parser_objc_selector_expression): Same.
      	(cp_parser_objc_synchronized_statement): Same.
      	(cp_parser_objc_throw_statement): Same.
      	(cp_parser_omp_critical): Same.
      	(cp_parser_omp_master): Same.
      	* typeck.c (build_function_call): Add location argument.
      	* init.c: Add location argument to all build_decl calls.
      	* class.c: Same.
      	* method.c: Same.
      	* rtti.c: Same.
      	* tree.c: Same.
      	* pt.c: Same.
      	* semantics.c: Same.
      	* lex.c: Same.
      	* decl2.c: Same.
      	* cp-gimplify.c: Same.
      	* decl.c: Same.
      	(cp_make_fname_decl): Add location argument.  Pass location ot
      	build_decl.
      	(finish_case_label): Same.
      	* cp-tree.h (finish_case_label): Add location argument.
      	* parser.c (cp_parser_label_for_labeled_statement): Pass location to
      	finish_case_label.
      gcc/fortran/
      	* trans-array.c (gfc_trans_allocate_array_storage): Pass
      	location on down.
      	(gfc_trans_array_constructor_value): Same.
      	(gfc_trans_scalarized_loop_end): Same.
      	(gfc_conv_ss_startstride): Same.
      	(gfc_trans_g77_array): Same.
      	(gfc_trans_dummy_array_bias): Same.
      	(gfc_conv_array_parameter): Same.
      	(structure_alloc_comps): Same.
      	* trans-expr.c (gfc_conv_function_call): Same.
      	(fill_with_spaces): Same.
      	(gfc_trans_string_copy): Same.
      	(gfc_trans_scalar_assign): Same.
      	* trans-stmt.c (gfc_trans_goto): Same.
      	(gfc_trans_if_1): Same.
      	(gfc_trans_simple_do): Same.
      	(gfc_trans_do): Same.
      	(gfc_trans_do_while): Same.
      	(gfc_trans_logical_select): Same.
      	(gfc_trans_select): Same.
      	(gfc_trans_forall_loop): Same.
      	(gfc_trans_nested_forall_loop): Same.
      	(generate_loop_for_temp_to_lhs): Same.
      	(generate_loop_for_rhs_to_temp): Same.
      	(gfc_trans_forall_1): Same.
      	(gfc_trans_where_assign): Same.
      	(gfc_trans_where_3): Same.
      	(gfc_trans_allocate): Same.
      	* trans.c (gfc_finish_block): Same.
      	(gfc_trans_runtime_check): Same.
      	(gfc_call_malloc): Same.
      	(gfc_allocate_with_status): Same.
      	(gfc_call_free): Same.
      	(gfc_deallocate_with_status): Same.
      	(gfc_call_realloc): Same.
      	(gfc_trans_code): Same.
      	* trans-decl.c (gfc_init_default_dt): Same.
      	(gfc_generate_constructors): Same.
      	* trans-io.c (gfc_trans_io_runtime_check): Same.
      	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Same.
      	(gfc_conv_intrinsic_fdate): Same.
      	(gfc_conv_intrinsic_ttynam): Same.
      	(gfc_conv_intrinsic_minmax): Same.
      	(gfc_conv_intrinsic_minmax_char): Same.
      	(gfc_conv_intrinsic_anyall): Same.
      	(gfc_conv_intrinsic_count): Same.
      	(gfc_conv_intrinsic_arith): Same.
      	(gfc_conv_intrinsic_minmaxloc): Same.
      	(gfc_conv_intrinsic_minmaxval): Same.
      	(gfc_conv_intrinsic_rrspacing): Same.
      	(gfc_conv_intrinsic_array_transfer): Same.
      	(gfc_conv_intrinsic_trim): Same.
      	(gfc_conv_intrinsic_repeat): Same.
      
      From-SVN: r148442
      Aldy Hernandez committed
  25. 30 May, 2009 1 commit
    • cfgcleanup.c (try_crossjump_to_edge): Only skip past NOTE_INSN_BASIC_BLOCK. · cd9c1ca8
      	* cfgcleanup.c (try_crossjump_to_edge): Only skip past
      	NOTE_INSN_BASIC_BLOCK.
      	* cfglayout.c (duplicate_insn_chain): Copy epilogue insn marks.
      	Duplicate NOTE_INSN_EPILOGUE_BEG notes.
      	* cfgrtl.c (can_delete_note_p): Allow NOTE_INSN_EPILOGUE_BEG
      	to be deleted.
      	* dwarf2out.c (struct cfa_loc): Change indirect field to bitfield,
      	add in_use field.
      	(add_cfi): Disable check redefining cfa away from drap.
      	(lookup_cfa_1): Add remember argument; handle remember/restore.
      	(lookup_cfa): Pass remember argument.
      	(cfa_remember): New.
      	(compute_barrier_args_size_1): Remove sibcall check.
      	(dwarf2out_frame_debug_def_cfa): New.
      	(dwarf2out_frame_debug_adjust_cfa): New.
      	(dwarf2out_frame_debug_cfa_offset): New.
      	(dwarf2out_frame_debug_cfa_register): New.
      	(dwarf2out_frame_debug_cfa_restore): New.
      	(dwarf2out_frame_debug): Handle REG_CFA_* notes.
      	(dwarf2out_begin_epilogue): New.
      	(dwarf2out_frame_debug_restore_state): New.
      	(dw_cfi_oprnd1_desc): Handle DW_CFA_remember_state,
      	DW_CFA_restore_state.
      	(output_cfi_directive): Likewise.
      	(convert_cfa_to_fb_loc_list): Likewise.
      	(dw_cfi_oprnd1_desc): Handle DW_CFA_restore.
      	* dwarf2out.h: Update.
      	* emit-rtl.c (try_split): Don't split RTX_FRAME_RELATED_P.
      	(copy_insn_1): Early out for null.
      	* final.c (final_scan_insn): Call dwarf2out_begin_epilogue
      	and dwarf2out_frame_debug_restore_state.
      	* function.c (prologue, epilogue, sibcall_epilogue): Remove.
      	(prologue_insn_hash, epilogue_insn_hash): New.
      	(free_after_compilation): Adjust freeing accordingly.
      	(record_insns): Create hash table if needed; push insns into
      	hash instead of array.
      	(maybe_copy_epilogue_insn): New.
      	(contains): Search hash table instead of array.
      	(sibcall_epilogue_contains): Remove.
      	(thread_prologue_and_epilogue_insns): Split eh_return insns
      	and mark them as epilogues.
      	(reposition_prologue_and_epilogue_notes): Rewrite epilogue
      	scanning in terms of basic blocks.
      	* insn-notes.def (CFA_RESTORE_STATE): New.
      	* jump.c (returnjump_p_1): Accept EH_RETURN.
      	(eh_returnjump_p_1, eh_returnjump_p): New.
      	* reg-notes.def (CFA_DEF_CFA, CFA_ADJUST_CFA, CFA_OFFSET,
      	CFA_REGISTER, CFA_RESTORE): New.
      	* rtl.def (EH_RETURN): New.
      	* rtl.h (eh_returnjump_p, maybe_copy_epilogue_insn): Declare.
      
      	* config/bfin/bfin.md (UNSPEC_VOLATILE_EH_RETURN): Remove.
      	(eh_return_internal): Use eh_return rtx; split w/ epilogue.
      
      	* config/i386/i386.c (gen_push): Update cfa state.
      	(pro_epilogue_adjust_stack): Add set_cfa argument.  When true,
      	add a CFA_ADJUST_CFA note.
      	(ix86_dwarf_handle_frame_unspec): Remove.
      	(ix86_expand_prologue): Update cfa state.
      	(ix86_emit_restore_reg_using_pop): New.
      	(ix86_emit_restore_regs_using_pop): New.
      	(ix86_emit_leave): New.
      	(ix86_emit_restore_regs_using_mov): Add CFA_RESTORE notes.
      	(ix86_expand_epilogue): Add notes for unwinding the epilogue.
      	* config/i386/i386.h (struct machine_cfa_state): New.
      	(ix86_cfa_state): New.
      	* config/i386/i386.md (UNSPEC_EH_RETURN): Remove.
      	(eh_return_internal): Merge from eh_return_<mode>,
      	use eh_return rtx, split w/ epilogue.
      
      From-SVN: r147995
      Richard Henderson committed
  26. 30 Apr, 2009 1 commit
    • gcse.c (ae_gen): Remove. · df35c271
      	* gcse.c (ae_gen): Remove.
      	(can_assign_to_reg_p): Rename to can_assign_to_reg_without_clobbers_p
      	and make non-static function to make it available in store-motion.c.
      	Update call sites with search-and-replace.
      	(enumerate_ldsts, reg_set_info, reg_clear_last_set, store_ops_ok,
      	extract_mentioned_regs, extract_mentioned_regs_helper,
      	find_moveable_store, compute_store_table, load_kills_store, find_loads,
      	store_killed_in_insn, store_killed_after, store_killed_before,
      	build_store_vectors, insert_insn_start_basic_block, insert-store,
      	remove_reachable_equiv_notes, replace_store_insn, delete_store,
      	free_store_memory, one_store_motion_pass, gate_rtl_store_motion,
      	execute_rtl_store_motion, pass_rtl_store_motion): Move to...
      	* store-motion.c: ...new file.  Also copy data structures from gcse.c
      	and clean up to remove parts not used by store motion.
      	* rtl.h (can_assign_to_reg_without_clobbers_p): Add prototype.
      	* Makefile.in (store-motion.o): New rule. Add to OBJS-common.
      
      From-SVN: r147001
      Steven Bosscher committed
  27. 26 Apr, 2009 1 commit
    • Expand from SSA. · 4e3825db
      gcc/
              Expand from SSA.
      	* builtins.c (fold_builtin_next_arg): Handle SSA names.
      	* tree-ssa-copyrename.c (rename_ssa_copies): Use ssa_name() directly.
      	* tree-ssa-coalesce.c (create_outofssa_var_map): Mark only useful
      	SSA names. 
      	(compare_pairs): Swap cost comparison.
      	(coalesce_ssa_name): Don't use change_partition_var.
      	* tree-nrv.c (struct nrv_data): Add modified member.
      	(finalize_nrv_r): Set it.
      	(tree_nrv): Use it to update statements.
      	(pass_nrv): Require PROP_ssa.
      	* tree-mudflap.c (mf_decl_cache_locals,
      	mf_build_check_statement_for): Use make_rename_temp.
      	(pass_mudflap_2): Require PROP_ssa, run ssa update at finish.
      	* alias.c (find_base_decl): Handle SSA names.
      	* emit-rtl (set_reg_attrs_for_parm): Make non-static.
      	(component_ref_for_mem_expr): Don't leak SSA names into RTL.
      	* rtl.h (set_reg_attrs_for_parm): Declare.
      	* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Rename
      	to "optimized", remove unused locals at finish.
      	(execute_free_datastructures): Make global, call
      	delete_tree_cfg_annotations.
      	(execute_free_cfg_annotations): Don't call
      	delete_tree_cfg_annotations.
      
      	* ssaexpand.h: New file.
      	* expr.c (toplevel): Include ssaexpand.h.
      	(expand_assignment): Handle SSA names the same as register
      	variables.
      	(expand_expr_real_1): Expand SSA names.
      	* cfgexpand.c (toplevel): Include ssaexpand.h.
      	(SA): New global variable.
      	(gimple_cond_pred_to_tree): Fold TERed comparisons into predicates.
      	(SSAVAR): New macro.
      	(set_rtl): New helper function.
      	(add_stack_var): Deal with SSA names, use set_rtl.
      	(expand_one_stack_var_at): Likewise.
      	(expand_one_stack_var): Deal with SSA names.
      	(stack_var_size_cmp): Use code (SSA_NAME / DECL) as tie breaker
      	before unique numbers.
      	(expand_stack_vars): Use set_rtl.
      	(expand_one_var): Accept SSA names, add asserts for them, feed them
      	to above subroutines.
      	(expand_used_vars): Expand all partitions (without default defs),
      	then only the local decls (ignoring those expanded already).
      	(expand_gimple_cond): Remove edges when jumpif() expands an
      	unconditional jump.
      	(expand_gimple_basic_block): Don't clear EDGE_EXECUTABLE here,
      	or remove abnormal edges.  Ignore insns setting the LHS of a TERed
      	SSA name.
      	(gimple_expand_cfg): Call into rewrite_out_of_ssa, initialize
      	members of SA; deal with PARM_DECL partitions here; expand
      	all PHI nodes, free tree datastructures and SA.  Commit instructions
      	on edges, clear EDGE_EXECUTABLE and remove abnormal edges here.
      	(pass_expand): Require and destroy PROP_ssa, verify SSA form, flow
      	info and statements at start, collect garbage at finish.
      	* tree-ssa-live.h (struct _var_map): Remove partition_to_var member.
      	(VAR_ANN_PARTITION) Remove.
      	(change_partition_var): Don't declare.
      	(partition_to_var): Always return SSA names.
      	(var_to_partition): Only accept SSA names.
      	(register_ssa_partition): Only check argument.
      	* tree-ssa-live.c (init_var_map): Don't allocate partition_to_var
      	member.
      	(delete_var_map): Don't free it.
      	(var_union): Only accept SSA names, simplify.
      	(partition_view_init): Mark only useful SSA names as used.
      	(partition_view_fini): Only deal with SSA names.
      	(change_partition_var): Remove.
      	(dump_var_map): Use ssa_name instead of partition_to_var member.
      	* tree-ssa.c (delete_tree_ssa): Don't remove PHI nodes on RTL
      	basic blocks.
      	* tree-outof-ssa.c (toplevel): Include ssaexpand.h and expr.h.
      	(struct _elim_graph): New member const_dests; nodes member vector of
      	ints.
      	(set_location_for_edge): New static helper.
      	(create_temp): Remove.
      	(insert_partition_copy_on_edge, insert_part_to_rtx_on_edge,
      	insert_value_copy_on_edge, insert_rtx_to_part_on_edge): New
      	functions.
      	(new_elim_graph): Allocate const_dests member.
      	(clean_elim_graph): Truncate const_dests member.
      	(delete_elim_graph): Free const_dests member.
      	(elim_graph_size): Adapt to new type of nodes member.
      	(elim_graph_add_node): Likewise.
      	(eliminate_name): Likewise.
      	(eliminate_build): Don't take basic block argument, deal only with
      	partition numbers, not variables.
      	(get_temp_reg): New static helper.
      	(elim_create): Use it, deal with RTL temporaries instead of trees.
      	(eliminate_phi): Adjust all calls to new signature.
      	(assign_vars, replace_use_variable, replace_def_variable): Remove.
      	(rewrite_trees): Only do checking.
      	(edge_leader, stmt_list, leader_has_match, leader_match): Remove.
      	(same_stmt_list_p, identical_copies_p, identical_stmt_lists_p,
      	init_analyze_edges_for_bb, fini_analyze_edges_for_bb,
      	contains_tree_r, MAX_STMTS_IN_LATCH,
      	process_single_block_loop_latch, analyze_edges_for_bb,
      	perform_edge_inserts): Remove.
      	(expand_phi_nodes): New global function.
      	(remove_ssa_form): Take ssaexpand parameter.  Don't call removed
      	functions, initialize new parameter, remember partitions having a
      	default def.
      	(finish_out_of_ssa): New global function.
      	(rewrite_out_of_ssa): Make global.  Adjust call to remove_ssa_form,
      	don't reset in_ssa_p here, don't disable TER when mudflap.
      	(pass_del_ssa): Remove.
      	* tree-flow.h (struct var_ann_d): Remove out_of_ssa_tag and
      	partition members.
      	(execute_free_datastructures): Declare.
      	* Makefile.in (SSAEXPAND_H): New variable.
      	(tree-outof-ssa.o, expr.o, cfgexpand.o): Depend on SSAEXPAND_H.
      	* basic-block.h (commit_one_edge_insertion): Declare.
      	* passes.c (init_optimization_passes): Move pass_nrv and
      	pass_mudflap2 before pass_cleanup_cfg_post_optimizing, remove
      	pass_del_ssa, pass_free_datastructures, pass_free_cfg_annotations.
      	* cfgrtl.c (commit_one_edge_insertion): Make global, don't declare.
      	(redirect_branch_edge): Deal with super block when expanding, split
      	out jump patching itself into ...
      	(patch_jump_insn): ... here, new static helper.
      
      testsuite/
      
      	Expand from SSA.
      	* gcc.dg/tree-ssa/20030728-1.c: Use -rtl-expand-details dump and
      	change regexps.
      	* gcc.target/i386/pr37248-1.c: Modified.
      	* gcc.target/i386/pr37248-3.c: Modified.
      	* gcc.target/i386/pr37248-2.c: Modified.
      	* gnat.dg/aliasing1.adb: Modified.
      	* gnat.dg/pack9.adb: Modified.
      	* gnat.dg/aliasing2.adb: Modified.
      	* gcc.dg/strict-overflow-2.c: Modified.
      	* gcc.dg/autopar/reduc-1char.c: Modified.
      	* gcc.dg/autopar/reduc-2char.c: Modified.
      	* gcc.dg/autopar/reduc-1.c: Modified.
      	* gcc.dg/autopar/reduc-2.c: Modified.
      	* gcc.dg/autopar/reduc-3.c: Modified.
      	* gcc.dg/autopar/reduc-6.c: Modified.
      	* gcc.dg/autopar/reduc-7.c: Modified.
      	* gcc.dg/autopar/reduc-8.c: Modified.
      	* gcc.dg/autopar/reduc-9.c: Modified.
      	* gcc.dg/autopar/reduc-1short.c: Modified.
      	* gcc.dg/autopar/reduc-2short.c: Modified.
      	* gcc.dg/autopar/parallelization-1.c: Modified.
      	* gcc.dg/strict-overflow-4.c: Modified.
      	* gcc.dg/strict-overflow-6.c: Modified.
      	* gcc.dg/gomp/combined-1.c: Modified.
      	* gcc.dg/no-strict-overflow-1.c: Modified.
      	* gcc.dg/no-strict-overflow-3.c: Modified.
      	* gcc.dg/no-strict-overflow-5.c: Modified.
      	* gcc.dg/tree-ssa/reassoc-13.c: Modified.
      	* gcc.dg/tree-ssa/pr18134.c: Modified.
      	* gcc.dg/tree-ssa/20030824-1.c: Modified.
      	* gcc.dg/tree-ssa/vector-2.c: Modified.
      	* gcc.dg/tree-ssa/forwprop-9.c: Modified.
      	* gcc.dg/tree-ssa/loop-21.c: Modified.
      	* gcc.dg/tree-ssa/20030824-2.c: Modified.
      	* gcc.dg/tree-ssa/vector-3.c: Modified.
      	* gcc.dg/tree-ssa/asm-3.c: Modified.
      	* gcc.dg/tree-ssa/pr23294.c: Modified.
      	* gcc.dg/tree-ssa/loop-22.c: Modified.
      	* gcc.dg/tree-ssa/loop-15.c: Modified.
      	* gcc.dg/tree-ssa/prefetch-4.c: Modified.
      	* gcc.dg/tree-ssa/pr22051-1.c: Modified.
      	* gcc.dg/tree-ssa/pr20139.c: Modified.
      	* gcc.dg/tree-ssa/scev-cast.c: Modified.
      	* gcc.dg/tree-ssa/pr22051-2.c: Modified.
      	* gcc.dg/tree-ssa/reassoc-1.c: Modified.
      	* gcc.dg/tree-ssa/loop-5.c: Modified.
      	* gcc.dg/tree-ssa/pr19431.c: Modified.
      	* gcc.dg/tree-ssa/pr32044.c: Modified.
      	* gcc.dg/tree-ssa/prefetch-7.c: Modified.
      	* gcc.dg/tree-ssa/loop-19.c: Modified.
      	* gcc.dg/tree-ssa/loop-28.c: Modified.
      	* gcc.dg/tree-ssa/ssa-pre-15.c: Modified.
      	* gcc.dg/tree-ssa/divide-1.c: Modified.
      	* gcc.dg/tree-ssa/inline-1.c: Modified.
      	* gcc.dg/tree-ssa/divide-3.c: Modified.
      	* gcc.dg/tree-ssa/pr30978.c: Modified.
      	* gcc.dg/tree-ssa/alias-6.c: Modified.
      	* gcc.dg/tree-ssa/divide-4.c: Modified.
      	* gcc.dg/tree-ssa/alias-11.c: Modified.
      	* gcc.dg/no-strict-overflow-7.c: Modified.
      	* gcc.dg/strict-overflow-1.c: Modified.
      	* gcc.dg/pr15784-4.c: Modified.
      	* gcc.dg/pr34263.c: Modified.
      	* gcc.dg/strict-overflow-3.c: Modified.
      	* gcc.dg/tree-prof/stringop-1.c: Modified.
      	* gcc.dg/tree-prof/val-prof-1.c: Modified.
      	* gcc.dg/tree-prof/val-prof-2.c: Modified.
      	* gcc.dg/tree-prof/val-prof-3.c: Modified.
      	* gcc.dg/tree-prof/val-prof-4.c: Modified.
      	* gcc.dg/no-strict-overflow-2.c: Modified.
      	* gcc.dg/no-strict-overflow-4.c: Modified.
      	* gcc.dg/no-strict-overflow-6.c: Modified.
      	* g++.dg/tree-ssa/pr27090.C: Modified.
      	* g++.dg/tree-ssa/tmmti-2.C: Modified.
      	* g++.dg/tree-ssa/ptrmemfield.C: Modified.
      	* g++.dg/tree-ssa/pr19807.C: Modified.
      	* g++.dg/opt/pr30965.C: Modified.
      	* g++.dg/init/new17.C: Modified.
      	* gfortran.dg/whole_file_6.f90: Modified.
      	* gfortran.dg/whole_file_5.f90: Modified.
      	* gfortran.dg/reassoc_1.f90: Modified.
      	* gfortran.dg/reassoc_3.f90: Modified.
      
      From-SVN: r146817
      Michael Matz committed
  28. 24 Apr, 2009 2 commits
    • combine.c (record_value_for_reg): Change 0 to VOIDmode, twice. · 32e8bb8e
      gcc/:
      	* combine.c (record_value_for_reg): Change 0 to VOIDmode, twice.
      	(record_dead_and_set_regs): Likewise.
      	* df.h (struct df_mw_hardreg): Change flags field to int.
      	(struct df_base_ref): Likewise.
      	(struct df): Change changeable_flags field to int.
      	* df-scan.c (df_defs_record): Change clobber_flags to int.
      	* dwarf2.h (enum dwarf_tag): Make lo_user and hi_user values enum
      	constants rather than #define macros.
      	(enum dwarf_attribute, enum dwarf_location_atom): Likewise.
      	(enum dwarf_type, enum dwarf_endianity_encoding): Likewise.
      	(enum dwarf_calling_convention): Likewise.
      	(enum dwarf_line_number_x_ops): Likewise.
      	(enum dwarf_call_frame_info): Likewise.
      	(enum dwarf_source_language): Likewise.
      	* dwarf2out.c (int_loc_descriptor): Add cast to enum type.
      	(add_calling_convention_attribute): Likewise.
      	* fold-const.c (fold_undefer_overflow_warnings): Add cast to enum
      	type.
      	(combine_comparisons): Change compcode to int.  Add cast to enum
      	type.
      	* genrecog.c (maybe_both_true_2): Change c to int.
      	(write_switch): Likewise.  Add cast to enum type.
      	* gimplify.c (gimplify_omp_for): Handle return values from
      	gimplify_expr using MIN rather than bitwise or.
      	(gimplify_expr): Add cast to enum type.
      	* ipa-prop.c (update_jump_functions_after_inlining): Change
      	IPA_BOTTOM to IPA_JF_UNKNOWN.
      	* ira.c (setup_class_subset_and_memory_move_costs): Change mode to
      	int.  Add casts to enum type.
      	(setup_cover_and_important_classes): Change cl to int.  Add casts
      	to enum type.
      	(setup_class_translate): Change cl and mode to int.
      	(ira_init_once): Change mode to int.
      	(free_register_move_costs): Likewise.
      	(setup_prohibited_mode_move_regs): Add casts to enum type.
      	* langhooks.c (add_builtin_function_common): Rework assertion that
      	value fits bitfield.
      	* mcf.c (add_fixup_edge): Change type parameter to edge_type.
      	* omega.c (omega_do_elimination): Avoid math on enum types.
      	* optabs.c (expand_vec_shift_expr): Remove casts to int.
      	* opts.c (set_debug_level): Change 2 to enum constant.  Use new
      	int local to handle integral_argment value.
      	* regmove.c (try_auto_increment): Change PUT_MODE to
      	PUT_REG_NOTE_KIND.
      	* reload.c (push_secondary_reload): Add casts to enum type.
      	(secondary_reload_class, find_valid_class): Likewise.
      	* reload1.c (emit_input_reload_insns): Likewise.
      	* rtl.h (NOTE_VAR_LOCATION_STATUS): Likewise.
      	* sel-sched.c (init_hard_regs_data): Change cur_mode to int.
      	* sel-sched-ir.c (hash_with_unspec_callback): Change 0 to enum
      	constant.
      	* tree.c (build_common_builtin_nodes): Add casts to enum type.
      	* tree-complex.c (complex_lattice_t): Typedef to int rather than
      	enum type.
      	(expand_complex_libcall): Add casts to enum type.
      	* tree-into-ssa.c (get_ssa_name_ann): Change 0 to enum constant.
      	* tree-vect-loop.c (vect_model_reduction_cost): Compare reduc_code
      	with ERROR_MARK, not NUM_TREE_CODES.
      	(vect_create_epilog_for_reduction): Likewise.
      	(vectorizable_reduction): Don't initialize epiloc_reduc_code.
      	When not using it, set it to ERROR_MARK rather than
      	NUM_TREE_CODES.
      	* tree-vect-patterns.c (vect_pattern_recog_1): Change vec_mode to
      	enum machine_mode.
      	* tree-vect-stmts.c (new_stmt_vec_info): Change 0 to
      	vect_unused_in_loop.  Change 0 to loop_vect.
      	* tree-vectorizer.c (vect_set_verbosity_level): Add casts to enum
      	type.
      	* var-tracking.c (get_init_value): Change return type to enum
      	var_init_status.
      	* vec.h (DEF_VEC_FUNC_P) [iterate]: Cast 0 to type T.
      	* config/arm/arm.c (fp_model_for_fpu): Change to array to enum
      	arm_fp_model.
      	(arm_override_options): Add casts to enum type.
      	(arm_emit_tls_decoration): Likewise.
      	* config/i386/i386.c (ix86_function_specific_restore): Add casts
      	to enum type.
      	* config/i386/i386-c.c (ix86_pragma_target_parse): Likewise.
      	* config/ia64/ia64.c (ia64_expand_compare): Change magic to int.
      	* config/rs6000/rs6000.c (rs6000_override_options): Add casts to
      	enum type.
      	* config/s390/s390.c (code_for_builtin_64): Change to array of
      	enum insn_code.
      	(code_for_builtin_31): Likewise.
      	(s390_expand_builtin): Change code_for_builtin to enum insn_code
      	const *.
      	* config/sparc/sparc.c (sparc_override_options): Change value
      	field in struct code_model to enum cmodel.  In initializer change
      	0 to NULL and add cast to enum type.
      
      	* c-typeck.c (build_modify_expr): Add lhs_origtype parameter.
      	Change all callers.  Issue a -Wc++-compat warning using
      	lhs_origtype if necessary.
      	(convert_for_assignment): Issue -Wc++-compat warnings about
      	invalid conversions to enum type on assignment.
      	* c-common.h (build_modify_expr): Update declaration.
      
      gcc/cp/:
      	* call.c (build_temp): Change 0 to enum constant.
      	* cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
      	type.
      	* cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
      	* decl2.c (constrain_visibility): Likewise.
      	* parser.c (cp_lexer_get_preprocessor_token): Likewise.
      	(cp_parser_flags): Typedef to int rather than enum type.
      	(cp_parser_expression_stack_entry): Change prec field to enum
      	cp_parser_prec.
      
      	* typeck.c (build_modify_expr): Add lhs_origtype parameter.
      	Change all callers.
      
      gcc/fortran/:
      	* gfortran.h (enum gfc_symbol_type): New named enum type, broken
      	out of struct gfc_symbol.
      	(struct gfc_symbol): Use enum gfc_symbol_type.
      	(enum gfc_array_ref_dimen_type): New named enum type, broken out
      	of struct gfc_array_ref).
      	(struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
      	(mod_pointee_as): Update declaration.
      	* decl.c (add_global_entry): Change type to enum gfc_symbol_type.
      	(gfc_mod_pointee_as): Change return type to "match".
      	* module.c (mio_array_ref): Add cast to enum type.
      	(mio_symbol): Likewise.
      	* resolve.c (resolve_global_procedure): Change type to enum
      	gfc_symbol_type.
      	* trans-io.c (gfc_build_st_parameter): Change type to unsigned
      	int.
      
      gcc/java/:
      	* jcf-parse.c (handle_constant): Add cast to enum type.
      
      gcc/objc/:
      	* objc-act.c (get_super_receiver): Update calls to
      	build_modify_expr to pass new argument.
      
      gcc/testsuite/:
      	* gcc.dg/Wcxx-compat-4.c: New testcase.
      
      From-SVN: r146735
      Ian Lance Taylor committed
    • re PR rtl-optimization/39794 (Miscompile with -O2 -funroll-loops) · 6216f94e
      	PR rtl-optimization/39794
      	* alias.c (canon_true_dependence): Add x_addr argument.
      	* rtl.h (canon_true_dependence): Adjust prototype.
      	* cse.c (check_dependence): Adjust canon_true_dependence callers.
      	* cselib.c (cselib_invalidate_mem): Likewise.
      	* gcse.c (compute_transp): Likewise.
      	* dse.c (scan_reads_nospill): Likewise.
      	(record_store, check_mem_read_rtx): Likewise.  For non-const-or-frame
      	addresses pass base->val_rtx as mem_addr, for const-or-frame addresses
      	canon_base_addr of the group, plus optional offset.
      	(struct group_info): Rename canon_base_mem to
      	canon_base_addr.
      	(get_group_info): Set canon_base_addr to canon_rtx of base, not
      	canon_rtx of base_mem.
      
      	* gcc.dg/pr39794.c: New test.
      
      From-SVN: r146669
      Jakub Jelinek committed
  29. 22 Apr, 2009 1 commit
    • hashtab.h: Update GTY annotations to new syntax · d1b38208
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* include/hashtab.h: Update GTY annotations to new syntax
      	* include/splay-tree.h: Likewise
      
      
      gcc/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* alias.c: Update GTY annotations to new syntax
      	* basic-block.h: Likewise
      	* bitmap.h: Likewise
      	* c-common.h: Likewise
      	* c-decl.c: Likewise
      	* c-parser.c: Likewise
      	* c-pragma.c: Likewise
      	* c-tree.h: Likewise
      	* cfgloop.h: Likewise
      	* cgraph.h: Likewise
      	* config/alpha/alpha.c: Likewise
      	* config/arm/arm.h: Likewise
      	* config/avr/avr.h: Likewise
      	* config/bfin/bfin.c: Likewise
      	* config/cris/cris.c: Likewise
      	* config/darwin.c: Likewise
      	* config/frv/frv.c: Likewise
      	* config/i386/i386.c: Likewise
      	* config/i386/i386.h: Likewise
      	* config/i386/winnt.c: Likewise
      	* config/ia64/ia64.h: Likewise
      	* config/iq2000/iq2000.c: Likewise
      	* config/mips/mips.c: Likewise
      	* config/mmix/mmix.h: Likewise
      	* config/pa/pa.c: Likewise
      	* config/pa/pa.h: Likewise
      	* config/rs6000/rs6000.c: Likewise
      	* config/s390/s390.c: Likewise
      	* config/sparc/sparc.c: Likewise
      	* config/xtensa/xtensa.c: Likewise
      	* cselib.h: Likewise
      	* dbxout.c: Likewise
      	* dwarf2out.c: Likewise
      	* except.c: Likewise
      	* except.h: Likewise
      	* fixed-value.h: Likewise
      	* function.c: Likewise
      	* function.h: Likewise
      	* gimple.h: Likewise
      	* integrate.c: Likewise
      	* optabs.c: Likewise
      	* output.h: Likewise
      	* real.h: Likewise
      	* rtl.h: Likewise
      	* stringpool.c: Likewise
      	* tree-data-ref.c: Likewise
      	* tree-flow.h: Likewise
      	* tree-scalar-evolution.c: Likewise
      	* tree-ssa-address.c: Likewise
      	* tree-ssa-alias.h: Likewise
      	* tree-ssa-operands.h: Likewise
      	* tree.c: Likewise
      	* tree.h: Likewise
      	* varasm.c: Likewise
      	* varray.h: Likewise
      	* vec.h: Likewise
      	* coretypes.h: Do not define GTY macro if it is already defined
      	* doc/gty.texi: Update GTY documentation to new syntax
      	* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
      	* gengtype-parse.c: Likewise
      
      
      gcc/ada/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
      	* gcc-interface/trans.c: Likewise
      	* gcc-interface/utils.c: Likewise
      
      
      gcc/cp/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* cp-tree.h: Update GTY annotations to new syntax
      	* decl.c: Likewise
      	* mangle.c: Likewise
      	* name-lookup.c: Likewise
      	* name-lookup.h: Likewise
      	* parser.c: Likewise
      	* pt.c: Likewise
      	* rtti.c: Likewise
      	* semantics.c: Likewise
      	* typeck2.c: Likewise
      
      
      gcc/fortran/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* f95-lang.c: Update GTY annotations to new syntax
      	* trans-intrinsic.c: Likewise
      	* trans-io.c: Likewise
      	* trans.h: Likewise
      
      
      gcc/java/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* builtins.c: Update GTY annotations to new syntax
      	* decl.c: Likewise
      	* java-tree.h: Likewise
      	* jcf.h: Likewise
      	* lang.c: Likewise
      
      
      gcc/objc/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* objc-act.c: Update GTY annotations to new syntax
      	* objc-act.h: Likewise
      
      
      libcpp/ChangeLog
      
      2009-04-21  Taras Glek <tglek@mozilla.com>
      
      	* include/cpp-id-data.h: Update GTY annotations to new syntax
      	* include/cpplib.h: Likewise
      	* include/line-map.h: Likewise
      	* include/symtab.h: Likewise
      
      From-SVN: r146607
      Taras Glek committed
  30. 18 Apr, 2009 1 commit
  31. 16 Apr, 2009 3 commits
  32. 27 Mar, 2009 1 commit
    • jump.c (rtx_renumbered_equal_p): Use subreg_get_info. · c619e982
      2009-03-27  H.J. Lu  <hongjiu.lu@intel.com>
      
      	* jump.c (rtx_renumbered_equal_p): Use subreg_get_info.
      	(true_regnum): Likewise.
      
      	* rtlanal.c (subreg_info): Moved to ...
      	* rtl.h (subreg_info): Here.  New.
      	(subreg_get_info): New.
      
      	* rtlanal.c (subreg_get_info): Make it extern.
      
      From-SVN: r145134
      H.J. Lu committed
  33. 18 Mar, 2009 1 commit
    • dse.c (struct group_info): Reorder fields for 64-bit hosts. · 8f5929e1
      	* dse.c (struct group_info): Reorder fields for 64-bit hosts.
      	* matrix-reorg.c (struct matrix_info): Likewise.
      	* tree-ssa-loop-ivopts.c (struct ivopts_data): Likewise.
      	* rtl.h (struct mem_attrs): Likewise.
      	* df.h (struct df): Likewise.
      	* tree-data-ref.h (struct data_dependence_relation): Likewise.
      	* ira-int.h (struct ira_allocno): Likewise.
      	* df-scan.c (struct df_collection_rec): Likewise.
      	* ira.c (struct equivalence): Likewise.
      	* function.c (struct temp_slot): Likewise.
      	* cfgloop.h (struct loop): Likewise.
      
      	* parser.c (struct cp_token): Reorder fields for 64-bit hosts.
      	(eof_token): Adjust.
      
      	* include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.
      
      From-SVN: r144938
      Jakub Jelinek committed
  34. 20 Feb, 2009 1 commit