[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sparse
Subject: [RFC] [PATCH 2/4] remove dead branch usage
From: Christopher Li <sparse () chrisli ! org>
Date: 2006-12-28 9:25:40
Message-ID: 20061228092540.GC6573 () chrisli ! org
[Download RAW message or body]
Fix some problem cause by dead branch instruction left in the user chain.
Signed-off-by: Christopher Li <sparse@chrisli.org>
Index: sparse/flow.c
===================================================================
--- sparse.orig/flow.c 2006-12-21 14:35:18.000000000 -0800
+++ sparse/flow.c 2006-12-21 14:35:55.000000000 -0800
@@ -195,6 +195,7 @@ try_to_rewrite_target:
if (bb_list_size(target->parents) != 1)
return retval;
insert_branch(target, insn, final);
+ kill_instruction(insn);
return 1;
}
Index: sparse/simplify.c
===================================================================
--- sparse.orig/simplify.c 2006-12-21 14:35:18.000000000 -0800
+++ sparse/simplify.c 2006-12-21 14:35:55.000000000 -0800
@@ -217,6 +217,11 @@ void kill_instruction(struct instruction
kill_use(&insn->src2);
kill_use(&insn->src3);
return;
+ case OP_BR:
+ insn->bb = NULL;
+ repeat_phase |= REPEAT_CSE;
+ if (insn->cond)
+ kill_use(&insn->cond);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic