diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-09-20 01:03:33 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-20 22:35:08 +0200 |
| commit | e51008eb29ccb75e2e58f5d9c545f944185c9765 (patch) | |
| tree | fb97da6f942e119d39f83db5a53f02a808fe6a9d /opcode.h | |
| parent | ce5f04a050cbc8bd92f718765616199a7f8c958a (diff) | |
| download | sparse-dev-e51008eb29ccb75e2e58f5d9c545f944185c9765.tar.gz | |
add a flag to identify commutative & associative ops
The way how the functions doing the simplification of commutative
or associative binops are called is simple but complicates the
simplification of a specific binop.
Fix this by adding a flag to the opcode table to identify the
commutative and the associative binops and using this flag
to call or not the functions doing the corresponding simplification.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'opcode.h')
| -rw-r--r-- | opcode.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -20,6 +20,11 @@ extern const struct opcode_table { unsigned int flags:6; #define OPF_NONE 0 #define OPF_TARGET (1 << 0) +#define OPF_COMMU (1 << 1) +#define OPF_ASSOC (1 << 2) +#define OPF_UNOP (1 << 3) +#define OPF_BINOP (1 << 4) +#define OPF_COMPARE (1 << 5) } opcode_table[]; |
