diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-22 09:08:53 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-23 07:43:54 +0200 |
| commit | fa70d690d245b4e315472e20c529afd1b55290af (patch) | |
| tree | f7fd170142f846fcbd59f5698a622149031186ee /linearize.h | |
| parent | f46413ad4762335af4d3631636e6015c6501877a (diff) | |
| download | sparse-dev-fa70d690d245b4e315472e20c529afd1b55290af.tar.gz | |
ir: define an OP_... range for unops
Some operations are exactly the same for all unops, including casts.
To make things more readable and decrease the amount of churn, create
a range OP_UNOP - OP_UNOP_END like already done for binops.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'linearize.h')
| -rw-r--r-- | linearize.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/linearize.h b/linearize.h index db4a67f3..5e8fb1fa 100644 --- a/linearize.h +++ b/linearize.h @@ -215,10 +215,18 @@ enum opcode { OP_BINCMP_END = OP_SET_AE, /* Uni */ - OP_NOT, + OP_UNOP, + OP_NOT = OP_UNOP, OP_NEG, OP_FNEG, + /* Casts */ + OP_CAST, + OP_SCAST, + OP_FPCAST, + OP_PTRCAST, + OP_UNOP_END = OP_PTRCAST, + /* Select - three input values */ OP_SEL, @@ -232,10 +240,6 @@ enum opcode { /* Other */ OP_PHI, OP_PHISOURCE, - OP_CAST, - OP_SCAST, - OP_FPCAST, - OP_PTRCAST, OP_INLINED_CALL, OP_CALL, OP_SLICE, |
