Commit 7fcd7218 by Jan Hubicka Committed by Jan Hubicka

gcse.c (try_replace_reg): Copy RTX before creating note.

	* gcse.c (try_replace_reg): Copy RTX before creating note.

	* df.h (df_ref_flags): New uenum.
	(DF_REF_FLAGS): New macro.
	(struct ref): Add field "flags".
	* df.c (HANDLE_SUBREG): Remove.
	(df_ref_create): Likewise; set flags field of ref.
	(df_def_record_1): Strip down read_write subreg; remove
	commented out code; set READ_WRITE flag.
	(read_modify_subreg_p): New static function.
	(df_uses_record): Cleanup SET handling; set READ_WRITE flag;
	new argument "flags".
	(df_insn_refs_record): Update call of df_uses_record.
	(df_insn_modify): Avoid #if 0 around comment.
	(df_dump): Dump the read/write flag.

	* predict.c (propagate_freq): Make cyclic_probability and frequency
	volatile

	* i386.c (ix86_cc_mode): Accept USE.

	* cfgrtl.c (purge_dead_edges):  Cleanup EDGE_ABNORMAL flag if computed
	jump is turned into simplejump.

From-SVN: r47175
parent f83fd9ae
Mon Nov 19 18:06:21 CET 2001 Jan Hubicka <jh@suse.cz>
* gcse.c (try_replace_reg): Copy RTX before creating note.
* df.h (df_ref_flags): New uenum.
(DF_REF_FLAGS): New macro.
(struct ref): Add field "flags".
* df.c (HANDLE_SUBREG): Remove.
(df_ref_create): Likewise; set flags field of ref.
(df_def_record_1): Strip down read_write subreg; remove
commented out code; set READ_WRITE flag.
(read_modify_subreg_p): New static function.
(df_uses_record): Cleanup SET handling; set READ_WRITE flag;
new argument "flags".
(df_insn_refs_record): Update call of df_uses_record.
(df_insn_modify): Avoid #if 0 around comment.
(df_dump): Dump the read/write flag.
* predict.c (propagate_freq): Make cyclic_probability and frequency
volatile
* i386.c (ix86_cc_mode): Accept USE.
* cfgrtl.c (purge_dead_edges): Cleanup EDGE_ABNORMAL flag if computed
jump is turned into simplejump.
2001-11-19 Joseph S. Myers <jsm28@cam.ac.uk> 2001-11-19 Joseph S. Myers <jsm28@cam.ac.uk>
* doc/fragments.texi, doc/trouble.texi: Remove links to old * doc/fragments.texi, doc/trouble.texi: Remove links to old
......
...@@ -1837,6 +1837,11 @@ purge_dead_edges (bb) ...@@ -1837,6 +1837,11 @@ purge_dead_edges (bb)
{ {
next = e->succ_next; next = e->succ_next;
/* Avoid abnormal flags to leak from computed jumps turned
into simplejumps. */
e->flags &= EDGE_ABNORMAL;
/* Check purposes we can have edge. */ /* Check purposes we can have edge. */
if ((e->flags & EDGE_FALLTHRU) if ((e->flags & EDGE_FALLTHRU)
&& any_condjump_p (insn)) && any_condjump_p (insn))
......
...@@ -7099,6 +7099,10 @@ ix86_cc_mode (code, op0, op1) ...@@ -7099,6 +7099,10 @@ ix86_cc_mode (code, op0, op1)
return CCNOmode; return CCNOmode;
else else
return CCGCmode; return CCGCmode;
/* strcmp pattern do (use flags) and combine may ask us for proper
mode. */
case USE:
return CCmode;
default: default:
abort (); abort ();
} }
......
...@@ -48,6 +48,10 @@ struct df_link ...@@ -48,6 +48,10 @@ struct df_link
struct ref *ref; struct ref *ref;
}; };
enum df_ref_flags
{
DF_REF_READ_WRITE = 1
};
/* Define a register reference structure. */ /* Define a register reference structure. */
struct ref struct ref
...@@ -59,6 +63,7 @@ struct ref ...@@ -59,6 +63,7 @@ struct ref
struct df_link *chain; /* Head of def-use or use-def chain. */ struct df_link *chain; /* Head of def-use or use-def chain. */
enum df_ref_type type; /* Type of ref. */ enum df_ref_type type; /* Type of ref. */
int id; /* Ref index. */ int id; /* Ref index. */
enum df_ref_flags flags; /* Various flags. */
}; };
...@@ -177,6 +182,7 @@ struct df_map ...@@ -177,6 +182,7 @@ struct df_map
#define DF_REF_TYPE(REF) ((REF)->type) #define DF_REF_TYPE(REF) ((REF)->type)
#define DF_REF_CHAIN(REF) ((REF)->chain) #define DF_REF_CHAIN(REF) ((REF)->chain)
#define DF_REF_ID(REF) ((REF)->id) #define DF_REF_ID(REF) ((REF)->id)
#define DF_REF_FLAGS(REF) ((REF)->flags)
/* Macros to determine the reference type. */ /* Macros to determine the reference type. */
......
...@@ -3929,7 +3929,7 @@ try_replace_reg (from, to, insn) ...@@ -3929,7 +3929,7 @@ try_replace_reg (from, to, insn)
/* If we've failed to do replacement, have a single SET, and don't already /* If we've failed to do replacement, have a single SET, and don't already
have a note, add a REG_EQUAL note to not lose information. */ have a note, add a REG_EQUAL note to not lose information. */
if (!success && note == 0 && set != 0) if (!success && note == 0 && set != 0)
note = set_unique_reg_note (insn, REG_EQUAL, src); note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
/* If there is already a NOTE, update the expression in it with our /* If there is already a NOTE, update the expression in it with our
replacement. */ replacement. */
......
...@@ -602,7 +602,7 @@ expected_value_to_br_prob () ...@@ -602,7 +602,7 @@ expected_value_to_br_prob ()
typedef struct block_info_def typedef struct block_info_def
{ {
/* Estimated frequency of execution of basic_block. */ /* Estimated frequency of execution of basic_block. */
double frequency; volatile double frequency;
/* To keep queue of basic blocks to process. */ /* To keep queue of basic blocks to process. */
basic_block next; basic_block next;
...@@ -619,8 +619,11 @@ typedef struct edge_info_def ...@@ -619,8 +619,11 @@ typedef struct edge_info_def
{ {
/* In case edge is an loopback edge, the probability edge will be reached /* In case edge is an loopback edge, the probability edge will be reached
in case header is. Estimated number of iterations of the loop can be in case header is. Estimated number of iterations of the loop can be
then computed as 1 / (1 - back_edge_prob). */ then computed as 1 / (1 - back_edge_prob).
double back_edge_prob;
Volatile is needed to avoid differences in the optimized and unoptimized
builds on machines where FP registers are wider than double. */
volatile double back_edge_prob;
/* True if the edge is an loopback edge in the natural loop. */ /* True if the edge is an loopback edge in the natural loop. */
int back_edge:1; int back_edge:1;
} *edge_info; } *edge_info;
...@@ -663,7 +666,7 @@ propagate_freq (head) ...@@ -663,7 +666,7 @@ propagate_freq (head)
BLOCK_INFO (head)->frequency = 1; BLOCK_INFO (head)->frequency = 1;
for (; bb; bb = nextbb) for (; bb; bb = nextbb)
{ {
double cyclic_probability = 0, frequency = 0; volatile double cyclic_probability = 0, frequency = 0;
nextbb = BLOCK_INFO (bb)->next; nextbb = BLOCK_INFO (bb)->next;
BLOCK_INFO (bb)->next = NULL; BLOCK_INFO (bb)->next = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment