diff options
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c index 53a4992f482..aefbbf347d9 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -164,6 +164,20 @@ rtvec_alloc (int n) return rt; } +/* Create a bitwise copy of VEC. */ + +rtvec +shallow_copy_rtvec (rtvec vec) +{ + rtvec newvec; + int n; + + n = GET_NUM_ELEM (vec); + newvec = rtvec_alloc (n); + memcpy (&newvec->elem[0], &vec->elem[0], sizeof (rtx) * n); + return newvec; +} + /* Return the number of bytes occupied by rtx value X. */ unsigned int |