+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.
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. */
/* 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;
{
#include "sched-int.h"
#include "params.h"
#include "cselib.h"
+#include "df.h"
extern char *reg_known_equiv_p;
extern rtx *reg_known_value;
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. */