diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-09-06 06:44:06 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-16 11:59:02 +0200 |
| commit | c6b637e5660c9830b387f86d526d97f4f261b191 (patch) | |
| tree | 91f72cbfa5df46c6e2c9dfcd00760e087c157026 /optimize.c | |
| parent | 11fa45bd6113249befff66ced06d8c8ff451efc9 (diff) | |
| download | sparse-dev-c6b637e5660c9830b387f86d526d97f4f261b191.tar.gz | |
ir-validate: add framework for IR validation
To be meaningful, the IR instructions and their relationships
must obey some constraints. This patch add the framework for
doing this kind of validation.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'optimize.c')
| -rw-r--r-- | optimize.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -11,6 +11,7 @@ #include "liveness.h" #include "flow.h" #include "cse.h" +#include "ir.h" int repeat_phase; @@ -50,12 +51,14 @@ void optimize(struct entrypoint *ep) * branches, kill dead basicblocks etc */ kill_unreachable_bbs(ep); + ir_validate(ep); /* * Turn symbols into pseudos */ if (fpasses & PASS_MEM2REG) simplify_symbol_usage(ep); + ir_validate(ep); if (fdump_ir & PASS_MEM2REG) show_entry(ep); |
