From f8fe0a4a8e1df13c21dd0f394740582a4d264f03 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 20 Aug 2010 12:14:38 +0100 Subject: tm.texi.in (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED): Document to be zero or nonzero. 2010-08-20 Joseph Myers gcc/ * doc/tm.texi.in (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED): Document to be zero or nonzero. * doc/tm.texi: Regenerate. * defaults.h (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED): Define. * df-scan.c (df_get_exit_block_use_set), reginfo.c (init_reg_sets_1), rtlanal.c (rtx_unstable_p, rtx_varies_p): Handle new PIC_OFFSET_TABLE_REG_CALL_CLOBBERED semantics. * config/ia64/ia64.h (PIC_OFFSET_TABLE_REG_CALL_CLOBBERED): Define to 1. From-SVN: r163399 --- gcc/rtlanal.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'gcc/rtlanal.c') diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index f9e6871..4331f41 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -118,13 +118,11 @@ rtx_unstable_p (const_rtx x) /* The arg pointer varies if it is not a fixed register. */ || (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM])) return 0; -#ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED /* ??? When call-clobbered, the value is stable modulo the restore that must happen after a call. This currently screws up local-alloc into believing that the restore is not needed. */ - if (x == pic_offset_table_rtx) + if (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED && x == pic_offset_table_rtx) return 0; -#endif return 1; case ASM_OPERANDS: @@ -197,14 +195,11 @@ rtx_varies_p (const_rtx x, bool for_alias) || (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM])) return 0; if (x == pic_offset_table_rtx -#ifdef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED /* ??? When call-clobbered, the value is stable modulo the restore that must happen after a call. This currently screws up local-alloc into believing that the restore is not needed, so we must return 0 only if we are called from alias analysis. */ - && for_alias -#endif - ) + && (!PIC_OFFSET_TABLE_REG_CALL_CLOBBERED || for_alias)) return 0; return 1; -- cgit v1.1