projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
optimize_graph_df():
[libfirm]
/
ir
/
ir
/
irvrfy_t.h
diff --git
a/ir/ir/irvrfy_t.h
b/ir/ir/irvrfy_t.h
index
292e90e
..
66c3b66
100644
(file)
--- a/
ir/ir/irvrfy_t.h
+++ b/
ir/ir/irvrfy_t.h
@@
-12,9
+12,10
@@
#ifndef _IRVRFY_T_H_
#define _IRVRFY_T_H_
#ifndef _IRVRFY_T_H_
#define _IRVRFY_T_H_
+#include "irflag_t.h"
#include "irvrfy.h"
#include "irvrfy.h"
+#include "irdump.h"
-extern node_verification_t opt_do_node_verification;
extern const char *firm_vrfy_failure_msg;
#ifdef NDEBUG
extern const char *firm_vrfy_failure_msg;
#ifdef NDEBUG
@@
-22,22
+23,22
@@
extern const char *firm_vrfy_failure_msg;
* in RELEASE mode, returns ret if the expression expr evaluates to zero
* in ASSERT mode, asserts the expression expr (and the string string).
*/
* in RELEASE mode, returns ret if the expression expr evaluates to zero
* in ASSERT mode, asserts the expression expr (and the string string).
*/
-#define ASSERT_AND_RET(expr, string, ret)
if (!(expr)) return (ret
)
+#define ASSERT_AND_RET(expr, string, ret)
do { if (!(expr)) return (ret); } while (0
)
/*
* in RELEASE mode, returns ret if the expression expr evaluates to zero
* in ASSERT mode, executes blk if the expression expr evaluates to zero and asserts expr
*/
/*
* in RELEASE mode, returns ret if the expression expr evaluates to zero
* in ASSERT mode, executes blk if the expression expr evaluates to zero and asserts expr
*/
-#define ASSERT_AND_RET_DBG(expr, string, ret, blk)
if (!(expr)) return (ret
)
+#define ASSERT_AND_RET_DBG(expr, string, ret, blk)
do { if (!(expr)) return (ret); } while (0
)
#else
#define ASSERT_AND_RET(expr, string, ret) \
do { \
#else
#define ASSERT_AND_RET(expr, string, ret) \
do { \
- if (opt_do_node_verification ==
NODE
_VERIFICATION_ON) {\
+ if (opt_do_node_verification ==
FIRM
_VERIFICATION_ON) {\
if (!(expr) && current_ir_graph != get_const_code_irg()) \
if (!(expr) && current_ir_graph != get_const_code_irg()) \
- dump_ir_block_graph(current_ir_graph, "-assert"); \
+
dump_ir_block_graph(current_ir_graph, "-assert"); \
assert((expr) && string); } \
if (!(expr)) { \
assert((expr) && string); } \
if (!(expr)) { \
- if (opt_do_node_verification ==
NODE
_VERIFICATION_REPORT) \
+ if (opt_do_node_verification ==
FIRM
_VERIFICATION_REPORT) \
fprintf(stderr, #expr " : " string "\n"); \
firm_vrfy_failure_msg = #expr " && " string; \
return (ret); \
fprintf(stderr, #expr " : " string "\n"); \
firm_vrfy_failure_msg = #expr " && " string; \
return (ret); \
@@
-48,11
+49,14
@@
do { \
do { \
if (!(expr)) { \
firm_vrfy_failure_msg = #expr " && " string; \
do { \
if (!(expr)) { \
firm_vrfy_failure_msg = #expr " && " string; \
- if (opt_do_node_verification !=
NODE
_VERIFICATION_ERROR_ONLY) { blk; } \
- if (opt_do_node_verification ==
NODE
_VERIFICATION_REPORT) \
+ if (opt_do_node_verification !=
FIRM
_VERIFICATION_ERROR_ONLY) { blk; } \
+ if (opt_do_node_verification ==
FIRM
_VERIFICATION_REPORT) \
fprintf(stderr, #expr " : " string "\n"); \
fprintf(stderr, #expr " : " string "\n"); \
- else if (opt_do_node_verification == NODE_VERIFICATION_ON) \
+ else if (opt_do_node_verification == FIRM_VERIFICATION_ON) { \
+ if (!(expr) && current_ir_graph != get_const_code_irg()) \
+ dump_ir_block_graph(current_ir_graph, "-assert"); \
assert((expr) && string); \
assert((expr) && string); \
+ } \
return (ret); \
} \
} while(0)
return (ret); \
} \
} while(0)
@@
-60,8
+64,8
@@
do { \
#endif
/**
#endif
/**
- * Set the default verify_node and verify_proj_node operation.
+ * Set the default verify_node and verify_proj_node operation
for an ir_op_ops
.
*/
*/
-void firm_set_default_verifyer(
ir_op *op
);
+void firm_set_default_verifyer(
opcode code, ir_op_ops *ops
);
#endif /* _IRVRFY_T_H_ */
#endif /* _IRVRFY_T_H_ */