aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-09-30 14:56:33 +0000
committerIlya Leoshkevich <iii@gcc.gnu.org>2019-09-30 14:56:33 +0000
commit20fa157e674d0175f8c2717683462cdaded4d5be (patch)
tree352896fb14df54a2a599b18e2707299ae6055830 /gcc/rtl.c
parent9343bf99b5e36fa11b723aafa282fd5900a5e525 (diff)
downloadgcc-20fa157e674d0175f8c2717683462cdaded4d5be.zip
gcc-20fa157e674d0175f8c2717683462cdaded4d5be.tar.gz
gcc-20fa157e674d0175f8c2717683462cdaded4d5be.tar.bz2
Introduce rtx_alloca, alloca_raw_REG and alloca_rtx_fmt_*
When one passes short-lived fake rtxes to backends in order to test their capabilities, it might be beneficial to allocate these rtxes on stack in order to reduce the load on GC. Provide macro counterparts of some of the gen_* functions for that purpose. gcc/ChangeLog: 2019-09-30 Ilya Leoshkevich <iii@linux.ibm.com> * emit-rtl.c (init_raw_REG): New function. (gen_raw_REG): Use init_raw_REG. * gengenrtl.c (gendef): Emit init_* functions and alloca_* macros. * rtl.c (rtx_alloc_stat_v): Use rtx_init. * rtl.h (rtx_init): New function. (rtx_alloca): New function. (init_raw_REG): New function. (alloca_raw_REG): New macro. From-SVN: r276303
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index d7b8e98..0be52d3 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -219,12 +219,7 @@ rtx_alloc_stat_v (RTX_CODE code MEM_STAT_DECL, int extra)
rtx rt = ggc_alloc_rtx_def_stat (RTX_CODE_SIZE (code) + extra
PASS_MEM_STAT);
- /* We want to clear everything up to the FLD array. Normally, this
- is one int, but we don't want to assume that and it isn't very
- portable anyway; this is. */
-
- memset (rt, 0, RTX_HDR_SIZE);
- PUT_CODE (rt, code);
+ rtx_init (rt, code);
if (GATHER_STATISTICS)
{