summaryrefslogtreecommitdiff
path: root/gcc/df-core.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb.gcc@gmail.com>2006-05-13 23:14:47 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2006-05-13 23:14:47 +0000
commita1b53177b75b2409a8b7d3324b61d91b1b1199c3 (patch)
tree2d0ccc4c2549df330dcaea8bb71b9a1b06128b22 /gcc/df-core.c
parent628cacef2409f1aae7d75090cbd851f5dd14a80f (diff)
downloadgcc-a1b53177b75b2409a8b7d3324b61d91b1b1199c3.tar.gz
df-core.c (df_bb_regno_last_use_find): Do not look for dataflow information attached to non-INSNs such as NOTEs.
* df-core.c (df_bb_regno_last_use_find): Do not look for dataflow information attached to non-INSNs such as NOTEs. (df_bb_regno_first_def_find, df_bb_regno_last_def_find): Likewise. From-SVN: r113748
Diffstat (limited to 'gcc/df-core.c')
-rw-r--r--gcc/df-core.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/df-core.c b/gcc/df-core.c
index 4c53e8c86f2..0619c200bdc 100644
--- a/gcc/df-core.c
+++ b/gcc/df-core.c
@@ -915,10 +915,14 @@ df_bb_regno_last_use_find (struct df *df, basic_block bb, unsigned int regno)
{
rtx insn;
struct df_ref *use;
+ unsigned int uid;
FOR_BB_INSNS_REVERSE (bb, insn)
{
- unsigned int uid = INSN_UID (insn);
+ if (!INSN_P (insn))
+ continue;
+
+ uid = INSN_UID (insn);
for (use = DF_INSN_UID_GET (df, uid)->uses; use; use = use->next_ref)
if (DF_REF_REGNO (use) == regno)
return use;
@@ -934,10 +938,14 @@ df_bb_regno_first_def_find (struct df *df, basic_block bb, unsigned int regno)
{
rtx insn;
struct df_ref *def;
+ unsigned int uid;
FOR_BB_INSNS (bb, insn)
{
- unsigned int uid = INSN_UID (insn);
+ if (!INSN_P (insn))
+ continue;
+
+ uid = INSN_UID (insn);
for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref)
if (DF_REF_REGNO (def) == regno)
return def;
@@ -953,11 +961,14 @@ df_bb_regno_last_def_find (struct df *df, basic_block bb, unsigned int regno)
{
rtx insn;
struct df_ref *def;
+ unsigned int uid;
FOR_BB_INSNS_REVERSE (bb, insn)
{
- unsigned int uid = INSN_UID (insn);
+ if (!INSN_P (insn))
+ continue;
+ uid = INSN_UID (insn);
for (def = DF_INSN_UID_GET (df, uid)->defs; def; def = def->next_ref)
if (DF_REF_REGNO (def) == regno)
return def;