This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Support for 'B' in RTL format strings



Hi,
I am working on patch to replace BLOCK_FOR_INSN array by field in INSN itself
and I've noticed that we already do have kind of support for pointers to BBs in
RTL structure by BBDEF accessor macro, but it requires code 'B' not documented
nor supported by rype_from_format.  I think it is cleaner than use '0', so here
are the missing bits.

Regtested/bootstrapped i386.

Thu May 30 19:46:52 CEST 2002  Jan Hubicka  <jh@suse.cz>
	* gengenrtl.c (type_from_format, accessor_from_format): Support 'B'.
	* rtl.texi: Document 'B'
Index: gengenrtl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/gengenrtl.c,v
retrieving revision 1.54
diff -c -3 -p -r1.54 gengenrtl.c
*** gengenrtl.c	19 May 2002 06:04:21 -0000	1.54
--- gengenrtl.c	30 May 2002 17:46:39 -0000
*************** type_from_format (c)
*** 81,86 ****
--- 81,88 ----
        return "struct bitmap_head_def *";  /* bitmap - typedef not available */
      case 't':
        return "union tree_node *";  /* tree - typedef not available */
+     case 'B':
+       return "struct basic_block_def *";  /* basic block - typedef not available */
      default:
        abort ();
      }
*************** accessor_from_format (c)
*** 115,122 ****
      case 't':
        return "XTREE";
  
!     default:
!       abort ();
      }
  }
  
--- 117,124 ----
      case 't':
        return "XTREE";
  
!     case 'B':
!       return "XBBDEF";
      }
  }
  
Index: doc/rtl.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/doc/rtl.texi,v
retrieving revision 1.37
diff -c -3 -p -r1.37 rtl.texi
*** doc/rtl.texi	10 May 2002 20:13:02 -0000	1.37
--- doc/rtl.texi	30 May 2002 17:46:40 -0000
*************** core, @samp{V} is equivalent to @samp{E}
*** 243,248 ****
--- 243,251 ----
  from an @samp{md} file, the vector value of this operand may be omitted.
  An omitted vector is effectively the same as a vector of no elements.
  
+ @item B
+ @samp{B} indicates a pointer to basic block strucure.
+ 
  @item 0
  @samp{0} means a slot whose contents do not fit any normal category.
  @samp{0} slots are not printed at all in dumps, and are often used in


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]