#include "irprog.h"
#include "irop_t.h"
#include "irgraph_t.h"
-#include "ircgcons.h"
#include "irvrfy_t.h"
#include "irgwalk.h"
#include "irdump.h"
return 1;
}
-/**
- * verify a Proj(CallBegin) node
- */
-static int verify_node_Proj_CallBegin(ir_node *n, ir_node *p)
-{
- (void) n;
- (void) p;
- return 1;
-}
-
-/**
- * verify a Proj(EndReg) node
- */
-static int verify_node_Proj_EndReg(ir_node *n, ir_node *p)
-{
- (void) n;
- (void) p;
-#ifdef INTERPROCEDURAL_VIEW
- ASSERT_AND_RET(
- (get_irp_ip_view_state() != ip_view_no),
- "EndReg may only appear if ip view is constructed.", 0);
-#endif
- return 1;
-}
-
-/**
- * verify a Proj(EndExcept) node
- */
-static int verify_node_Proj_EndExcept(ir_node *n, ir_node *p)
-{
- (void) n;
- (void) p;
-#ifdef INTERPROCEDURAL_VIEW
- ASSERT_AND_RET(
- (get_irp_ip_view_state() != ip_view_no),
- "EndExcept may only appear if ip view is constructed.", 0);
-#endif
- return 1;
-}
-
/**
* verify a Proj(CopyB) node
*/
return 1;
}
-/**
- * verify a Break node
- */
-static int verify_node_Break(ir_node *n, ir_graph *irg)
-{
- ir_mode *mymode = get_irn_mode(n);
- (void) irg;
-
-#ifdef INTERPROCEDURAL_VIEW
- ASSERT_AND_RET((get_irp_ip_view_state() != ip_view_no),
- "Break may only appear if ip view is constructed.", 0);
-#endif
- ASSERT_AND_RET(
- /* Jmp: BB --> X */
- mymode == mode_X, "Break node", 0
- );
- return 1;
-}
-
/**
* verify a Cond node
*/
return 1;
}
-/**
- * verify a Filter node
- */
-static int verify_node_Filter(ir_node *n, ir_graph *irg)
-{
- (void) n;
- (void) irg;
-#ifdef INTERPROCEDURAL_VIEW
- ASSERT_AND_RET((get_irp_ip_view_state() != ip_view_no),
- "Filter may only appear if ip view is constructed.", 0);
-#endif
- /* We should further do tests as for Proj and Phi. */
- return 1;
-}
-
/**
* verify a Load node
*/
}
ASSERT_AND_RET(
- is_compound_type(t),
+ is_compound_type(t) || is_Array_type(t),
"CopyB node should copy compound types only", 0 );
/* NoMem nodes are only allowed as memory input if the CopyB is NOT pinned.
fprintf(stderr, "irg_vrfy_bads: Block %ld has Bad predecessor\n", get_irn_node_nr(node));
}
if (get_node_verification_mode() == FIRM_VERIFICATION_ON) {
- dump_ir_block_graph_sched(current_ir_graph, "-assert");
+ dump_ir_graph(current_ir_graph, "-assert");
assert(0 && "Bad CF detected");
}
}
fprintf(stderr, "irg_vrfy_bads: node %ld has Bad Block\n", get_irn_node_nr(node));
}
if (get_node_verification_mode() == FIRM_VERIFICATION_ON) {
- dump_ir_block_graph_sched(current_ir_graph, "-assert");
+ dump_ir_graph(current_ir_graph, "-assert");
assert(0 && "Bad CF detected");
}
}
fprintf(stderr, "irg_vrfy_bads: node %ld is a Tuple\n", get_irn_node_nr(node));
}
if (get_node_verification_mode() == FIRM_VERIFICATION_ON) {
- dump_ir_block_graph_sched(current_ir_graph, "-assert");
+ dump_ir_graph(current_ir_graph, "-assert");
assert(0 && "Tuple detected");
}
}
fprintf(stderr, "irg_vrfy_bads: Phi %ld has Bad Input\n", get_irn_node_nr(node));
}
if (get_node_verification_mode() == FIRM_VERIFICATION_ON) {
- dump_ir_block_graph_sched(current_ir_graph, "-assert");
+ dump_ir_graph(current_ir_graph, "-assert");
assert(0 && "Bad CF detected");
}
}
fprintf(stderr, "irg_vrfy_bads: node %ld has Bad Input\n", get_irn_node_nr(node));
}
if (get_node_verification_mode() == FIRM_VERIFICATION_ON) {
- dump_ir_block_graph_sched(current_ir_graph, "-assert");
+ dump_ir_graph(current_ir_graph, "-assert");
assert(0 && "Bad NON-CF detected");
}
}
CASE(Start);
CASE(Jmp);
CASE(IJmp);
- CASE(Break);
CASE(Cond);
CASE(Return);
CASE(Raise);
CASE(Conv);
CASE(Cast);
CASE(Phi);
- CASE(Filter);
CASE(Load);
CASE(Store);
CASE(Alloc);
CASE(Alloc);
CASE(Proj);
CASE(Tuple);
- CASE(CallBegin);
- CASE(EndReg);
- CASE(EndExcept);
CASE(CopyB);
CASE(Bound);
default: