summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJonas Haag <jonas@lophus.org>2015-10-03 11:46:35 +0200
committerPhilipp Serrer <philipp@serrer.de>2018-01-18 17:51:05 +0100
commiteb80375e0c334eba0d1275663168b9bf2649b442 (patch)
treecead48b4735edf8629d06d65137f52cb620e94da
parent8931a030fd6cff232ad9860f592e54329d9d04ca (diff)
Miscellaneous verifier message improvements
-rw-r--r--ir/be/beverify.c2
-rw-r--r--ir/ir/irverify.c14
2 files changed, 10 insertions, 6 deletions
diff --git a/ir/be/beverify.c b/ir/be/beverify.c
index 93373cd..c9c8992 100644
--- a/ir/be/beverify.c
+++ b/ir/be/beverify.c
@@ -182,7 +182,7 @@ static void verify_schedule_walker(ir_node *block, void *data)
} else if (cfchange_found != NULL) {
/* keepany isn't a real instruction. */
if (!be_is_Keep(node)) {
- verify_warnf(block, "%+F scheduled after control flow changing node", node);
+ verify_warnf(block, "%+F scheduled after control flow changing node %+F", node, cfchange_found);
env->problem_found = true;
}
}
diff --git a/ir/ir/irverify.c b/ir/ir/irverify.c
index caf0803..78259a3 100644
--- a/ir/ir/irverify.c
+++ b/ir/ir/irverify.c
@@ -310,9 +310,9 @@ static bool verify_node_Proj_fragile(const ir_node *node)
if (!is_x_except_Proj(node) && !is_x_regular_Proj(node))
return true;
- int throws_exception = ir_throws_exception(pred);
- if (!throws_exception) {
- warn(node, "exception Proj on %+F which is not marked as throwing exceptions", pred);
+ if (!ir_throws_exception(pred)) {
+ const char *kind = is_x_except_Proj(node) ? "exception" : "regular";
+ warn(node, "%s Proj on %+F which is not marked as throwing exceptions", kind, pred);
return false;
}
return true;
@@ -322,8 +322,9 @@ static int verify_node_Proj(const ir_node *p)
{
ir_graph *irg = get_irn_irg(p);
ir_node *pred = get_Proj_pred(p);
- if (get_irn_mode(pred) != mode_T) {
- warn(p, "predecessor %+F does not have mode_T", pred);
+ ir_mode *mode = get_irn_mode(pred);
+ if (mode != mode_T) {
+ warn(p, "predecessor %+F has mode %s (expected mode_T)", pred, get_mode_name(mode));
return false;
}
bool fine = true;
@@ -495,6 +496,8 @@ static int verify_node_Return(const ir_node *n)
ir_type *mt = get_entity_type(get_irg_entity(irg));
if (!is_Method_type(mt)) /* someone else should report that problem */
return true;
+
+ /* Check number and types of return values */
if ((size_t)get_Return_n_ress(n) != get_method_n_ress(mt)) {
warn(n, "number of inputs does not match method type (%zu inputs, %zu declared)",
get_Return_n_ress(n), get_method_n_ress(mt));
@@ -510,6 +513,7 @@ static int verify_node_Return(const ir_node *n)
}
}
}
+
return fine;
}