summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-16 16:23:40 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-16 16:23:40 +0000
commit136971db016bde28c2ef9471a40c5dd3083c66da (patch)
treefe9d83649fcc4a227ca081ec6707d857d59492bd /gcc
parentf5ffc7342413e70c6e1402fc2ae88ab580ac6bb2 (diff)
downloadgcc-136971db016bde28c2ef9471a40c5dd3083c66da.tar.gz
* ssa-ccp.c: (optimize_unexecutable_edges): Add note about removal
of edge, and removal of phi alternative to dump file. (ssa_ccp_substitute_constants): Add note about register now being constant, and which uses were replaced in what insns to dump file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44042 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ssa-ccp.c34
2 files changed, 33 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c5dd275ed53..e22f06fcae4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2001-07-16 Daniel Berlin <dan@cgsoftware.com>
+
+ * ssa-ccp.c: (optimize_unexecutable_edges): Add note about removal
+ of edge, and removal of phi alternative to dump file.
+ (ssa_ccp_substitute_constants): Add note about register now being
+ constant, and which uses were replaced in what insns to dump file.
+
2001-07-16 Andreas Jaeger <aj@suse.de>
* gcov.c (output_data): Use HOST_WIDEST_INT_PRINT_DEC to output
diff --git a/gcc/ssa-ccp.c b/gcc/ssa-ccp.c
index 2252556282e..851445f7bc4 100644
--- a/gcc/ssa-ccp.c
+++ b/gcc/ssa-ccp.c
@@ -732,10 +732,17 @@ optimize_unexecutable_edges (edges, executable_edges)
while (PHI_NODE_P (insn))
{
remove_phi_alternative (PATTERN (insn), edge->src);
+ if (rtl_dump_file)
+ fprintf (rtl_dump_file,
+ "Removing alternative for bb %d of phi %d\n",
+ edge->src->index, SSA_NAME (PATTERN (insn)));
insn = NEXT_INSN (insn);
}
}
-
+ if (rtl_dump_file)
+ fprintf (rtl_dump_file,
+ "Removing unexecutable edge from %d to %d\n",
+ edge->src->index, edge->dest->index);
/* Since the edge was not executable, remove it from the CFG. */
remove_edge (edge);
}
@@ -835,6 +842,10 @@ ssa_ccp_substitute_constants ()
are consecutive at the start of the basic block. */
if (! PHI_NODE_P (def))
{
+ if (rtl_dump_file)
+ fprintf (rtl_dump_file,
+ "Register %d is now set to a constant\n",
+ SSA_NAME (PATTERN (def)));
SET_SRC (set) = values[i].const_value;
INSN_CODE (def) = -1;
df_insn_modify (df_analyzer, BLOCK_FOR_INSN (def), def);
@@ -858,15 +869,22 @@ ssa_ccp_substitute_constants ()
&& (GET_CODE (useinsn) == INSN
|| GET_CODE (useinsn) == JUMP_INSN))
{
- validate_replace_src (regno_reg_rtx [i],
+
+ if (validate_replace_src (regno_reg_rtx [i],
values[i].const_value,
- useinsn);
- INSN_CODE (useinsn) = -1;
- df_insn_modify (df_analyzer,
- BLOCK_FOR_INSN (useinsn),
- useinsn);
+ useinsn))
+ {
+ if (rtl_dump_file)
+ fprintf (rtl_dump_file,
+ "Register %d in insn %d replaced with constant\n",
+ i, INSN_UID (useinsn));
+ INSN_CODE (useinsn) = -1;
+ df_insn_modify (df_analyzer,
+ BLOCK_FOR_INSN (useinsn),
+ useinsn);
+ }
+
}
-
}
}
}