bechordal: Fully use the information provided by the borders to simplify assignment...
[libfirm] / ir / be / beverify.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Various verify routines that check a scheduled graph for correctness.
9  * @author      Matthias Braun
10  * @date        05.05.2006
11  */
12 #ifndef FIRM_BE_BEVERIFY_H
13 #define FIRM_BE_BEVERIFY_H
14
15 #include <stdbool.h>
16 #include "irgraph.h"
17
18 #include "bearch.h"
19
20 /**
21  * Verifies, that the register pressure for a given register class doesn't
22  * exceed the limit of available registers.
23  *
24  * @param irg        The irg to check.
25  * @param cls        The register class to check.
26  * @return           true if the pressure is valid, false otherwise.
27  */
28 bool be_verify_register_pressure(ir_graph *irg,
29                                  const arch_register_class_t* cls);
30
31 /**
32  * Does some sanity checks on the schedule.
33  *
34  * @param irg   The irg to check
35  * @return      true if the schedule is valid, false otherwise
36  */
37 bool be_verify_schedule(ir_graph *irg);
38
39 /**
40  * Verify spillslots
41  *
42  * @param irg   The irg to check
43  * @return      true if spillslots are valid, false otherwise
44  */
45 bool be_verify_spillslots(ir_graph *irg);
46
47 /**
48  * Verify register allocation: Checks that no 2 live nodes have the same
49  * register assigned, also checks that each scheduled node has a register
50  * assigned.
51  *
52  * @param irg   The graph to check
53  * @return      true if verify succeeded, false otherwise
54  */
55 bool be_verify_register_allocation(ir_graph *irg);
56
57 /**
58  * Check the given liveness information against a freshly computed one.
59  */
60 void be_liveness_check(be_lv_t *lv);
61
62 #endif