summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beverify.c
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2014-12-30 14:21:16 +0100
committerChristoph Mallon <mallon@cs.uni-saarland.de>2014-12-30 23:52:46 +0100
commitd28e4e43321f9abd48e97bcca6db81901e4a06c4 (patch)
tree15ecda65f63235312de94f65c42b2a97834093c3 /ir/be/beverify.c
parent81b72ff01b8c7de569343ddeb113cbad29621bb5 (diff)
beverify: Simplify loop in schedule verifier.
Diffstat (limited to 'ir/be/beverify.c')
-rw-r--r--ir/be/beverify.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/ir/be/beverify.c b/ir/be/beverify.c
index d446a0e..67eb03f 100644
--- a/ir/be/beverify.c
+++ b/ir/be/beverify.c
@@ -217,27 +217,21 @@ static void verify_schedule_walker(ir_node *block, void *data)
if (be_is_Keep(node) || be_is_CopyKeep(node)) {
/* at least 1 of the keep arguments has to be its schedule
* predecessor */
- ir_node *prev = sched_prev(node);
+ ir_node *prev = sched_prev(node);
while (be_is_Keep(prev) || be_is_CopyKeep(prev))
prev = sched_prev(prev);
- bool found = false;
- while (true) {
+ do {
foreach_irn_in(node, i, in) {
if (skip_Proj(in) == prev)
- found = true;
+ goto ok;
}
- if (found)
- break;
prev = sched_prev(prev);
- if (!is_Phi(prev))
- break;
- }
- if (!found) {
- ir_fprintf(stderr, "%+F not scheduled after its pred node in block %+F (%s)\n",
- node, block, get_irg_name(block));
- env->problem_found = true;
- }
+ } while (is_Phi(prev));
+ ir_fprintf(stderr, "%+F not scheduled after its pred node in block %+F (%s)\n",
+ node, block, get_irg_name(block));
+ env->problem_found = true;
+ok:;
}
}
}