* [patch] emit-rtl.c: Remove gen_rtx().
@ 2004-02-04 5:16 Kazu Hirata
2004-02-04 6:02 ` Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Kazu Hirata @ 2004-02-04 5:16 UTC (permalink / raw)
To: gcc-patches
Hi,
Attached is a patch to remove gen_rtx() as the only references to it
are in comments.
Bootstrapped on i686-pc-linux-gnu (on top of my obsolete-port-removal
patch). OK to apply?
Kazu Hirata
2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c (gen_rtx): Remove.
* genattrtab.c: Don't mention gen_rtx in a comment.
* rtl.h: Remove the prototype for gen_rtx.
* doc/md.texi: Replace gen_rtx with gen_rtx_REG.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.374
diff -u -r1.374 emit-rtl.c
--- emit-rtl.c 3 Feb 2004 05:15:36 -0000 1.374
+++ emit-rtl.c 3 Feb 2004 23:25:17 -0000
@@ -22,18 +22,19 @@
/* Middle-to-low level generation of rtx code and insns.
- This file contains the functions `gen_rtx', `gen_reg_rtx'
- and `gen_label_rtx' that are the usual ways of creating rtl
- expressions for most purposes.
+ This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
+ that are the usual ways of creating rtl expressions for most
+ purposes.
It also has the functions for creating insns and linking
them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
- the machine description. These routines use `gen_rtx' to make
- the individual rtx's of the pattern; what is machine dependent
- is the kind of rtx's they make and what arguments they use. */
+ the machine description. These routines use `gen_rtx_fmt_ee' and
+ others to make the individual rtx's of the pattern; what is machine
+ dependent is the kind of rtx's they make and what arguments they
+ use. */
#include "config.h"
#include "system.h"
@@ -645,119 +646,6 @@
subreg_lowpart_offset (mode, inmode));
}
\f
-/* rtx gen_rtx (code, mode, [element1, ..., elementn])
-**
-** This routine generates an RTX of the size specified by
-** <code>, which is an RTX code. The RTX structure is initialized
-** from the arguments <element1> through <elementn>, which are
-** interpreted according to the specific RTX type's format. The
-** special machine mode associated with the rtx (if any) is specified
-** in <mode>.
-**
-** gen_rtx can be invoked in a way which resembles the lisp-like
-** rtx it will generate. For example, the following rtx structure:
-**
-** (plus:QI (mem:QI (reg:SI 1))
-** (mem:QI (plusw:SI (reg:SI 2) (reg:SI 3))))
-**
-** ...would be generated by the following C code:
-**
-** gen_rtx_PLUS (QImode,
-** gen_rtx_MEM (QImode,
-** gen_rtx_REG (SImode, 1)),
-** gen_rtx_MEM (QImode,
-** gen_rtx_PLUS (SImode,
-** gen_rtx_REG (SImode, 2),
-** gen_rtx_REG (SImode, 3)))),
-*/
-
-/*VARARGS2*/
-rtx
-gen_rtx (enum rtx_code code, enum machine_mode mode, ...)
-{
- int i; /* Array indices... */
- const char *fmt; /* Current rtx's format... */
- rtx rt_val; /* RTX to return to caller... */
- va_list p;
-
- va_start (p, mode);
-
- switch (code)
- {
- case CONST_INT:
- rt_val = gen_rtx_CONST_INT (mode, va_arg (p, HOST_WIDE_INT));
- break;
-
- case CONST_DOUBLE:
- {
- HOST_WIDE_INT arg0 = va_arg (p, HOST_WIDE_INT);
- HOST_WIDE_INT arg1 = va_arg (p, HOST_WIDE_INT);
-
- rt_val = immed_double_const (arg0, arg1, mode);
- }
- break;
-
- case REG:
- rt_val = gen_rtx_REG (mode, va_arg (p, int));
- break;
-
- case MEM:
- rt_val = gen_rtx_MEM (mode, va_arg (p, rtx));
- break;
-
- default:
- rt_val = rtx_alloc (code); /* Allocate the storage space. */
- rt_val->mode = mode; /* Store the machine mode... */
-
- fmt = GET_RTX_FORMAT (code); /* Find the right format... */
- for (i = 0; i < GET_RTX_LENGTH (code); i++)
- {
- switch (*fmt++)
- {
- case '0': /* Field with unknown use. Zero it. */
- X0EXP (rt_val, i) = NULL_RTX;
- break;
-
- case 'i': /* An integer? */
- XINT (rt_val, i) = va_arg (p, int);
- break;
-
- case 'w': /* A wide integer? */
- XWINT (rt_val, i) = va_arg (p, HOST_WIDE_INT);
- break;
-
- case 's': /* A string? */
- XSTR (rt_val, i) = va_arg (p, char *);
- break;
-
- case 'e': /* An expression? */
- case 'u': /* An insn? Same except when printing. */
- XEXP (rt_val, i) = va_arg (p, rtx);
- break;
-
- case 'E': /* An RTX vector? */
- XVEC (rt_val, i) = va_arg (p, rtvec);
- break;
-
- case 'b': /* A bitmap? */
- XBITMAP (rt_val, i) = va_arg (p, bitmap);
- break;
-
- case 't': /* A tree? */
- XTREE (rt_val, i) = va_arg (p, tree);
- break;
-
- default:
- abort ();
- }
- }
- break;
- }
-
- va_end (p);
- return rt_val;
-}
-
/* gen_rtvec (n, [rt1, ..., rtn])
**
** This routine creates an rtvec and stores within it the
@@ -5389,7 +5277,7 @@
/* Create the unique rtx's for certain rtx codes and operand values. */
- /* Don't use gen_rtx here since gen_rtx in this case
+ /* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case
tries to use these variables. */
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
Index: genattrtab.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genattrtab.c,v
retrieving revision 1.141
diff -u -r1.141 genattrtab.c
--- genattrtab.c 21 Jan 2004 20:39:54 -0000 1.141
+++ genattrtab.c 3 Feb 2004 23:25:19 -0000
@@ -549,7 +549,7 @@
In some cases we cannot uniquify; then we return an ordinary
impermanent rtx with ATTR_PERMANENT_P clear.
- Args are like gen_rtx, but without the mode:
+ Args are as follows:
rtx attr_rtx (code, [element1, ..., elementn]) */
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.453
diff -u -r1.453 rtl.h
--- rtl.h 31 Jan 2004 09:21:18 -0000 1.453
+++ rtl.h 3 Feb 2004 23:25:21 -0000
@@ -1445,7 +1445,6 @@
extern void optimize_save_area_alloca (rtx);
/* In emit-rtl.c */
-extern rtx gen_rtx (enum rtx_code, enum machine_mode, ...);
extern rtvec gen_rtvec (int, ...);
extern rtx copy_insn_1 (rtx);
extern rtx copy_insn (rtx);
@@ -1874,8 +1873,7 @@
/* There are some RTL codes that require special attention; the
generation functions included above do the raw handling. If you
- add to this list, modify special_rtx in gengenrtl.c as well. You
- should also modify gen_rtx to use the special function. */
+ add to this list, modify special_rtx in gengenrtl.c as well. */
extern rtx gen_rtx_CONST_INT (enum machine_mode, HOST_WIDE_INT);
extern rtx gen_rtx_CONST_VECTOR (enum machine_mode, rtvec);
Index: doc/md.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.87
diff -u -r1.87 md.texi
--- doc/md.texi 3 Feb 2004 14:44:15 -0000 1.87
+++ doc/md.texi 3 Feb 2004 23:25:55 -0000
@@ -4625,7 +4625,7 @@
"FP_REG_P (operands[0]) && ! FP_REG_P (operands[1])"
@{
rtx xoperands[2];
- xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1);
+ xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
#ifdef MOTOROLA
output_asm_insn ("move.l %1,(sp)", xoperands);
output_asm_insn ("move.l %1,-(sp)", operands);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 5:16 [patch] emit-rtl.c: Remove gen_rtx() Kazu Hirata
@ 2004-02-04 6:02 ` Richard Henderson
2004-02-21 13:45 ` Richard Henderson
2004-02-04 7:04 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
2 siblings, 1 reply; 14+ messages in thread
From: Richard Henderson @ 2004-02-04 6:02 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
On Wed, Feb 04, 2004 at 12:16:21AM -0500, Kazu Hirata wrote:
> * emit-rtl.c (gen_rtx): Remove.
> * genattrtab.c: Don't mention gen_rtx in a comment.
> * rtl.h: Remove the prototype for gen_rtx.
> * doc/md.texi: Replace gen_rtx with gen_rtx_REG.
Ok. Yaye!
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 5:16 [patch] emit-rtl.c: Remove gen_rtx() Kazu Hirata
2004-02-04 6:02 ` Richard Henderson
@ 2004-02-04 7:04 ` Zack Weinberg
2004-02-04 22:48 ` Kazu Hirata
2004-02-21 13:45 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
2 siblings, 2 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-02-04 7:04 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
Kazu Hirata <kazu@cs.umass.edu> writes:
> Hi,
>
> Attached is a patch to remove gen_rtx() as the only references to it
> are in comments.
>
> Bootstrapped on i686-pc-linux-gnu (on top of my obsolete-port-removal
> patch). OK to apply?
RTH already approved this and I don't object, but I'd like to point
out that the comment at the top of the file is not very accurate
anymore -- not that it really was before, either. There's rather a
lot more in emit-rtl.c than just gen_label_rtx and gen_reg_rtx, and
they aren't the "usual ways of creating rtl expressions for most
purposes."
zw
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 7:04 ` Zack Weinberg
@ 2004-02-04 22:48 ` Kazu Hirata
2004-02-04 23:13 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
2004-02-21 13:45 ` Zack Weinberg
1 sibling, 2 replies; 14+ messages in thread
From: Kazu Hirata @ 2004-02-04 22:48 UTC (permalink / raw)
To: zack; +Cc: gcc-patches
Hi Zack,
> I'd like to point out that the comment at the top of the file is not
> very accurate anymore
I looked at the list of functions in emit-rtl.c. Thare are some
oddballs like predicates (*_p) that should be in some other place like
rtlanal.c, but all boiled down to two lines.
OK to apply? Any better wording?
Kazu Hirata
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c: Update the comment about the file.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.375
diff -u -r1.375 emit-rtl.c
--- emit-rtl.c 4 Feb 2004 06:12:50 -0000 1.375
+++ emit-rtl.c 4 Feb 2004 22:38:54 -0000
@@ -22,12 +22,8 @@
/* Middle-to-low level generation of rtx code and insns.
- This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
- that are the usual ways of creating rtl expressions for most
- purposes.
-
- It also has the functions for creating insns and linking
- them in the doubly-linked chain.
+ This file contains support functions for creating rtl expressions
+ and manipulating them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 22:48 ` Kazu Hirata
@ 2004-02-04 23:13 ` Zack Weinberg
2004-02-05 14:18 ` Kazu Hirata
2004-02-21 13:45 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
1 sibling, 2 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-02-04 23:13 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
Kazu Hirata <kazu@cs.umass.edu> writes:
> I looked at the list of functions in emit-rtl.c. Thare are some
> oddballs like predicates (*_p) that should be in some other place like
> rtlanal.c, but all boiled down to two lines.
>
> OK to apply? Any better wording?
Make that "doubly-linked chain of insns" and it's OK. I think the
next paragraph needs a little work too (gen_rtx_fmt_* are what
insn-emit.c mostly uses, but they're not in this file).
zw
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 23:13 ` Zack Weinberg
@ 2004-02-05 14:18 ` Kazu Hirata
2004-02-05 20:01 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
2004-02-21 13:45 ` Zack Weinberg
1 sibling, 2 replies; 14+ messages in thread
From: Kazu Hirata @ 2004-02-05 14:18 UTC (permalink / raw)
To: zack; +Cc: gcc-patches
Hi Zack,
> Make that "doubly-linked chain of insns" and it's OK. I think the
> next paragraph needs a little work too (gen_rtx_fmt_* are what
> insn-emit.c mostly uses, but they're not in this file).
Here is the final patch that I committed.
Kazu Hirata
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c: Update the comment about the file.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.375
diff -c -r1.375 emit-rtl.c
*** emit-rtl.c 4 Feb 2004 06:12:50 -0000 1.375
--- emit-rtl.c 5 Feb 2004 14:12:19 -0000
***************
*** 22,38 ****
/* Middle-to-low level generation of rtx code and insns.
! This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
! that are the usual ways of creating rtl expressions for most
! purposes.
!
! It also has the functions for creating insns and linking
! them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
! the machine description. These routines use `gen_rtx_fmt_ee' and
! others to make the individual rtx's of the pattern; what is machine
dependent is the kind of rtx's they make and what arguments they
use. */
--- 22,35 ----
/* Middle-to-low level generation of rtx code and insns.
! This file contains support functions for creating rtl expressions
! and manipulating them in the doubly-linked chain of insns.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
! the machine description. These routines make the individual rtx's
! of the pattern with `gen_rtx_fmt_ee' and others in genrtl.[ch],
! which are automatically generated from rtl.def; what is machine
dependent is the kind of rtx's they make and what arguments they
use. */
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-05 14:18 ` Kazu Hirata
@ 2004-02-05 20:01 ` Zack Weinberg
2004-02-21 13:45 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
1 sibling, 1 reply; 14+ messages in thread
From: Zack Weinberg @ 2004-02-05 20:01 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
Kazu Hirata <kazu@cs.umass.edu> writes:
> Hi Zack,
>
>> Make that "doubly-linked chain of insns" and it's OK. I think the
>> next paragraph needs a little work too (gen_rtx_fmt_* are what
>> insn-emit.c mostly uses, but they're not in this file).
>
> Here is the final patch that I committed.
Looks good, thanks.
zw
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 7:04 ` Zack Weinberg
2004-02-04 22:48 ` Kazu Hirata
@ 2004-02-21 13:45 ` Zack Weinberg
1 sibling, 0 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-02-21 13:45 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
Kazu Hirata <kazu@cs.umass.edu> writes:
> Hi,
>
> Attached is a patch to remove gen_rtx() as the only references to it
> are in comments.
>
> Bootstrapped on i686-pc-linux-gnu (on top of my obsolete-port-removal
> patch). OK to apply?
RTH already approved this and I don't object, but I'd like to point
out that the comment at the top of the file is not very accurate
anymore -- not that it really was before, either. There's rather a
lot more in emit-rtl.c than just gen_label_rtx and gen_reg_rtx, and
they aren't the "usual ways of creating rtl expressions for most
purposes."
zw
^ permalink raw reply [flat|nested] 14+ messages in thread
* [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 5:16 [patch] emit-rtl.c: Remove gen_rtx() Kazu Hirata
2004-02-04 6:02 ` Richard Henderson
2004-02-04 7:04 ` Zack Weinberg
@ 2004-02-21 13:45 ` Kazu Hirata
2 siblings, 0 replies; 14+ messages in thread
From: Kazu Hirata @ 2004-02-21 13:45 UTC (permalink / raw)
To: gcc-patches
Hi,
Attached is a patch to remove gen_rtx() as the only references to it
are in comments.
Bootstrapped on i686-pc-linux-gnu (on top of my obsolete-port-removal
patch). OK to apply?
Kazu Hirata
2004-02-03 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c (gen_rtx): Remove.
* genattrtab.c: Don't mention gen_rtx in a comment.
* rtl.h: Remove the prototype for gen_rtx.
* doc/md.texi: Replace gen_rtx with gen_rtx_REG.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.374
diff -u -r1.374 emit-rtl.c
--- emit-rtl.c 3 Feb 2004 05:15:36 -0000 1.374
+++ emit-rtl.c 3 Feb 2004 23:25:17 -0000
@@ -22,18 +22,19 @@
/* Middle-to-low level generation of rtx code and insns.
- This file contains the functions `gen_rtx', `gen_reg_rtx'
- and `gen_label_rtx' that are the usual ways of creating rtl
- expressions for most purposes.
+ This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
+ that are the usual ways of creating rtl expressions for most
+ purposes.
It also has the functions for creating insns and linking
them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
- the machine description. These routines use `gen_rtx' to make
- the individual rtx's of the pattern; what is machine dependent
- is the kind of rtx's they make and what arguments they use. */
+ the machine description. These routines use `gen_rtx_fmt_ee' and
+ others to make the individual rtx's of the pattern; what is machine
+ dependent is the kind of rtx's they make and what arguments they
+ use. */
#include "config.h"
#include "system.h"
@@ -645,119 +646,6 @@
subreg_lowpart_offset (mode, inmode));
}
\f
-/* rtx gen_rtx (code, mode, [element1, ..., elementn])
-**
-** This routine generates an RTX of the size specified by
-** <code>, which is an RTX code. The RTX structure is initialized
-** from the arguments <element1> through <elementn>, which are
-** interpreted according to the specific RTX type's format. The
-** special machine mode associated with the rtx (if any) is specified
-** in <mode>.
-**
-** gen_rtx can be invoked in a way which resembles the lisp-like
-** rtx it will generate. For example, the following rtx structure:
-**
-** (plus:QI (mem:QI (reg:SI 1))
-** (mem:QI (plusw:SI (reg:SI 2) (reg:SI 3))))
-**
-** ...would be generated by the following C code:
-**
-** gen_rtx_PLUS (QImode,
-** gen_rtx_MEM (QImode,
-** gen_rtx_REG (SImode, 1)),
-** gen_rtx_MEM (QImode,
-** gen_rtx_PLUS (SImode,
-** gen_rtx_REG (SImode, 2),
-** gen_rtx_REG (SImode, 3)))),
-*/
-
-/*VARARGS2*/
-rtx
-gen_rtx (enum rtx_code code, enum machine_mode mode, ...)
-{
- int i; /* Array indices... */
- const char *fmt; /* Current rtx's format... */
- rtx rt_val; /* RTX to return to caller... */
- va_list p;
-
- va_start (p, mode);
-
- switch (code)
- {
- case CONST_INT:
- rt_val = gen_rtx_CONST_INT (mode, va_arg (p, HOST_WIDE_INT));
- break;
-
- case CONST_DOUBLE:
- {
- HOST_WIDE_INT arg0 = va_arg (p, HOST_WIDE_INT);
- HOST_WIDE_INT arg1 = va_arg (p, HOST_WIDE_INT);
-
- rt_val = immed_double_const (arg0, arg1, mode);
- }
- break;
-
- case REG:
- rt_val = gen_rtx_REG (mode, va_arg (p, int));
- break;
-
- case MEM:
- rt_val = gen_rtx_MEM (mode, va_arg (p, rtx));
- break;
-
- default:
- rt_val = rtx_alloc (code); /* Allocate the storage space. */
- rt_val->mode = mode; /* Store the machine mode... */
-
- fmt = GET_RTX_FORMAT (code); /* Find the right format... */
- for (i = 0; i < GET_RTX_LENGTH (code); i++)
- {
- switch (*fmt++)
- {
- case '0': /* Field with unknown use. Zero it. */
- X0EXP (rt_val, i) = NULL_RTX;
- break;
-
- case 'i': /* An integer? */
- XINT (rt_val, i) = va_arg (p, int);
- break;
-
- case 'w': /* A wide integer? */
- XWINT (rt_val, i) = va_arg (p, HOST_WIDE_INT);
- break;
-
- case 's': /* A string? */
- XSTR (rt_val, i) = va_arg (p, char *);
- break;
-
- case 'e': /* An expression? */
- case 'u': /* An insn? Same except when printing. */
- XEXP (rt_val, i) = va_arg (p, rtx);
- break;
-
- case 'E': /* An RTX vector? */
- XVEC (rt_val, i) = va_arg (p, rtvec);
- break;
-
- case 'b': /* A bitmap? */
- XBITMAP (rt_val, i) = va_arg (p, bitmap);
- break;
-
- case 't': /* A tree? */
- XTREE (rt_val, i) = va_arg (p, tree);
- break;
-
- default:
- abort ();
- }
- }
- break;
- }
-
- va_end (p);
- return rt_val;
-}
-
/* gen_rtvec (n, [rt1, ..., rtn])
**
** This routine creates an rtvec and stores within it the
@@ -5389,7 +5277,7 @@
/* Create the unique rtx's for certain rtx codes and operand values. */
- /* Don't use gen_rtx here since gen_rtx in this case
+ /* Don't use gen_rtx_CONST_INT here since gen_rtx_CONST_INT in this case
tries to use these variables. */
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
Index: genattrtab.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genattrtab.c,v
retrieving revision 1.141
diff -u -r1.141 genattrtab.c
--- genattrtab.c 21 Jan 2004 20:39:54 -0000 1.141
+++ genattrtab.c 3 Feb 2004 23:25:19 -0000
@@ -549,7 +549,7 @@
In some cases we cannot uniquify; then we return an ordinary
impermanent rtx with ATTR_PERMANENT_P clear.
- Args are like gen_rtx, but without the mode:
+ Args are as follows:
rtx attr_rtx (code, [element1, ..., elementn]) */
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.453
diff -u -r1.453 rtl.h
--- rtl.h 31 Jan 2004 09:21:18 -0000 1.453
+++ rtl.h 3 Feb 2004 23:25:21 -0000
@@ -1445,7 +1445,6 @@
extern void optimize_save_area_alloca (rtx);
/* In emit-rtl.c */
-extern rtx gen_rtx (enum rtx_code, enum machine_mode, ...);
extern rtvec gen_rtvec (int, ...);
extern rtx copy_insn_1 (rtx);
extern rtx copy_insn (rtx);
@@ -1874,8 +1873,7 @@
/* There are some RTL codes that require special attention; the
generation functions included above do the raw handling. If you
- add to this list, modify special_rtx in gengenrtl.c as well. You
- should also modify gen_rtx to use the special function. */
+ add to this list, modify special_rtx in gengenrtl.c as well. */
extern rtx gen_rtx_CONST_INT (enum machine_mode, HOST_WIDE_INT);
extern rtx gen_rtx_CONST_VECTOR (enum machine_mode, rtvec);
Index: doc/md.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/md.texi,v
retrieving revision 1.87
diff -u -r1.87 md.texi
--- doc/md.texi 3 Feb 2004 14:44:15 -0000 1.87
+++ doc/md.texi 3 Feb 2004 23:25:55 -0000
@@ -4625,7 +4625,7 @@
"FP_REG_P (operands[0]) && ! FP_REG_P (operands[1])"
@{
rtx xoperands[2];
- xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1);
+ xoperands[1] = gen_rtx_REG (SImode, REGNO (operands[1]) + 1);
#ifdef MOTOROLA
output_asm_insn ("move.l %1,(sp)", xoperands);
output_asm_insn ("move.l %1,-(sp)", operands);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 23:13 ` Zack Weinberg
2004-02-05 14:18 ` Kazu Hirata
@ 2004-02-21 13:45 ` Zack Weinberg
1 sibling, 0 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-02-21 13:45 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
Kazu Hirata <kazu@cs.umass.edu> writes:
> I looked at the list of functions in emit-rtl.c. Thare are some
> oddballs like predicates (*_p) that should be in some other place like
> rtlanal.c, but all boiled down to two lines.
>
> OK to apply? Any better wording?
Make that "doubly-linked chain of insns" and it's OK. I think the
next paragraph needs a little work too (gen_rtx_fmt_* are what
insn-emit.c mostly uses, but they're not in this file).
zw
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 6:02 ` Richard Henderson
@ 2004-02-21 13:45 ` Richard Henderson
0 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2004-02-21 13:45 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
On Wed, Feb 04, 2004 at 12:16:21AM -0500, Kazu Hirata wrote:
> * emit-rtl.c (gen_rtx): Remove.
> * genattrtab.c: Don't mention gen_rtx in a comment.
> * rtl.h: Remove the prototype for gen_rtx.
> * doc/md.texi: Replace gen_rtx with gen_rtx_REG.
Ok. Yaye!
r~
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-04 22:48 ` Kazu Hirata
2004-02-04 23:13 ` Zack Weinberg
@ 2004-02-21 13:45 ` Kazu Hirata
1 sibling, 0 replies; 14+ messages in thread
From: Kazu Hirata @ 2004-02-21 13:45 UTC (permalink / raw)
To: zack; +Cc: gcc-patches
Hi Zack,
> I'd like to point out that the comment at the top of the file is not
> very accurate anymore
I looked at the list of functions in emit-rtl.c. Thare are some
oddballs like predicates (*_p) that should be in some other place like
rtlanal.c, but all boiled down to two lines.
OK to apply? Any better wording?
Kazu Hirata
2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c: Update the comment about the file.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.375
diff -u -r1.375 emit-rtl.c
--- emit-rtl.c 4 Feb 2004 06:12:50 -0000 1.375
+++ emit-rtl.c 4 Feb 2004 22:38:54 -0000
@@ -22,12 +22,8 @@
/* Middle-to-low level generation of rtx code and insns.
- This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
- that are the usual ways of creating rtl expressions for most
- purposes.
-
- It also has the functions for creating insns and linking
- them in the doubly-linked chain.
+ This file contains support functions for creating rtl expressions
+ and manipulating them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-05 20:01 ` Zack Weinberg
@ 2004-02-21 13:45 ` Zack Weinberg
0 siblings, 0 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-02-21 13:45 UTC (permalink / raw)
To: Kazu Hirata; +Cc: gcc-patches
Kazu Hirata <kazu@cs.umass.edu> writes:
> Hi Zack,
>
>> Make that "doubly-linked chain of insns" and it's OK. I think the
>> next paragraph needs a little work too (gen_rtx_fmt_* are what
>> insn-emit.c mostly uses, but they're not in this file).
>
> Here is the final patch that I committed.
Looks good, thanks.
zw
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [patch] emit-rtl.c: Remove gen_rtx().
2004-02-05 14:18 ` Kazu Hirata
2004-02-05 20:01 ` Zack Weinberg
@ 2004-02-21 13:45 ` Kazu Hirata
1 sibling, 0 replies; 14+ messages in thread
From: Kazu Hirata @ 2004-02-21 13:45 UTC (permalink / raw)
To: zack; +Cc: gcc-patches
Hi Zack,
> Make that "doubly-linked chain of insns" and it's OK. I think the
> next paragraph needs a little work too (gen_rtx_fmt_* are what
> insn-emit.c mostly uses, but they're not in this file).
Here is the final patch that I committed.
Kazu Hirata
2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
* emit-rtl.c: Update the comment about the file.
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.375
diff -c -r1.375 emit-rtl.c
*** emit-rtl.c 4 Feb 2004 06:12:50 -0000 1.375
--- emit-rtl.c 5 Feb 2004 14:12:19 -0000
***************
*** 22,38 ****
/* Middle-to-low level generation of rtx code and insns.
! This file contains the functions `gen_reg_rtx' and `gen_label_rtx'
! that are the usual ways of creating rtl expressions for most
! purposes.
!
! It also has the functions for creating insns and linking
! them in the doubly-linked chain.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
! the machine description. These routines use `gen_rtx_fmt_ee' and
! others to make the individual rtx's of the pattern; what is machine
dependent is the kind of rtx's they make and what arguments they
use. */
--- 22,35 ----
/* Middle-to-low level generation of rtx code and insns.
! This file contains support functions for creating rtl expressions
! and manipulating them in the doubly-linked chain of insns.
The patterns of the insns are created by machine-dependent
routines in insn-emit.c, which is generated automatically from
! the machine description. These routines make the individual rtx's
! of the pattern with `gen_rtx_fmt_ee' and others in genrtl.[ch],
! which are automatically generated from rtl.def; what is machine
dependent is the kind of rtx's they make and what arguments they
use. */
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-02-05 20:01 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-04 5:16 [patch] emit-rtl.c: Remove gen_rtx() Kazu Hirata
2004-02-04 6:02 ` Richard Henderson
2004-02-21 13:45 ` Richard Henderson
2004-02-04 7:04 ` Zack Weinberg
2004-02-04 22:48 ` Kazu Hirata
2004-02-04 23:13 ` Zack Weinberg
2004-02-05 14:18 ` Kazu Hirata
2004-02-05 20:01 ` Zack Weinberg
2004-02-21 13:45 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
2004-02-21 13:45 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
2004-02-21 13:45 ` Zack Weinberg
2004-02-21 13:45 ` Kazu Hirata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).