* src/SDCCast.c (decorateType): fixed previouse immature commit, added optimisation
[fw/sdcc] / src / SDCCicode.h
index e5dbe9d8b542e1a6dae10ece03a81e3e9276935b..f57acc7e25bdbc1c9fd64f3aa49fe61be5e753f5 100644 (file)
@@ -207,25 +207,27 @@ typedef struct icodeFuncTable
 iCodeTable;
 
 /* useful macros */
-#define SKIP_IC2(x)  (x->op == GOTO     ||     \
-                      x->op == LABEL    ||     \
-                      x->op == FUNCTION ||     \
-                      x->op == INLINEASM ||    \
-                      x->op == ENDFUNCTION   )
+#define SKIP_IC2(x)  (x->op == GOTO         ||    \
+                      x->op == LABEL        ||    \
+                      x->op == FUNCTION     ||    \
+                      x->op == INLINEASM    ||    \
+                      x->op == ENDFUNCTION  )
 
-#define SKIP_IC1(x)  (x->op == CALL     ||     \
+#define SKIP_IC1(x)  (x->op == CALL         ||    \
                       SKIP_IC2(x) )
 
-#define SKIP_IC(x)   (x->op == PCALL    ||     \
-                      x->op == IPUSH    ||     \
-                      x->op == IPOP     ||     \
-                      x->op == JUMPTABLE ||    \
-                      x->op == RECEIVE  ||     \
-                      x->op == ARRAYINIT ||    \
-                      SKIP_IC1(x)||  \
+#define SKIP_IC(x)   (x->op == PCALL        ||    \
+                      x->op == IPUSH        ||    \
+                      x->op == IPOP         ||    \
+                      x->op == JUMPTABLE    ||    \
+                      x->op == RECEIVE      ||    \
+                      x->op == ARRAYINIT    ||    \
+                      SKIP_IC1(x)           ||    \
+                      x->op == CRITICAL     ||    \
+                      x->op == ENDCRITICAL  ||    \
                       x->op == SEND         )
 
-#define SKIP_IC3(x) (SKIP_IC2(x) ||     \
+#define SKIP_IC3(x) (SKIP_IC2(x)            ||    \
                      x->op == JUMPTABLE )
 
 #define IS_CONDITIONAL(x) (x->op == EQ_OP || \
@@ -254,6 +256,14 @@ iCodeTable;
                                 x->op == '|'        || \
                                 x->op == '^'))
 
+#define IS_ASSOCIATIVE(x) (x && (x->op == EQ_OP      || \
+                                 x->op == NE_OP      || \
+                                 x->op == '+'        || \
+                                 x->op == '*'        || \
+                                 x->op == BITWISEAND || \
+                                 x->op == '|'        || \
+                                 x->op == '^'))
+
 #define ASSIGNMENT(ic) ( ic && ic->op == '=')
 
 #define ASSIGN_SYM_TO_ITEMP(ic) (ic && ic->op == '=' && \
@@ -326,6 +336,7 @@ operand *opFromOpWithDU (operand *, bitVect *, bitVect *);
 iCode *copyiCode (iCode *);
 operand *newiTempFromOp (operand *);
 iCode *getBuiltinParms (iCode *,int *, operand **);
+int isiCodeInFunctionCall (iCode *);
 /*-----------------------------------------------------------------*/
 /* declaration of exported variables                               */
 /*-----------------------------------------------------------------*/