diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 22:25:29 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-05 22:25:29 +0000 |
commit | 7deddfded2d013c07a639873a4c90bfed40fd03e (patch) | |
tree | 3df2a52207fec5bec55c28303aa57a8bd9b4e620 /gcc/emit-rtl.c | |
parent | c79b54af83c8031caac515081fb7c56a127b90e3 (diff) | |
download | gcc-7deddfded2d013c07a639873a4c90bfed40fd03e.tar.gz |
2010-11-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 166377
2010-11-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 166377
* gcc/Makefile.in (MELT_RAW_CFLAGS): removed LIBELFINC
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@166380 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 82 |
1 files changed, 17 insertions, 65 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 19d290c4b2c..60fe39b1ebf 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -603,6 +603,7 @@ gen_rtx_REG (enum machine_mode mode, unsigned int regno) return return_address_pointer_rtx; #endif if (regno == (unsigned) PIC_OFFSET_TABLE_REGNUM + && PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM && fixed_regs[PIC_OFFSET_TABLE_REGNUM]) return pic_offset_table_rtx; if (regno == STACK_POINTER_REGNUM) @@ -2728,11 +2729,10 @@ repeat: return; } -/* Clear all the USED bits in X to allow copy_rtx_if_shared to be used - to look for shared sub-parts. */ +/* Set the USED bit in X and its non-shareable subparts to FLAG. */ -void -reset_used_flags (rtx x) +static void +mark_used_flags (rtx x, int flag) { int i, j; enum rtx_code code; @@ -2778,7 +2778,7 @@ repeat: break; } - RTX_FLAG (x, used) = 0; + RTX_FLAG (x, used) = flag; format_ptr = GET_RTX_FORMAT (code); length = GET_RTX_LENGTH (code); @@ -2793,81 +2793,33 @@ repeat: x = XEXP (x, i); goto repeat; } - reset_used_flags (XEXP (x, i)); + mark_used_flags (XEXP (x, i), flag); break; case 'E': for (j = 0; j < XVECLEN (x, i); j++) - reset_used_flags (XVECEXP (x, i, j)); + mark_used_flags (XVECEXP (x, i, j), flag); break; } } } -/* Set all the USED bits in X to allow copy_rtx_if_shared to be used +/* Clear all the USED bits in X to allow copy_rtx_if_shared to be used to look for shared sub-parts. */ void -set_used_flags (rtx x) +reset_used_flags (rtx x) { - int i, j; - enum rtx_code code; - const char *format_ptr; - - if (x == 0) - return; - - code = GET_CODE (x); - - /* These types may be freely shared so we needn't do any resetting - for them. */ - - switch (code) - { - case REG: - case DEBUG_EXPR: - case VALUE: - case CONST_INT: - case CONST_DOUBLE: - case CONST_FIXED: - case CONST_VECTOR: - case SYMBOL_REF: - case CODE_LABEL: - case PC: - case CC0: - return; - - case DEBUG_INSN: - case INSN: - case JUMP_INSN: - case CALL_INSN: - case NOTE: - case LABEL_REF: - case BARRIER: - /* The chain of insns is not being copied. */ - return; - - default: - break; - } - - RTX_FLAG (x, used) = 1; + mark_used_flags (x, 0); +} - format_ptr = GET_RTX_FORMAT (code); - for (i = 0; i < GET_RTX_LENGTH (code); i++) - { - switch (*format_ptr++) - { - case 'e': - set_used_flags (XEXP (x, i)); - break; +/* Set all the USED bits in X to allow copy_rtx_if_shared to be used + to look for shared sub-parts. */ - case 'E': - for (j = 0; j < XVECLEN (x, i); j++) - set_used_flags (XVECEXP (x, i, j)); - break; - } - } +void +set_used_flags (rtx x) +{ + mark_used_flags (x, 1); } /* Copy X if necessary so that it won't be altered by changes in OTHER. |