df.c (read_modify_subreg_p): Change from static to global.

* 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
This commit is contained in:
Hartmut Penner 2003-03-11 09:17:38 +00:00 committed by Hartmut Penner
parent b0649028b4
commit 37bd08f8df
4 changed files with 23 additions and 2 deletions

View 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> 2003-03-11 Neil Booth <neil@daikokuya.co.uk>
* Makefile.in: Update. * Makefile.in: Update.

View File

@ -307,7 +307,6 @@ static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *,
enum df_confluence_op, enum df_confluence_op,
transfer_function_sbitmap, transfer_function_sbitmap,
sbitmap, sbitmap, void *)); sbitmap, sbitmap, void *));
static inline bool read_modify_subreg_p PARAMS ((rtx));
/* Local memory allocation/deallocation routines. */ /* 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 /* Return non-zero if writes to paradoxical SUBREGs, or SUBREGs which
are too narrow, are read-modify-write. */ are too narrow, are read-modify-write. */
static inline bool bool
read_modify_subreg_p (x) read_modify_subreg_p (x)
rtx x; rtx x;
{ {

View File

@ -353,3 +353,4 @@ extern void iterative_dataflow_bitmap PARAMS ((bitmap *, bitmap *, bitmap *,
enum df_confluence_op, enum df_confluence_op,
transfer_function_bitmap, transfer_function_bitmap,
int *, void *)); int *, void *));
extern bool read_modify_subreg_p PARAMS ((rtx));

View File

@ -42,6 +42,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "sched-int.h" #include "sched-int.h"
#include "params.h" #include "params.h"
#include "cselib.h" #include "cselib.h"
#include "df.h"
extern char *reg_known_equiv_p; extern char *reg_known_equiv_p;
extern rtx *reg_known_value; 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 while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SUBREG
|| GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT) || 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) if (GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
{ {
/* The second and third arguments are values read by this insn. */ /* The second and third arguments are values read by this insn. */