libFirm
Correctness Tests

Modules

 Flags
 Enable/Disable automatic correctness tests.

Enumerations

enum  irg_verify_flags_t { VERIFY_NORMAL = 0, VERIFY_ENFORCE_SSA = 1 }
 Flags for irg_verify(). More...
enum  verify_bad_flags_t { BAD_CF = 1, BAD_DF = 2, BAD_BLOCK = 4, TUPLE = 8 }
 Possible flags for irg_verify_bads(). More...

Functions

int irn_verify (const ir_node *checknode)
 Tests the modes of checknode and its predecessors.
int irn_verify_irg (const ir_node *checknode, ir_graph *irg)
 Tests the modes of checknode and its predecessors.
int irn_verify_irg_dump (const ir_node *checknode, ir_graph *irg, const char **bad_string)
 Same as irn_verify_irg, but temporary sets verification mode to NODE_VERIFICATION_ERROR_ONLY.
int irg_verify (ir_graph *irg, unsigned flags)
 Calls irn_verify() for each node in irg.
ir_graph_pass_tirg_verify_pass (const char *name, unsigned flags)
 Creates an ir_graph pass for irg_verify().
int irg_verify_bads (ir_graph *irg, int flags)
 Verify occurrence of bad nodes in a graph.

Detailed Description

Enumeration Type Documentation

Flags for irg_verify().

Enumerator:
VERIFY_NORMAL 

check SSA property only if dominance information is available

VERIFY_ENFORCE_SSA 

check SSA property by enforcing the dominance information recalculation

Definition at line 63 of file irverify.h.

Possible flags for irg_verify_bads().

Enumerator:
BAD_CF 

Bad nodes are allowed as predecessors of Blocks and Phis.

BAD_DF 

Bad nodes are allowed as dataflow predecessors.

BAD_BLOCK 

Bad nodes are allowed as Block input.

TUPLE 

Tuple nodes are allowed.

Definition at line 92 of file irverify.h.

Function Documentation

int irg_verify ( ir_graph irg,
unsigned  flags 
)

Calls irn_verify() for each node in irg.

Graph must be in state "op_pin_state_pinned".

Parameters
irgthe IR-graph t check
flagsone of irg_verify_flags_t
Returns
NON-zero on success.
int irg_verify_bads ( ir_graph irg,
int  flags 
)

Verify occurrence of bad nodes in a graph.

Parameters
irgThe graph to verify
flagscombination of verify_bad_flags_t flags describing which Bads are allowed
Returns
a value combined of verify_bad_flags_t indicating the problems found.
ir_graph_pass_t* irg_verify_pass ( const char *  name,
unsigned  flags 
)

Creates an ir_graph pass for irg_verify().

Parameters
namethe name of this pass or NULL
flagsone of irg_verify_flags_t
Returns
the newly created ir_graph pass
int irn_verify ( const ir_node checknode)

Tests the modes of checknode and its predecessors.

checknode must be in current_ir_graph.

Returns
NON-zero on success
int irn_verify_irg ( const ir_node checknode,
ir_graph irg 
)

Tests the modes of checknode and its predecessors.

checknode must be in given ir_graph.

Returns
NON-zero on success
int irn_verify_irg_dump ( const ir_node checknode,
ir_graph irg,
const char **  bad_string 
)

Same as irn_verify_irg, but temporary sets verification mode to NODE_VERIFICATION_ERROR_ONLY.

Returns
NON-zero on success