diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-09-06 23:51:38 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-09-06 23:51:38 +0200 |
| commit | 20042e2851a6ff07232f1a5ac3da4413499bc4d3 (patch) | |
| tree | 383de3e0fd65d377472ae40d54de96831fc77ddc /linearize.h | |
| parent | 895226abc4be8bfcd118b9b58d14221aeaf47d81 (diff) | |
| parent | a8a310fa690e5d5caea4be27397554eba1155505 (diff) | |
| download | sparse-dev-20042e2851a6ff07232f1a5ac3da4413499bc4d3.tar.gz | |
Merge branch 'rem-trivial-phi' into tip
* remove more complex phi-nodes
Diffstat (limited to 'linearize.h')
| -rw-r--r-- | linearize.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linearize.h b/linearize.h index d4973677..89da3db6 100644 --- a/linearize.h +++ b/linearize.h @@ -175,6 +175,14 @@ struct basic_block { }; +// +// return the opcode of the instruction defining ``SRC`` if existing +// and OP_BADOP if not. It also assigns the defining instruction +// to ``DEF``. +#define DEF_OPCODE(DEF, SRC) \ + (((SRC)->type == PSEUDO_REG && (DEF = (SRC)->def)) ? DEF->opcode : OP_BADOP) + + static inline void add_bb(struct basic_block_list **list, struct basic_block *bb) { add_ptr_list(list, bb); |
