PATCH: Move REG pointer flag into rtx [was Re: PATCH 2: Re: BOOTSTRAP FAILURE: segementation fault in genattrtab]

Jeffrey A Law law@redhat.com
Wed Nov 29 22:30:00 GMT 2000


  In message < 200011231834.NAA29386@hiauly1.hia.nrc.ca >you write:
  > With the enclosed patch, the pointer flag is moved into the rtx and 
  > the code updated to use the new flag.  Generally, this simplified the code.
  > I didn't change REGNO_POINTER_ALIGN or the underlying structure member it
  > uses.  
Understood.

  > However, in looking at mark_reg_pointer, it is clear that having the
  > pointer alignment in the rtx as well would be better.  If two pseudos
  > get assigned to the same hard register, then the alignment is the greater
  > of the two.
Likewise.


  > As far as the clean up of the pa machine definition that this allows, I
  > want to look at whether record_unscaled_index_insn_codes in pa.c is still
  > needed.  I will send at separate patch for the cleanup after I have looked
  > into this.
It shouldn't be needed anymore.  It was a hack to work around the fact
that we couldn't actually identify register that were pointers once
reload had completed.


  > 2000-11-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
  > 
  > 	* function.h (emit_status): Delete member regno_pointer_flag and
  > 	rename regno_pointer_flag_length to regno_pointer_align_length.
  > 	Delete define for REGNO_POINTER_FLAG.
  > 	* integrate.h (inline_remap): Delete member regno_pointer_flag.
  > 	Add member x_regno_reg_rtx.
  > 	* rtl.h (rtx_def): Use frame_related bit to indicate register is
  > 	a pointer in REG expressions.  Define REG_POINTER macro.
  > 	* alias.c (find_base_value, find_base_term): Use REG_POINTER
  > 	instead of REGNO_POINTER_FLAG.
  > 	* combine.c (nonzero_bits, num_sign_bit_copies): Likewise.
  > 	* emit-rtl.c (gen_reg_rtx): Use regno_pointer_align_length instead
  > 	of regno_pointer_flag_length.  Remove code which refers to
  > 	regno_pointer_flag.
  > 	(mark_reg_pointer): Use REG_POINTER.
  > 	(free_emit_status): Remove code which refers to regno_pointer_flag.
  > 	(init_emit, mark_emit_status): Likewise.
  > 	* flow.c (dump_flow_info): Likewise.
  > 	* function.c (preserve_temp_slots): Likewise.
  > 	* integrate.c (expand_inline_function, copy_rtx_and_substitute):
  > 	Use x_regno_reg_rtx instead of regno_pointer_flag for function
  > 	pointer determination in map.
  > 	* loop.c (strength_reduce, maybe_eliminate_biv_1): Use REG_POINTER.
  > 	* predict.c (estimate_probability): Likewise.
  > 	* regclass.c (record_address_regs, reg_scan_mark_refs): Likewise.
  > 	* unroll.c (unroll_loop): Use x_regno_reg_rtx instead of
  > 	regno_pointer_flag for function pointer determination in map.
  > 	* convex.h (RTX_COSTS): Don't test regno_pointer_flag and use
  > 	REG_POINTER.
  > 	* pa.c (hppa_legitimize_address, emit_move_sequence, basereg_operand):
  > 	Use REG_POINTER.
  > 	(restore_unscaled_index_insn_codes): Revise comment.
It looks really good.  I installed the patch.

I think we can further simplify basereg_operand, but we can do that
separately.

This is going to allow us to clean up some long standing warts.  I'm
extremely happy.

I think it also makes doing something like using dataflow analysis to 
propagate REG_POINTER easier (if you're interested, let me know and I'll
flesh out my ideas on this).

jeff



More information about the Gcc-bugs mailing list