]> gcc.gnu.org Git - gcc.git/commitdiff
df.c (read_modify_subreg_p): Change from static to global.
authorHartmut Penner <hpenner@de.ibm.com>
Tue, 11 Mar 2003 09:17:38 +0000 (09:17 +0000)
committerHartmut Penner <hpenner@gcc.gnu.org>
Tue, 11 Mar 2003 09:17:38 +0000 (09:17 +0000)
        * df.c (read_modify_subreg_p): Change from static to global.
        * df.h (read_modify_subreg_p): Add prototype.
        * sched-deps.c (sched_analyze_1): Generate true dependency for
        strict_low_part, certain subregs and zero/sign_extract.

From-SVN: r64164

gcc/ChangeLog
gcc/df.c
gcc/df.h
gcc/sched-deps.c

index 1d595301e73e438a9ec6571124eee0872525b489..5c57777d974d33bc632521806bb8040d23d26ca9 100644 (file)
@@ -1,3 +1,10 @@
+2003-03-11  Hartmut Penner  <hpenner@de.ibm.com>
+
+       * df.c (read_modify_subreg_p): Change from static to global.
+       * df.h (read_modify_subreg_p): Add prototype.
+       * sched-deps.c (sched_analyze_1): Generate true dependency for
+       strict_low_part, certain subregs and zero/sign_extract. 
+
 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
 
        * Makefile.in: Update.
index 740f2ccad1c336ebd07ea7d26c40b02ababc3b5c..4c9598566e6d7579ef4ca2ed0a1fc618f921f83b 100644 (file)
--- a/gcc/df.c
+++ b/gcc/df.c
@@ -307,7 +307,6 @@ static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *,
                                           enum df_confluence_op,
                                           transfer_function_sbitmap,
                                           sbitmap, sbitmap, void *));
-static inline bool read_modify_subreg_p PARAMS ((rtx));
 
 \f
 /* Local memory allocation/deallocation routines.  */
@@ -885,7 +884,7 @@ df_ref_record (df, reg, loc, insn, ref_type, ref_flags)
 
 /* Return non-zero if writes to paradoxical SUBREGs, or SUBREGs which
    are too narrow, are read-modify-write.  */
-static inline bool
+bool
 read_modify_subreg_p (x)
      rtx x;
 {
index a294843c6cb7a3c09b0d91f87e75ee59f50c89aa..2191ab5e9ddb6507f52ca6a0dd9686d210838967 100644 (file)
--- a/gcc/df.h
+++ b/gcc/df.h
@@ -353,3 +353,4 @@ extern void iterative_dataflow_bitmap PARAMS ((bitmap *, bitmap *, bitmap *,
                                               enum df_confluence_op, 
                                               transfer_function_bitmap, 
                                               int *, void *));
+extern bool read_modify_subreg_p PARAMS ((rtx));
index b3c619df51d613172ef54144daec6040b4fb40c9..874ebc26c7a9b85d7afd0eb622305adc8958e573 100644 (file)
@@ -42,6 +42,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "sched-int.h"
 #include "params.h"
 #include "cselib.h"
+#include "df.h"
 
 extern char *reg_known_equiv_p;
 extern rtx *reg_known_value;
@@ -468,6 +469,19 @@ sched_analyze_1 (deps, x, insn)
   while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SUBREG
         || GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
     {
+      if (GET_CODE (dest) == STRICT_LOW_PART
+        || GET_CODE (dest) == ZERO_EXTRACT
+        || GET_CODE (dest) == SIGN_EXTRACT
+        || read_modify_subreg_p (dest))
+        {
+         /* These both read and modify the result.  We must handle 
+             them as writes to get proper dependencies for following
+             instructions.  We must handle them as reads to get proper
+             dependencies from this to previous instructions.
+             Thus we need to call sched_analyze_2. */
+
+         sched_analyze_2 (deps, XEXP (dest, 0), insn);  
+       }
       if (GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
        {
          /* The second and third arguments are values read by this insn.  */
This page took 0.09923 seconds and 5 git commands to generate.