From: Jeffrey A Law Date: Mon, 19 Feb 2001 00:05:49 +0000 (+0000) Subject: Makefile.in (rtlanal.o): Depend on hard-reg-set.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3335f1d984358b093678719844d52027ec5d01e1;p=gcc.git Makefile.in (rtlanal.o): Depend on hard-reg-set.h. * Makefile.in (rtlanal.o): Depend on hard-reg-set.h. ($HOST_PREFIX_1)rtlanal.o: Remove rules for building (mostlyclean): Corresponding changes. * rtlanal.c (hard-reg-set.h): Include. (rtx_unstable_p): Do not treat the argument pointer specially if it is not a fixed register. (rtx_varies_p, rtx_addr_can_trap_p): Similarly. From-SVN: r39860 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 571a1ca299b..8b64e261cad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +Sun Feb 18 17:05:50 2001 Jeffrey A Law (law@cygnus.com) + + * Makefile.in (rtlanal.o): Depend on hard-reg-set.h. + ($HOST_PREFIX_1)rtlanal.o: Remove rules for building + (mostlyclean): Corresponding changes. + * rtlanal.c (hard-reg-set.h): Include. + (rtx_unstable_p): Do not treat the argument pointer specially + if it is not a fixed register. + (rtx_varies_p, rtx_addr_can_trap_p): Similarly. + Sun Feb 18 15:45:17 2001 Richard Kenner * sibcall.c (optimize_sibling_and_tail_recursive_call): Compare diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 671107bc912..b71ca649bca 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1352,7 +1352,7 @@ rtl.o : rtl.c $(GCONFIG_H) system.h $(RTL_H) bitmap.h $(GGC_H) toplev.h print-rtl.o : print-rtl.c $(GCONFIG_H) system.h $(RTL_H) hard-reg-set.h \ $(BASIC_BLOCK_H) $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) -rtlanal.o : rtlanal.c $(CONFIG_H) system.h toplev.h $(RTL_H) +rtlanal.o : rtlanal.c $(CONFIG_H) system.h toplev.h $(RTL_H) hard-reg-set.h errors.o : errors.c $(GCONFIG_H) system.h errors.h $(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) @@ -1832,11 +1832,6 @@ $(HOST_PREFIX_1)bitmap.o: $(srcdir)/bitmap.c $(CONFIG_H) system.h $(RTL_H) \ sed -e 's/config[.]h/hconfig.h/' $(srcdir)/bitmap.c > $(HOST_PREFIX)bitmap.c $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)bitmap.c -$(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) system.h $(RTL_H) - rm -f $(HOST_PREFIX)rtlanal.c - sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c - $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c - $(HOST_PREFIX_1)alloca.o: $(srcdir)/../libiberty/alloca.c rm -f $(HOST_PREFIX)alloca.c $(LN_S) $(srcdir)/../libiberty/alloca.c $(HOST_PREFIX)alloca.c @@ -2292,7 +2287,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean -rm -f $(STAGESTUFF) -rm -rf libgcc # Delete the temporary source copies for cross compilation. - -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c + -rm -f $(HOST_PREFIX_1)rtl.c -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c -rm -f $(HOST_PREFIX_1)obstack.c # Delete the temp files made in the course of building libgcc.a. diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 5dc2af586a3..6e6ed8e7b2b 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #include "system.h" #include "toplev.h" #include "rtl.h" +#include "hard-reg-set.h" /* Forward declarations */ static void set_of_1 PARAMS ((rtx, rtx, void *)); @@ -67,7 +68,9 @@ rtx_unstable_p (x) case REG: /* As in rtx_varies_p, we have to use the actual rtx, not reg number. */ if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx - || x == arg_pointer_rtx || RTX_UNCHANGING_P (x)) + /* The arg pointer varies if it is not a fixed register. */ + || (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM]) + || RTX_UNCHANGING_P (x)) return 0; #ifndef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED /* ??? When call-clobbered, the value is stable modulo the restore @@ -143,7 +146,8 @@ rtx_varies_p (x, for_alias) eliminated the frame and/or arg pointer and are using it for pseudos. */ if (x == frame_pointer_rtx || x == hard_frame_pointer_rtx - || x == arg_pointer_rtx) + /* The arg pointer varies if it is not a fixed register. */ + || (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM])) return 0; if (x == pic_offset_table_rtx #ifdef PIC_OFFSET_TABLE_REG_CALL_CLOBBERED @@ -211,7 +215,9 @@ rtx_addr_can_trap_p (x) case REG: /* As in rtx_varies_p, we have to use the actual rtx, not reg number. */ return ! (x == frame_pointer_rtx || x == hard_frame_pointer_rtx - || x == stack_pointer_rtx || x == arg_pointer_rtx); + || x == stack_pointer_rtx + /* The arg pointer varies if it is not a fixed register. */ + || (x == arg_pointer_rtx && fixed_regs[ARG_POINTER_REGNUM])); case CONST: return rtx_addr_can_trap_p (XEXP (x, 0));